Skip to main content
Glama
stabgan

OpenRouter MCP Multimodal Server

get_model_info

Read-onlyIdempotent

Query specifications and capabilities of any AI model to verify its parameters and supported features.

Instructions

Get details about a specific model

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes

Implementation Reference

  • The main handler function for the 'get_model_info' tool. Extracts the 'model' argument from the request, optionally refreshes the model cache via the API client, validates the cache, looks up the model by ID, and returns its info as JSON text.
    export async function handleGetModelInfo(
      request: { params: { arguments: { model: string } } },
      modelCache: ModelCache,
      apiClient?: OpenRouterAPIClient,
    ) {
      const { model } = request.params.arguments ?? { model: '' };
    
      if (!model || typeof model !== 'string') {
        return toolError(ErrorCode.INVALID_INPUT, 'model is required.');
      }
    
      if (apiClient) {
        try {
          await modelCache.ensureFresh(() => apiClient.getModels());
        } catch (error: unknown) {
          return classifyUpstreamError(error, 'get_model_info');
        }
      }
    
      if (!modelCache.isValid()) {
        return toolError(ErrorCode.INTERNAL, 'No model data available.');
      }
    
      const info = modelCache.get(model);
      if (!info) {
        return toolError(ErrorCode.MODEL_NOT_FOUND, `Model '${model}' not found.`);
      }
    
      return { content: [{ type: 'text' as const, text: JSON.stringify(info, null, 2) }] };
    }
  • Registration and input schema for the 'get_model_info' tool. Defines the tool name, description, annotations (readOnlyHint, destructiveHint, idempotentHint), and inputSchema requiring a 'model' string.
    {
      name: 'get_model_info',
      description: 'Get details about a specific model',
      annotations: {
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
      },
      inputSchema: {
        type: 'object',
        properties: { model: { type: 'string' } },
        required: ['model'],
  • The case branch in the tool dispatcher that routes 'get_model_info' requests to handleGetModelInfo.
    case 'get_model_info':
      return handleGetModelInfo(
        wrapToolArgs(args as { model: string } | undefined),
        this.modelCache,
        this.apiClient,
      );
  • Import binding that connects the tool-handlers module to the handleGetModelInfo function.
    import { handleGetModelInfo } from './tool-handlers/get-model-info.js';
    import { handleValidateModel } from './tool-handlers/validate-model.js';
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, which cover the behavioral profile. The description adds no additional behavioral context beyond stating it retrieves details, so it meets the baseline but does not exceed annotations.

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 concise sentence with no redundant words. However, it is slightly too brief and could benefit from additional context without becoming verbose.

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 output schema and a single parameter, the description should at least hint at what kind of details are returned (e.g., capabilities, metadata). The current description is too minimal to fully inform an agent about the tool's output or usage prerequisites.

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

Parameters2/5

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

The input schema has one parameter 'model' with no description, and the tool description does not clarify what the parameter expects (e.g., model name, ID, or exact string). With 0% schema description coverage, the description should compensate but fails to add meaning.

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 tool gets details about a specific model, which distinguishes it from siblings like search_models (searching for models) and other generation tools. However, it does not specify what constitutes 'details', leaving some ambiguity.

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 search_models, nor does it mention when to avoid using it. No context or exclusions are given.

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

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