You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrate to registerTool with annotations, titles, and structured output (roadmap 0.2.0) #39
MCP clients decide how to treat a tool from its annotations. The spec says unannotated tools should be assumed destructive and non-idempotent, so read-only calls like tailnet_status get over-confirmed, and clients can't distinguish share_port {public:true} (opens a port to the internet) from a status read. Annotations are the cheapest safety and UX win available, and they're listed as roadmap item 0.2.0. This issue tracks that work.
Evidence
All tools use the deprecated server.tool(name, description, shape, handler) overload (src/tools/*.ts). SDK 1.32 provides server.registerTool(name, { title, description, inputSchema, outputSchema, annotations }, handler).
Responses are JSON stringified into a text block (src/tools/helpers.ts:9-11), with no structuredContent or outputSchema, so clients and agents re-parse text.
Suggested approach
Migrate every tool to registerTool and add a human-friendly title.
Annotations:
tool
readOnly
destructive
idempotent
openWorld
tailnet_status, share_status, ping_all
✓
✓
generate_ssh_config
✗ (writes when write)
✗
✓
share_port
✗
✗
✓
✓ (Funnel)
stop_share
✗
✓
✓
Add outputSchema (zod) and return structuredContent alongside the text block for backward compatibility.
Activity
feat!: tool annotations + structured output, Node 22/24 cross-OS CI, …