Skip to main content
Glama

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
NameRequiredDescriptionDefault
modelYesModel name

Implementation Reference

  • 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 || [] }; }
  • 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'] } }
  • Tool dispatch registration in the handleToolCall switch statement that routes calls to the getModelInfo handler.
    case 'getModelInfo': result = await this.getModelInfo(args); break;
  • 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)}` }] };
  • 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'] } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smallmindsco/MongTap'

If you have feedback or need assistance with the MCP directory API, please join our Discord server