MCPcopy Create free account
hub / github.com/anus-dev/ANUS / getToolsByServer

Method getToolsByServer

packages/core/src/tools/tool-registry.ts:448–456  ·  view source on GitHub ↗

* Returns an array of tools registered from a specific MCP server.

(serverName: string)

Source from the content-addressed store, hash-verified

446 * Returns an array of tools registered from a specific MCP server.
447 */
448 getToolsByServer(serverName: string): AnyDeclarativeTool[] {
449 const serverTools: AnyDeclarativeTool[] = [];
450 for (const tool of this.tools.values()) {
451 if ((tool as DiscoveredMCPTool)?.serverName === serverName) {
452 serverTools.push(tool);
453 }
454 }
455 return serverTools.sort((a, b) => a.name.localeCompare(b.name));
456 }
457
458 /**
459 * Get the definition of a specific tool.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected