Skip to main content
Glama

list_models

Register available AI models and API keys for a workspace by scanning environment variables for Anthropic, Gemini, OpenAI, and local Ollama instances.

Instructions

Register available AI models and API keys for this workspace.

Call once after start_web_app. Scan your environment for API keys and Ollama:

  1. process.env.ANTHROPIC_API_KEY → add claude-haiku-4-5-20251001, claude-sonnet-4-6, claude-opus-4-8

  2. process.env.GEMINI_API_KEY → add gemini-2.5-flash-lite, gemini-2.5-flash, gemini-2.5-pro

  3. process.env.OPENAI_API_KEY → add gpt-4o-mini, gpt-4o

  4. Ollama: fetch (process.env.OLLAMA_URL ?? "http://localhost:11434") + "/api/tags" → add each model.name; catch errors silently

Default model priority (first available wins): gemini-2.5-flash-lite → claude-haiku-4-5-20251001 → gpt-4o-mini

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYes
modelsYesAll model IDs available in your environment
defaultModelNoOverride the priority-based default
anthropicApiKeyNo
geminiApiKeyNo
openaiApiKeyNo
Behavior4/5

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

With no annotations provided, the description carries the full burden. It clearly discloses the tool's scanning behavior: checking environment variables for API keys and fetching Ollama models, with error handling for Ollama. It also specifies default model priority. However, it omits return value or side effects like overwriting existing models.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured as a numbered list, making steps easy to follow. However, it is somewhat verbose for the amount of information conveyed, repeating context about each API key. It could be tightened.

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 complexity (6 parameters, no output schema, no annotations), the description covers detection logic and ordering but lacks clarity on input-output behavior, return value, and idempotence. It is partially complete but leaves gaps.

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

Parameters2/5

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

Schema description coverage is only 33%, and the description does not clarify the purpose of key parameters like 'anthropicApiKey' or 'models.' The description implies auto-detection, but the required 'models' parameter suggests user input, creating confusion. The description adds little value beyond 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 'Register available AI models and API keys for this workspace,' providing a specific verb and resource. However, the tool name 'list_models' conflicts with the described action of registration, causing slight confusion. The description differentiates from sibling 'register_api_key' by including model registration.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description advises to 'Call once after start_web_app,' indicating a specific context. However, it does not explicitly state when not to use the tool or compare it to alternatives like 'register_api_key' for API-only registration. The guidance is present but minimal.

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/jurek-f/prompt-lab-mcp'

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