listProviders
Retrieve all configured language model providers and their available models using the MindBridge MCP Server to enable efficient model selection and orchestration.
Instructions
List all configured LLM providers and their available models
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:86-110 (handler)The inline async handler function for the 'listProviders' tool. It fetches all available providers, their models, and reasoning support using ProviderFactory methods, formats as JSON, and returns as MCP content or error.async () => { try { const providers = this.providerFactory.getAvailableProviders(); const result: Record<string, { models: string[]; supportsReasoning: boolean; }> = {}; for (const provider of providers) { result[provider] = { models: this.providerFactory.getAvailableModelsForProvider(provider), supportsReasoning: this.providerFactory.supportsReasoningEffort(provider) }; } return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'An unknown error occurred'}` }], isError: true }; } }
- src/server.ts:82-111 (registration)Registers the 'listProviders' tool with the MCP server using this.tool(). Includes empty schema {} and inline handler. No input params required.// Register listProviders tool this.tool('listProviders', 'List all configured LLM providers and their available models', {}, async () => { try { const providers = this.providerFactory.getAvailableProviders(); const result: Record<string, { models: string[]; supportsReasoning: boolean; }> = {}; for (const provider of providers) { result[provider] = { models: this.providerFactory.getAvailableModelsForProvider(provider), supportsReasoning: this.providerFactory.supportsReasoningEffort(provider) }; } return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : 'An unknown error occurred'}` }], isError: true }; } } );
- src/providers/factory.ts:68-70 (helper)ProviderFactory method used by listProviders handler to get the list of configured provider names.public getAvailableProviders(): string[] { return Array.from(this.providers.keys()); }
- src/providers/factory.ts:72-75 (helper)ProviderFactory method used to fetch available models for a specific provider instance.public getAvailableModelsForProvider(providerName: string): string[] { const provider = this.getProvider(providerName); return provider ? provider.getAvailableModels() : []; }
- src/providers/factory.ts:77-80 (helper)ProviderFactory method used to check if a provider supports reasoning effort parameter.public supportsReasoningEffort(providerName: string): boolean { const provider = this.getProvider(providerName); return provider ? provider.supportsReasoningEffort() : false; }