Skip to main content
Glama

llm_setup

Configure API keys, install auto-routing hooks, and manage provider connections for intelligent LLM routing. Set up credentials, test endpoints, and enable automated model selection across 20+ AI providers.

Instructions

Set up and manage API providers, hooks, and routing enforcement.

Actions:
- "status": Show which providers are configured and which are missing
- "guide": Step-by-step guide to add recommended free/cheap providers
- "discover": Scan for existing API keys in environment (safe, read-only)
- "add": Add an API key for a provider (writes to .env file securely)
- "test": Validate API keys with a minimal call (tests configured or specific provider)
- "provider": Show details about a specific provider
- "install_hooks": Install auto-routing hooks globally (every Claude Code session)
- "uninstall_hooks": Remove auto-routing hooks

Args:
    action: What to do — "status", "guide", "discover", "add", "test", "provider", "install_hooks", or "uninstall_hooks".
    provider: Provider name (for "add", "test", and "provider" actions).
    api_key: API key value (for "add" action only). Key is validated before saving.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNostatus
providerNo
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 and discloses important behavioral traits: 'writes to .env file securely' and 'safe, read-only' for the discover action, 'Key is validated before saving,' and global scope for hooks. It misses minor details like error handling or idempotency, but covers the critical safety and side-effect concerns.

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 well-structured with a front-loaded purpose statement followed by actionable bullet points. The Args section efficiently maps parameters to specific actions. Minor redundancy exists between the bullet points and Args descriptions, but this is justified given the zero schema coverage and multi-modal nature of the tool.

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

Completeness5/5

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

For a complex 8-mode tool with 0% schema coverage, the description is remarkably complete. It documents every action's behavior, all parameter constraints, and side effects (file writes, global installation). Since an output schema exists, the description appropriately omits return value documentation, focusing instead on input semantics and operational modes.

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

Parameters5/5

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

Given 0% schema description coverage, the description fully compensates by documenting all three parameters in the Args section: it lists the 8 valid action values, specifies which actions require the 'provider' parameter, and notes that 'api_key' is only for the 'add' action with validation behavior. This provides essential context missing from the structured schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear purpose statement ('Set up and manage API providers, hooks, and routing enforcement') and distinguishes itself from execution-oriented siblings (llm_generate, llm_analyze, etc.) by focusing on configuration management. The 8 bullet points provide specific verb-resource pairs for each action mode.

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

Usage Guidelines4/5

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

The description provides implicit usage guidance through the detailed action breakdown (e.g., when to use 'discover' vs 'add' vs 'test'), allowing the agent to select the correct action based on context. However, it lacks explicit 'when not to use' guidance or differentiation from potentially overlapping siblings like 'llm_providers'.

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/ypollak2/llm-router'

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