Skip to main content
Glama
akiojin

Model Hub MCP

by akiojin

list_all_models

Retrieve all available AI models from configured providers like OpenAI, Anthropic, and Google through a unified interface.

Instructions

List all available models from all configured providers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_all_models' tool. It aggregates models from all configured providers (OpenAI, Anthropic, Google) by calling their respective listModels methods, handles errors for each, and returns a JSON string of the results.
    case 'list_all_models': {
      const results: any = {};
      
      if (openaiProvider) {
        try {
          results.openai = await openaiProvider.listModels();
        } catch (error) {
          results.openai = { error: error instanceof Error ? error.message : 'Failed to fetch OpenAI models' };
        }
      }
      
      if (anthropicProvider) {
        try {
          results.anthropic = await anthropicProvider.listModels();
        } catch (error) {
          results.anthropic = { error: error instanceof Error ? error.message : 'Failed to fetch Anthropic models' };
        }
      }
      
      if (googleProvider) {
        try {
          results.google = await googleProvider.listModels();
        } catch (error) {
          results.google = { error: error instanceof Error ? error.message : 'Failed to fetch Google models' };
        }
      }
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(results, null, 2),
          },
        ],
      };
    }
  • src/index.ts:70-77 (registration)
    Registration of the 'list_all_models' tool in the ListToolsRequestSchema handler, including name, description, and empty input schema (no parameters required).
    {
      name: 'list_all_models',
      description: 'List all available models from all configured providers',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Input schema for the 'list_all_models' tool, which is an empty object (no input parameters). Note: this overlaps with registration.
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool lists models but doesn't describe return format (e.g., structure, pagination), performance characteristics, or potential side effects. This is inadequate for a tool that presumably returns data, as agents need to understand what to expect from the output.

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 unnecessary words. It's appropriately sized and front-loaded, with every element contributing to understanding the tool's scope and action.

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 the return value looks like (e.g., list format, fields included), which is critical for an agent to use the tool effectively. The description alone leaves significant gaps in understanding the tool's behavior and output.

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 zero parameters, and schema description coverage is 100% (though trivial since there are no parameters). The description adds no parameter information, which is appropriate here. A baseline of 4 is given for zero-parameter tools, as there's nothing to document beyond what's already clear from the 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 action ('List') and resource ('all available models from all configured providers'), providing specific scope information. However, it doesn't explicitly differentiate from sibling tools 'get_model' (likely retrieves a single model) and 'list_models' (potentially has different filtering or scope), which prevents a perfect score.

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 the sibling tools 'get_model' or 'list_models'. There's no mention of alternatives, prerequisites, or context for choosing this specific listing function over others, leaving usage decisions ambiguous.

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/akiojin/model-hub-mcp'

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