Skip to main content
Glama
lumishoang

OpenRouter MCP Server

by lumishoang

get_model

Retrieve detailed information about a specific AI model by providing its model slug, including pricing, context limits, and capabilities.

Instructions

Get detailed info for one model.

Args: model_id: Model slug, e.g. 'anthropic/claude-sonnet-4.6'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_model tool handler: fetches models, looks up by exact ID, falls back to fuzzy match, and returns formatted model details.
    @mcp.tool()
    def get_model(model_id: str) -> str:
        """Get detailed info for one model.
    
        Args:
            model_id: Model slug, e.g. 'anthropic/claude-sonnet-4.6'
        """
        models = fetch_models()
        for m in models:
            if m["id"] == model_id:
                return _format_model(m, detail=True)
        # Fuzzy
        matches = [m for m in models if model_id.lower() in m["id"].lower()]
        if matches:
            return _format_model(matches[0], detail=True)
        return f"Model '{model_id}' not found on OpenRouter."
  • Registration of get_model as an MCP tool via @mcp.tool() decorator.
    @mcp.tool()
  • Re-export of get_model from the package __init__.
    from .server import main, fetch_models, list_models, get_model, search_models, compare_models, refresh_cache
Behavior3/5

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

No annotations are provided, so the description must disclose behavior. It states a simple read operation with no side effects, which is accurate but lacks details on potential errors (e.g., if model_id doesn't exist) or caching behavior. The safety profile is implied but not explicit.

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 extremely concise – one line plus a parameter note – without wasted words. While it lacks formal structure, it efficiently conveys the essential information for a simple getter tool.

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

Completeness4/5

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

Given the tool has one parameter and an output schema, the description covers the core purpose and parameter explanation. Minor omissions like error handling or existence checks could be included, but overall it is sufficient for a straightforward operation.

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

Parameters4/5

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

Schema description coverage is 0%, but the description adds an example value for model_id ('anthropic/claude-sonnet-4.6') and clarifies it must be a model slug. This significantly improves understanding beyond the schema's bare 'Model Id' title.

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

Purpose5/5

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

The description clearly states the tool retrieves detailed info for one model, using a specific verb ('Get') and resource ('detailed info for one model'). It distinguishes itself from siblings like list_models (multiple models) and compare_models (comparison).

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?

No explicit guidance on when to use this tool versus alternatives like list_models or search_models. The description only states what it does, leaving the agent to infer context without any directional cues.

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

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