Skip to main content
Glama
hoangdn3

OpenRouter MCP Multimodal Server

by hoangdn3

get_model_info

Retrieve detailed specifications and capabilities for any AI model in the OpenRouter ecosystem to determine its suitability for your tasks.

Instructions

Get detailed information about a specific model

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesThe model ID to get information for

Implementation Reference

  • The handler function that executes the get_model_info tool logic, retrieving model details from the cache and returning them as JSON or error messages.
    export async function handleGetModelInfo(
      request: { params: { arguments: GetModelInfoToolRequest } },
      modelCache: ModelCache
    ) {
      const args = request.params.arguments;
      
      try {
        if (!modelCache.isCacheValid()) {
          return {
            content: [
              {
                type: 'text',
                text: 'Model cache is empty or expired. Please call search_models first to populate the cache.',
              },
            ],
            isError: true,
          };
        }
        
        const model = modelCache.getModel(args.model);
        if (!model) {
          throw new McpError(ErrorCode.InvalidParams, `Model '${args.model}' not found`);
        }
        
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(model, null, 2),
            },
          ],
        };
      } catch (error) {
        if (error instanceof Error) {
          return {
            content: [
              {
                type: 'text',
                text: `Error retrieving model info: ${error.message}`,
              },
            ],
            isError: true,
          };
        }
        throw error;
      }
    }
  • TypeScript interface defining the input parameters for the get_model_info tool (model ID string).
    export interface GetModelInfoToolRequest {
      model: string;
    }
  • Registers the get_model_info tool in the ListTools response, including name, description, and input schema.
    {
      name: 'get_model_info',
      description: 'Get detailed information about a specific model',
      inputSchema: {
        type: 'object',
        properties: {
          model: {
            type: 'string',
            description: 'The model ID to get information for',
          },
        },
        required: ['model'],
      },
    },
  • Dispatches calls to the 'get_model_info' tool by invoking the handleGetModelInfo handler with the request arguments and model cache.
    case 'get_model_info':
      return handleGetModelInfo({
        params: {
          arguments: request.params.arguments as unknown as GetModelInfoToolRequest
        }
      }, this.modelCache);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information but doesn't specify whether it's a read-only operation, what permissions are needed, how errors are handled, or what the response format looks like. This leaves significant gaps for an AI agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'detailed information' includes, how the data is structured, or potential error conditions. For a tool with no structured behavioral hints, this leaves the AI agent with insufficient context to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'model' documented as 'The model ID to get information for'. The description adds no additional meaning beyond this, such as examples of model IDs or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('detailed information about a specific model'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'search_models' or 'validate_model', which likely serve different but related functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate (e.g., for retrieving metadata) or when to use siblings like 'search_models' (for finding models) or 'validate_model' (for checking compatibility).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/hoangdn3/mcp-ocr-fallback'

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