getModelInfo
Retrieve detailed schema and statistical information for a specific model to understand its structure and performance metrics.
Instructions
Retrieve detailed schema and statistics for a specific statistical model
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model name |
Implementation Reference
- src/mcp/mcp-server.js:1088-1103 (handler)Core handler function that implements the getModelInfo tool logic. Fetches the model schema from DataFlood storage and returns structured information including name, title, description, properties, and required fields.async getModelInfo(args) { const { model } = args; const schema = await this.storage.getModel(config.storage.defaultDatabase, model); if (!schema) { throw new Error(`Model '${model}' not found`); } return { name: model, title: schema.title, description: schema.description, properties: schema.properties, required: schema.required || [] }; }
- src/mcp/mcp-server.js:135-145 (schema)Input schema definition and registration of the getModelInfo tool in the server's tools array.{ name: 'getModelInfo', description: 'Get detailed information about a model', inputSchema: { type: 'object', properties: { model: { type: 'string', description: 'Model name' } }, required: ['model'] } }
- src/mcp/mcp-server.js:762-764 (registration)Tool dispatch registration in the handleToolCall switch statement that routes calls to the getModelInfo handler.case 'getModelInfo': result = await this.getModelInfo(args); break;
- src/mcp/index.js:457-479 (handler)Alternative handler implementation in the SDK-based index.js entry point, which returns the model info as formatted text content.case 'getModelInfo': // Check filesystem first let modelInfo = models.get(args.model); if (!modelInfo) { try { modelInfo = await storage.getModel(config.storage.defaultDatabase, args.model); if (modelInfo) { models.set(args.model, modelInfo); } } catch (error) { throw new Error(`Model '${args.model}' not found`); } } if (!modelInfo) { throw new Error(`Model '${args.model}' not found`); } return { content: [{ type: 'text', text: `Model: ${args.model}\n\nSchema:\n${JSON.stringify(modelInfo, null, 2)}` }] };
- src/mcp/index.js:204-214 (schema)Input schema definition for getModelInfo tool in the index.js TOOLS array.{ name: 'getModelInfo', description: 'Retrieve detailed schema and statistics for a specific statistical model', inputSchema: { type: 'object', properties: { model: { type: 'string', description: 'Model name' } }, required: ['model'] } }