Skip to main content
Glama

List AI Models

list-ai-models

Discover available AI models and their configuration status to select the right provider for your task through the Ultra MCP server interface.

Instructions

List all available AI models and their configuration status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler method in AIToolHandlers class that implements the 'list-ai-models' tool logic. It retrieves available models and configured providers from ProviderManager, formats a markdown list with status indicators, and returns the response in MCP format.
    async handleListModels() {
      const availableModels = this.providerManager.getAvailableModels();
      const configuredProviders = await this.providerManager.getConfiguredProviders();
    
      let response = "## Available AI Models\n\n";
      
      for (const [provider, models] of Object.entries(availableModels)) {
        const isConfigured = configuredProviders.includes(provider);
        response += `### ${provider.charAt(0).toUpperCase() + provider.slice(1)} ${isConfigured ? "✅" : "❌"}\n`;
        
        if (models.length > 0) {
          response += models.map(model => `- ${model}`).join("\n");
        } else {
          response += "- Not configured";
        }
        response += "\n\n";
      }
    
      response += `\n## Default Models\n`;
      response += `- OpenAI/Azure: gpt-5 (optimized for reasoning)\n`;
      response += `- Gemini: gemini-2.5-pro (with Google Search enabled)\n`;
      response += `- Grok: grok-4 (latest xAI model with reasoning support)\n`;
    
      return {
        content: [
          {
            type: "text",
            text: response,
          },
        ],
      };
    }
  • src/server.ts:274-282 (registration)
    Registers the 'list-ai-models' tool with the MCP server using server.registerTool, providing title, description, empty input schema, and an inline handler that delegates to AIToolHandlers.handleListModels() via getHandlers().
    // Register list-ai-models tool
    server.registerTool("list-ai-models", {
      title: "List AI Models",
      description: "List all available AI models and their configuration status",
      inputSchema: {},
    }, async () => {
      const aiHandlers = await getHandlers();
      return await aiHandlers.handleListModels();
    });
  • Defines the tool schema and metadata for 'list-ai-models' (empty input schema) as part of the getToolDefinitions() method export, likely used for MCP tool discovery.
      name: "list-ai-models",
      description: "List all available AI models and their configuration status",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • The getHandlers() function lazily initializes and returns the AIToolHandlers instance, loading configs and ProviderManager, which is called by the tool registration to access handleListModels().
    async function getHandlers() {
      if (!handlers) {
        const { ConfigManager } = require("./config/manager");
        const { ProviderManager } = require("./providers/manager");
        const { AIToolHandlers } = require("./handlers/ai-tools");
        
        const configManager = new ConfigManager();
        
        // Load config and set environment variables
        const config = await configManager.getConfig();
        if (config.openai?.apiKey) {
          process.env.OPENAI_API_KEY = config.openai.apiKey;
        }
        if (config.openai?.baseURL) {
          process.env.OPENAI_BASE_URL = config.openai.baseURL;
        }
        if (config.google?.apiKey) {
          process.env.GOOGLE_API_KEY = config.google.apiKey;
        }
        if (config.google?.baseURL) {
          process.env.GOOGLE_BASE_URL = config.google.baseURL;
        }
        if (config.azure?.apiKey) {
          process.env.AZURE_API_KEY = config.azure.apiKey;
        }
        if (config.azure?.baseURL) {
          process.env.AZURE_BASE_URL = config.azure.baseURL;
        }
        if (config.xai?.apiKey) {
          process.env.XAI_API_KEY = config.xai.apiKey;
        }
        if (config.xai?.baseURL) {
          process.env.XAI_BASE_URL = config.xai.baseURL;
        }
        
        providerManager = new ProviderManager(configManager);
        handlers = new AIToolHandlers(providerManager);
      }
      
      return handlers;
    }
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 'List' implies a read-only operation, the description doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the output takes. For a tool with zero annotation coverage, this is inadequate.

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 any fluff. It's appropriately sized and front-loaded, with every word contributing to clarity.

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's simplicity (0 parameters, no output schema, no annotations), the description is minimally complete. However, it lacks behavioral details like output format or authentication requirements, which would be helpful for an agent. The absence of an output schema means the description should ideally hint at return values, but it doesn't.

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%, so there's no need for parameter documentation in the description. The description appropriately doesn't mention parameters, which is correct for a parameterless tool, earning a baseline score of 4.

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 ('List') and resource ('all available AI models and their configuration status'), making the purpose unambiguous. However, it doesn't explicitly differentiate this tool from potential sibling tools that might also list models, though none appear in the provided sibling list.

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. It doesn't mention prerequisites, context for usage, or any exclusions. With no annotations and many sibling tools, this lack of guidance is a significant gap.

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/RealMikeChong/ultra-mcp'

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