MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isToolServed

Method isToolServed

src/mcp/tools.ts:2349–2353  ·  view source on GitHub ↗

* Whether a tool is on the surface `tools/list` shows: the allowlist when one * is set, the default surface otherwise. Not the same question as * `isToolAllowed` (with no allowlist, every defined tool may still be * called). Explore names a follow-up tool only when the agent can see it:

(name: string)

Source from the content-addressed store, hash-verified

2347 * `codegraph_node` is not on the default surface (#2486).
2348 */
2349 private isToolServed(name: string): boolean {
2350 const short = name.replace(/^codegraph_/, '');
2351 const allow = this.toolAllowlist();
2352 return allow ? allow.has(short) : DEFAULT_MCP_TOOLS.has(short);
2353 }
2354
2355 /**
2356 * Get tool definitions with dynamic descriptions based on project size.

Callers 3

handleExploreMethod · 0.95
exploreOneSymbolMethod · 0.95

Calls 2

toolAllowlistMethod · 0.95
hasMethod · 0.80

Tested by

no test coverage detected