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

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()

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