Skip to main content
Glama

list_models

Retrieve all available AI models from multiple providers through a unified interface to enable model selection and switching.

Instructions

List all available AI models.

    Returns:
        List of available model names
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'list_models'. Registers the tool via @mcp.tool() decorator and implements the logic by calling ai_client.list_models() after checking initialization.
    @mcp.tool()
    async def list_models() -> list[str]:
        """List all available AI models.
    
        Returns:
            List of available model names
        """
        global ai_client
    
        if ai_client is None:
            raise RuntimeError("AI client not initialized")
    
        return ai_client.list_models()
  • AIClient helper method that lists available models by delegating to the config's list_available_models().
    def list_models(self) -> list[str]:
        """List all available models."""
        return self.config.list_available_models()
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. While it states the tool lists models and returns a list of names, it doesn't describe important behavioral aspects like whether this is a read-only operation, if there are rate limits, authentication requirements, or how the list is structured (e.g., pagination, sorting). The description is minimal and lacks behavioral context.

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 very concise with two sentences: one stating the purpose and one describing the return value. It's front-loaded with the main action. However, the formatting with indentation and a 'Returns:' section is slightly verbose for such a simple tool, but not wasteful.

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

Completeness3/5

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

Given the tool has 0 parameters, 100% schema coverage, and an output schema exists, the description is adequate but minimal. It covers the basic purpose and return type, but lacks context on usage guidelines and behavioral traits. For a simple list tool, this might be sufficient, but it could benefit from more guidance on when to use it versus siblings.

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?

The tool has 0 parameters, and schema description coverage is 100% (empty schema). The description doesn't need to explain any parameters, which is appropriate. It focuses on the return value instead, which adds value beyond the input schema.

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's purpose with a specific verb ('List') and resource ('all available AI models'). It distinguishes from 'get_model_info' by focusing on listing all models rather than getting detailed information about a specific one. However, it doesn't explicitly differentiate from 'chat' beyond the obvious functional difference.

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 'get_model_info' or 'chat'. It doesn't mention any prerequisites, context, or exclusions for usage. The agent must infer usage from the tool name and description alone.

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/feiskyer/mcp-ai-hub'

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