Add tool annotations to all Everything server tools
Previously only get-annotated-message had ToolAnnotations. Now all 18 tools explicitly declare readOnlyHint, destructiveHint, idempotentHint, and openWorldHint so the server serves as a complete reference for developers implementing tool annotations per the MCP spec. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5cb1c6e042
commit
baf99300a2
17 changed files with 102 additions and 0 deletions
|
|
@ -13,6 +13,12 @@ const config = {
|
|||
title: "Echo Tool",
|
||||
description: "Echoes back the input string",
|
||||
inputSchema: EchoSchema,
|
||||
annotations: {
|
||||
readOnlyHint: true,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@ const config = {
|
|||
description:
|
||||
"Returns all environment variables, helpful for debugging MCP server configuration",
|
||||
inputSchema: {},
|
||||
annotations: {
|
||||
readOnlyHint: true,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@ const config = {
|
|||
description:
|
||||
"Returns up to ten resource links that reference different types of resources",
|
||||
inputSchema: GetResourceLinksSchema,
|
||||
annotations: {
|
||||
readOnlyHint: true,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,6 +28,12 @@ const config = {
|
|||
title: "Get Resource Reference Tool",
|
||||
description: "Returns a resource reference that can be used by MCP clients",
|
||||
inputSchema: GetResourceReferenceSchema,
|
||||
annotations: {
|
||||
readOnlyHint: true,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@ const config = {
|
|||
description:
|
||||
"Lists the current MCP roots provided by the client. Demonstrates the roots protocol capability even though this server doesn't access files.",
|
||||
inputSchema: {},
|
||||
annotations: {
|
||||
readOnlyHint: true,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -27,6 +27,12 @@ const config = {
|
|||
"Returns structured content along with an output schema for client data validation",
|
||||
inputSchema: GetStructuredContentInputSchema,
|
||||
outputSchema: GetStructuredContentOutputSchema,
|
||||
annotations: {
|
||||
readOnlyHint: true,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@ const config = {
|
|||
title: "Get Sum Tool",
|
||||
description: "Returns the sum of two numbers",
|
||||
inputSchema: GetSumSchema,
|
||||
annotations: {
|
||||
readOnlyHint: true,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ const config = {
|
|||
title: "Get Tiny Image Tool",
|
||||
description: "Returns a tiny MCP logo image.",
|
||||
inputSchema: {},
|
||||
annotations: {
|
||||
readOnlyHint: true,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@ const config = {
|
|||
description:
|
||||
"Compresses a single file using gzip compression. Depending upon the selected output type, returns either the compressed data as a gzipped resource or a resource link, allowing it to be downloaded in a subsequent request during the current session.",
|
||||
inputSchema: GZipFileAsResourceSchema,
|
||||
annotations: {
|
||||
readOnlyHint: false,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: true,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -255,6 +255,12 @@ export const registerSimulateResearchQueryTool = (server: McpServer) => {
|
|||
"If 'ambiguous' is true and client supports elicitation, sends an elicitation request for clarification.",
|
||||
inputSchema: SimulateResearchQuerySchema,
|
||||
execution: { taskSupport: "required" },
|
||||
annotations: {
|
||||
readOnlyHint: false,
|
||||
destructiveHint: false,
|
||||
idempotentHint: false,
|
||||
openWorldHint: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ const config = {
|
|||
title: "Toggle Simulated Logging",
|
||||
description: "Toggles simulated, random-leveled logging on or off.",
|
||||
inputSchema: {},
|
||||
annotations: {
|
||||
readOnlyHint: false,
|
||||
destructiveHint: false,
|
||||
idempotentHint: false,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
// Track enabled clients by session id
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ const config = {
|
|||
title: "Toggle Subscriber Updates",
|
||||
description: "Toggles simulated resource subscription updates on or off.",
|
||||
inputSchema: {},
|
||||
annotations: {
|
||||
readOnlyHint: false,
|
||||
destructiveHint: false,
|
||||
idempotentHint: false,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
// Track enabled clients by session id
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ const config = {
|
|||
"Demonstrates bidirectional MCP tasks where the server sends an elicitation request and " +
|
||||
"the client handles user input asynchronously, allowing the server to poll for completion.",
|
||||
inputSchema: {},
|
||||
annotations: {
|
||||
readOnlyHint: false,
|
||||
destructiveHint: false,
|
||||
idempotentHint: false,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
// Poll interval in milliseconds
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@ const config = {
|
|||
title: "Trigger Elicitation Request Tool",
|
||||
description: "Trigger a Request from the Server for User Elicitation",
|
||||
inputSchema: {},
|
||||
annotations: {
|
||||
readOnlyHint: false,
|
||||
destructiveHint: false,
|
||||
idempotentHint: false,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@ const config = {
|
|||
title: "Trigger Long Running Operation Tool",
|
||||
description: "Demonstrates a long running operation with progress updates.",
|
||||
inputSchema: TriggerLongRunningOperationSchema,
|
||||
annotations: {
|
||||
readOnlyHint: true,
|
||||
destructiveHint: false,
|
||||
idempotentHint: true,
|
||||
openWorldHint: false,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@ const config = {
|
|||
"Demonstrates bidirectional MCP tasks where the server sends a request and the client " +
|
||||
"executes it asynchronously, allowing the server to poll for progress and results.",
|
||||
inputSchema: TriggerSamplingRequestAsyncSchema,
|
||||
annotations: {
|
||||
readOnlyHint: false,
|
||||
destructiveHint: false,
|
||||
idempotentHint: false,
|
||||
openWorldHint: true,
|
||||
},
|
||||
};
|
||||
|
||||
// Poll interval in milliseconds
|
||||
|
|
|
|||
|
|
@ -21,6 +21,12 @@ const config = {
|
|||
title: "Trigger Sampling Request Tool",
|
||||
description: "Trigger a Request from the Server for LLM Sampling",
|
||||
inputSchema: TriggerSamplingRequestSchema,
|
||||
annotations: {
|
||||
readOnlyHint: false,
|
||||
destructiveHint: false,
|
||||
idempotentHint: false,
|
||||
openWorldHint: true,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue