list_all_models
Retrieve all available AI models from configured providers like OpenAI, Anthropic, and Google through a unified interface.
Instructions
List all available models from all configured providers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:189-224 (handler)The main handler function for the 'list_all_models' tool. It aggregates models from all configured providers (OpenAI, Anthropic, Google) by calling their respective listModels methods, handles errors for each, and returns a JSON string of the results.case 'list_all_models': { const results: any = {}; if (openaiProvider) { try { results.openai = await openaiProvider.listModels(); } catch (error) { results.openai = { error: error instanceof Error ? error.message : 'Failed to fetch OpenAI models' }; } } if (anthropicProvider) { try { results.anthropic = await anthropicProvider.listModels(); } catch (error) { results.anthropic = { error: error instanceof Error ? error.message : 'Failed to fetch Anthropic models' }; } } if (googleProvider) { try { results.google = await googleProvider.listModels(); } catch (error) { results.google = { error: error instanceof Error ? error.message : 'Failed to fetch Google models' }; } } return { content: [ { type: 'text', text: JSON.stringify(results, null, 2), }, ], }; }
- src/index.ts:70-77 (registration)Registration of the 'list_all_models' tool in the ListToolsRequestSchema handler, including name, description, and empty input schema (no parameters required).{ name: 'list_all_models', description: 'List all available models from all configured providers', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:73-77 (schema)Input schema for the 'list_all_models' tool, which is an empty object (no input parameters). Note: this overlaps with registration.inputSchema: { type: 'object', properties: {}, }, },