MCPcopy Index your code
hub / github.com/codeaashu/claude-code / filterToolsByServer

Function filterToolsByServer

src/services/mcp/utils.ts:39–42  ·  view source on GitHub ↗
(tools: Tool[], serverName: string)

Source from the content-addressed store, hash-verified

37 * @returns Tools belonging to the specified server
38 */
39export function filterToolsByServer(tools: Tool[], serverName: string): Tool[] {
40 const prefix = `mcp__${normalizeNameForMCP(serverName)}__`
41 return tools.filter(tool => tool.name?.startsWith(prefix))
42}
43
44/**
45 * True when a command belongs to the given MCP server.

Callers 5

prepareServersFunction · 0.85
MCPSettingsFunction · 0.85
MCPToolListViewFunction · 0.85
ManagePluginsFunction · 0.85
buildMcpServerStatusesFunction · 0.85

Calls 1

normalizeNameForMCPFunction · 0.85

Tested by

no test coverage detected