MCPcopy Create free account
hub / github.com/MicrosoftDocs/mcp / listAllTools

Method listAllTools

cli/src/mcp/client.ts:159–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157 }
158
159 private async listAllTools(): Promise<ListedTool[]> {
160 const tools: ListedTool[] = [];
161 let cursor: string | undefined;
162
163 do {
164 const page: ListToolsResult = await this.client.listTools(cursor ? { cursor } : undefined);
165 tools.push(...page.tools);
166 cursor = page.nextCursor;
167 } while (cursor);
168
169 return tools;
170 }
171
172 private async callMappedTool(kind: ToolKind, args: Record<string, unknown>): Promise<ToolCallResult> {
173 const mapping = await this.getToolMapping();

Callers 1

getToolMappingMethod · 0.95

Calls 1

listToolsMethod · 0.80

Tested by

no test coverage detected