Skip to main content
Glama

llm_auto

Routes AI tasks to the optimal model across 20+ providers, selecting by task type and budget. Tracks cumulative savings persistently in SQLite, even from hosts without client-side hooks.

Instructions

Auto-routing wrapper with persistent savings tracking — works from any host.

Equivalent to llm_route but additionally:
- Flushes pending hook-written savings records into SQLite before routing.
- Appends a compact savings envelope every 5 calls so you can see the
  cumulative value across all sessions and hosts without running llm_savings.

Use llm_auto instead of llm_route when you are in a host that lacks a
UserPromptSubmit hook (Codex CLI, Claude Desktop, GitHub Copilot) — the
savings are tracked server-side, so they accumulate correctly regardless of
which client triggered the call.

Args:
    prompt: The task or question to route.
    task_type: Optional hint — "query", "research", "generate", "analyze", "code".
    profile_override: Force a routing profile — "budget", "balanced", or "premium".
    system_prompt: Optional system instructions.
    context: Optional conversation context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
task_typeNo
profile_overrideNo
system_promptNo
contextNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses key behaviors (flushes savings, appends envelope every 5 calls, server-side tracking) beyond basic purpose. However, the underlying routing behavior is only implied via equivalence to llm_route, not fully detailed.

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?

Well-structured with a clear summary, bullet points for additions, usage guidance, and an args list. Slightly verbose but each section adds value; front-loaded with key action.

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

Completeness4/5

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

Given the presence of an output schema and absence of annotations, the description covers purpose, usage, parameters, and key behavioral differences from siblings. Lacks details on error conditions or return format, but output schema fills that gap.

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?

With 0% schema description coverage, the description provides complete parameter explanations, including allowed values for task_type and profile_override, fully compensating for the schema gap.

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 clearly states it is an auto-routing wrapper with persistent savings tracking, and explicitly distinguishes itself from the sibling tool 'llm_route' by listing additional behaviors.

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use 'llm_auto' instead of 'llm_route' (when host lacks a UserPromptSubmit hook) and names specific clients, making the selection unambiguous.

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