Skip to main content
Glama
th3nolo

OpenRouter MCP Server

by th3nolo

get_model_info

Retrieve detailed specifications and pricing information for any AI model available through OpenRouter to evaluate capabilities and costs.

Instructions

Get detailed information about a specific model

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel ID to get information about

Implementation Reference

  • The actual implementation of get_model_info tool. This method fetches all models from OpenRouter API, finds the requested model by ID, and returns its detailed information. Throws an error if the model is not found.
    private async getModelInfo(params: { model: string }) {
      const response = await axios.get(`${OPENROUTER_CONFIG.baseURL}/models`, {
        headers: OPENROUTER_CONFIG.headers,
      });
    
      const model = response.data.data.find((m: any) => m.id === params.model);
    
      if (!model) {
        throw new Error(`Model ${params.model} not found`);
      }
    
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(model, null, 2),
          },
        ],
      };
    }
  • src/server.ts:203-216 (registration)
    Tool registration in ListToolsRequestSchema handler. Defines the tool name 'get_model_info', its description, and the inputSchema specifying a required 'model' string parameter.
    {
      name: "get_model_info",
      description: "Get detailed information about a specific model",
      inputSchema: {
        type: "object",
        properties: {
          model: {
            type: "string",
            description: "Model ID to get information about",
          },
        },
        required: ["model"],
      },
    },
  • src/server.ts:233-234 (registration)
    Tool invocation handler in CallToolRequestSchema switch statement. Routes 'get_model_info' requests to the getModelInfo method with the model parameter.
    case "get_model_info":
      return await this.getModelInfo(args as { model: string });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'gets' information, implying a read-only operation, but doesn't clarify if it requires authentication, has rate limits, returns structured data, or handles errors. This leaves significant gaps for a tool with no annotation coverage.

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

Conciseness4/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 function without unnecessary words. It could be slightly improved by front-loading key details like the required parameter, but it's appropriately sized and clear.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' includes, how results are structured, or behavioral aspects like error handling. For a tool with rich potential output and no structured support, more context is needed.

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 input schema has 100% description coverage, with the 'model' parameter documented as 'Model ID to get information about'. The description adds no additional meaning beyond this, such as format examples or valid ID sources. Baseline 3 is appropriate since the schema does the heavy lifting.

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 explicitly differentiate from sibling tools like 'list_models' (which might provide summary vs detailed info) or 'compare_models' (which might compare multiple models), missing full sibling distinction.

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 like 'list_models' or 'compare_models'. It doesn't mention prerequisites, such as needing a model ID, or context for when detailed info is required over other operations.

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/th3nolo/openrouter-mcp'

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