Skip to main content
Glama

llm_query

Routes your question to the most suitable LLM based on complexity or explicit model choice, balancing cost and capability.

Instructions

Send a general query to the best available LLM.

Routes by complexity: simple→Haiku/Flash, moderate→Sonnet/GPT-4o, complex→Opus/o3.

Args: prompt: The question or prompt to send. complexity: Task complexity — "simple", "moderate", or "complex". Drives model selection: simple→cheap (Haiku/Flash), moderate→balanced (Sonnet/GPT-4o), complex→premium (Opus/o3). Auto-detected from prompt length when omitted. model: Explicit model override, bypasses complexity routing entirely. system_prompt: Optional system instructions. temperature: Sampling temperature (0.0-2.0). max_tokens: Maximum output tokens. context: Optional conversation context to help the model understand the broader task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
complexityNo
modelNo
system_promptNo
temperatureNo
max_tokensNo
contextNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses the routing behavior, auto-detection of complexity from prompt length, and the model override. It does not mention rate limits or authorization, but as a query tool, it is likely read-only.

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 concise: a one-sentence overview followed by a clear bullet list of parameters. Every sentence adds value without redundancy.

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?

With 7 parameters and an output schema, the description covers all parameters adequately. The behavior and routing are well explained. Slightly more detail on return values could be added, but the output schema likely covers that.

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?

Schema coverage is 0%, so the description must add meaning. It explains all 7 parameters: prompt, complexity (with auto-detect logic), model (override), system_prompt, temperature, max_tokens, and context. This adds significant value beyond the bare 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 clearly states 'Send a general query to the best available LLM' and explains the routing by complexity. It distinguishes itself from specialized siblings (e.g., llm_code, llm_image) by being the general-purpose query tool.

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 explains when to use (general queries) and details the complexity parameter that drives model selection. It also notes the model override. However, it does not explicitly list when not to use or suggest alternatives among the many specialized llm_* tools.

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