diff --git a/packages/plugin-mcp/src/mcp/getMcpHandler.ts b/packages/plugin-mcp/src/mcp/getMcpHandler.ts index 5e9ac74e7c5..47d1a5683f0 100644 --- a/packages/plugin-mcp/src/mcp/getMcpHandler.ts +++ b/packages/plugin-mcp/src/mcp/getMcpHandler.ts @@ -285,6 +285,7 @@ export const getMCPHandler = ( server.registerTool( tool.name, { + annotations: tool.annotations, description: tool.description, inputSchema: tool.parameters, }, diff --git a/packages/plugin-mcp/src/types.ts b/packages/plugin-mcp/src/types.ts index fcea1a2c186..bfd78b2d935 100644 --- a/packages/plugin-mcp/src/types.ts +++ b/packages/plugin-mcp/src/types.ts @@ -271,6 +271,16 @@ export type PluginMCPServerConfig = { * Add custom MCP Tools. */ tools?: { + /** + * Set the annotations of the tool. This is used by MCP clients to determine the behavior of the tool. + */ + annotations?: { + destructiveHint?: boolean + idempotentHint?: boolean + openWorldHint?: boolean + readOnlyHint?: boolean + title?: string + } /** * Set the description of the tool. This is used by MCP clients to determine when to use the tool. */