get_model_info
Retrieve detailed specifications and capabilities for AI models to determine their suitability for text conversations or image processing tasks.
Instructions
Get details about a specific model
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes |
Implementation Reference
- src/tool-handlers/get-model-info.ts:4-25 (handler)Implementation of the handleGetModelInfo function, which retrieves model details from the cache or API.
export async function handleGetModelInfo( request: { params: { arguments: { model: string } } }, modelCache: ModelCache, apiClient?: OpenRouterAPIClient, ) { const { model } = request.params.arguments; if (!modelCache.isValid() && apiClient) { modelCache.setModels(await apiClient.getModels()); } if (!modelCache.isValid()) { return { content: [{ type: 'text', text: 'No model data available.' }], isError: true }; } const info = modelCache.get(model); if (!info) { return { content: [{ type: 'text', text: `Model '${model}' not found.` }], isError: true }; } return { content: [{ type: 'text', text: JSON.stringify(info, null, 2) }] }; } - src/tool-handlers.ts:99-107 (registration)Tool registration for 'get_model_info' in the MCP server setup.
{ name: 'get_model_info', description: 'Get details about a specific model', inputSchema: { type: 'object', properties: { model: { type: 'string' } }, required: ['model'], }, }, - src/tool-handlers.ts:154-159 (handler)Call site in the CallToolRequestSchema handler that dispatches to handleGetModelInfo.
case 'get_model_info': return handleGetModelInfo( wrapToolArgs(args as { model: string } | undefined), this.modelCache, this.apiClient, );