get_model_detail
Retrieve detailed information about a specific AI model's configuration, capabilities, and specifications to understand its technical parameters and operational characteristics.
Instructions
Get detailed information about a specific AI model.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| modelId | Yes | The model ID to retrieve detailed information for |
Input Schema (JSON Schema)
{
"properties": {
"modelId": {
"description": "The model ID to retrieve detailed information for",
"type": "string"
}
},
"required": [
"modelId"
],
"type": "object"
}
Implementation Reference
- src/tools/get-model-detail.ts:10-37 (handler)The core handler function that executes the get_model_detail tool logic: fetches model details via Langfuse client and returns formatted JSON response or error.export async function getModelDetail( client: LangfuseAnalyticsClient, args: GetModelDetailArgs ) { try { const modelData = await client.getModel(args.modelId); return { content: [ { type: 'text' as const, text: JSON.stringify(modelData, null, 2), }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: 'text' as const, text: `Error getting model detail: ${errorMessage}`, }, ], isError: true, }; } }
- src/tools/get-model-detail.ts:4-8 (schema)Zod schema defining input parameters (modelId) and inferred TypeScript type for the tool.export const getModelDetailSchema = z.object({ modelId: z.string().describe('The model ID to retrieve detailed information for'), }); export type GetModelDetailArgs = z.infer<typeof getModelDetailSchema>;
- src/index.ts:565-578 (registration)Tool registration in the allTools array used by listToolsRequestHandler to expose the tool spec to MCP clients.{ name: 'get_model_detail', description: 'Get detailed information about a specific AI model.', inputSchema: { type: 'object', properties: { modelId: { type: 'string', description: 'The model ID to retrieve detailed information for', }, }, required: ['modelId'], }, },
- src/index.ts:1077-1080 (registration)Dispatcher case in callToolRequestHandler that validates input with schema and invokes the handler function.case 'get_model_detail': { const args = getModelDetailSchema.parse(request.params.arguments); return await getModelDetail(this.client, args); }
- src/mode-config.ts:46-46 (helper)Inclusion in readOnlyTools set, allowing the tool in readonly server mode.'get_model_detail',