Repository navigation
feat(mcp): human titles + tool annotations on all 51 tools - #450
Merged
Merged
Conversation
Claude's Connectors Directory requires a title and readOnlyHint / destructiveHint / openWorldHint on every tool. lib/mcp/annotations.ts holds one entry per tool (plus idempotentHint) and withToolHints() merges it into every registerTool config before the modules register, so the SDK's own tools/list mapper emits title + annotations. A tool with no entry throws at startup. Names, schemas and behaviour are unchanged; the tools/list cache-field wrapper still spreads the SDK result. Posting, sending outreach, publishing articles, spending credits or money, deletes and overwrites are destructive; reads are readOnly; anything reaching a third-party site, network, mailbox, AI engine or webhook receiver is openWorld. Test: tests/mcp-annotations.test.ts lists tools through the real SDK client and asserts all 51 carry a title + all four hints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan50 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 30 | LOW: 18
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a human
titleand explicitannotations(readOnlyHint, destructiveHint, idempotentHint, openWorldHint) to every one of the 51 CrawlProof MCP tools, for the Claude Connectors Directory.lib/mcp/annotations.ts: oneTOOL_HINTSentry per tool.withToolHints(server)runs first in the/api/mcpinitializer and merges title + annotations into eachregisterToolconfig, so the SDK (1.32.2) tools/list mapper emits them. A tool without an entry throws at startup.Tests (local, bun-installed worktree):
vitest run tests/mcp-annotations.test.ts: 3 pass; lists through the real SDK Client over InMemoryTransport, 51/51 with title + 4 hintsvitest run: 259 files / 3086 tests passtsc --noEmit: clean🤖 Generated with Claude Code