Skip to content

pjullrich/emcp

Back Add optional tool annotations callback

Commit details

Add optional tool annotations callback

Description

Adds an optional `annotations/0` callback to the `EMCP.Tool` behaviour so tools can declare MCP `ToolAnnotations` (title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint). `to_map/1` surfaces the map under the `"annotations"` key in `tools/list` responses when the tool implements the callback; existing tools continue to work unchanged.

Metadata

Author
Matt Sutton git@mhs.fastmail.com
Committed
Commit

Contributors

  • Matt Sutton git@mhs.fastmail.com Author