Skip to main content
Glama

x711_llm_routing

Read-only

Routes a prompt to the best available LLM. Two backends:

  1. DEFAULT — Hugging Face (Qwen2.5-7B, free with API key)

  2. PREMIUM — OpenVecta (GLM-5.2 and more, set provider:'openvecta')

Use ONLY when you need external LLM help. Never for things you can answer from context.

Returns: { response: string, model: string, provider: string, tokens_used?: number }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel name. For OpenVecta: 'glm-5.2' (default). For HuggingFace: 'Qwen/Qwen2.5-7B-Instruct' (default). Setting a glm-* model automatically routes to OpenVecta.
queryNoAlias for prompt (use either prompt or query).
promptNoComplete prompt with all necessary context. The model has no memory of prior tool calls. Max ~4000 tokens recommended.
systemNoOptional system prompt injected before the user message.
providerNo'huggingface' (default, free with key) or 'openvecta' (premium inference via x711 × OpenVecta).
max_tokensNoMax tokens to generate. Default 512, max 4096. Size to your workload — cost ceiling is based on this value.
temperatureNoSampling temperature 0-2. Default 0.7.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
modelYes
preferNo
tokens_usedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / max_tokens
      Added value: +{
      +  "description": "Max tokens to generate. Default 512, max 4096. Size to your workload — cost ceiling is based on this value.",
      +  "type": "number"
      +}
    • addedInput schema / properties / model
      Added value: +{
      +  "description": "Model name. For OpenVecta: 'glm-5.2' (default). For HuggingFace: 'Qwen/Qwen2.5-7B-Instruct' (default). Setting a glm-* model automatically routes to OpenVecta.",
      +  "type": "string"
      +}
    • removedInput schema / properties / prefer
      Removed value: -{
      -  "description": "'cheap': fastest + lowest cost, good for classification/tagging. 'fast': optimised for <1s latency. 'smart': highest quality reasoning and code generation. Defaults to 'smart'.",
      -  "enum": [
      -    "cheap",
      -    "fast",
      -    "smart"
      -  ],
      -  "type": "string"
      -}
    • addedInput schema / properties / provider
      Added value: +{
      +  "description": "'huggingface' (default, free with key) or 'openvecta' (premium inference via x711 × OpenVecta).",
      +  "enum": [
      +    "huggingface",
      +    "openvecta"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / system
      Added value: +{
      +  "description": "Optional system prompt injected before the user message.",
      +  "type": "string"
      +}
    • addedInput schema / properties / temperature
      Added value: +{
      +  "description": "Sampling temperature 0-2. Default 0.7.",
      +  "type": "number"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "model": {
      +      "type": "string"
      +    },
      +    "prefer": {
      +      "type": "string"
      +    },
      +    "text": {
      +      "type": "string"
      +    },
      +    "tokens_used": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "text",
      +    "model"
      +  ],
      +  "type": "object"
      +}
  3. Changed4 schema fields changed
    • changedInput schema / properties / prefer / description
      Previous value: -"Model selection preference. 'cheap': GPT-4o-mini class, lowest cost, good for simple tasks. 'fast': optimised for latency <1s. 'smart': GPT-4o / Claude class, best for reasoning and code. Defaults to 'smart' if omitted."New value: +"'cheap': fastest + lowest cost, good for classification/tagging. 'fast': optimised for <1s latency. 'smart': highest quality reasoning and code generation. Defaults to 'smart'."
    • changedInput schema / properties / prompt / description
      Previous value: -"The complete prompt or instruction to send to the LLM. Include all necessary context — the model has no memory of prior tool calls."New value: +"Complete prompt with all necessary context. The model has no memory of prior tool calls. Max ~4000 tokens recommended."
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Alias for prompt (use either prompt or query).",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "prompt"
      -]New value: +[]
  4. Changed2 schema fields changed
    • changedInput schema / properties / prefer / description
      Previous value: -"'cheap' — lowest cost model; 'fast' — lowest latency; 'smart' — highest capability (default: smart)."New value: +"Model selection preference. 'cheap': GPT-4o-mini class, lowest cost, good for simple tasks. 'fast': optimised for latency <1s. 'smart': GPT-4o / Claude class, best for reasoning and code. Defaults to 'smart' if omitted."
    • changedInput schema / properties / prompt / description
      Previous value: -"The full prompt or instruction to send to the LLM."New value: +"The complete prompt or instruction to send to the LLM. Include all necessary context — the model has no memory of prior tool calls."
  5. Changed2 schema fields changed
    • addedInput schema / properties / prefer / description
      Added value: +"'cheap' — lowest cost model; 'fast' — lowest latency; 'smart' — highest capability (default: smart)."
    • addedInput schema / properties / prompt / description
      Added value: +"The full prompt or instruction to send to the LLM."
  6. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, which cover safety. The description adds valuable behavioral context: the model has no memory of prior tool calls, there are two backend options with different cost models, and the response shape is disclosed. It does not mention rate limits or auth details, but the bar is lower given the annotations.

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 well-structured and concise, with numbered backends, a clear usage directive, and a return format. Every sentence contributes to understanding the tool, and it is front-loaded with the core 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 schema covers all parameters and the annotation declare safety, the description is fairly complete. It covers usage, backends, and return shape. However, it does not explain criteria for choosing 'best available' LLM or mention potential error/fallback behavior, leaving a small gap for a routing tool.

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

Parameters3/5

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

Schema description coverage is 100%, so parameter semantics are fully handled by the schema. The description itself adds little beyond highlighting the prompt/query alias and the cost-ceiling note for max_tokens, which is already in the schema. Baseline 3 is appropriate.

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 the tool's purpose: 'Routes a prompt to the best available LLM.' It specifies two backends (Hugging Face and OpenVecta) with specific models, and explicitly differentiates from context-answering tools with the warning 'Never for things you can answer from context.'

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?

Provides clear usage context: 'Use ONLY when you need external LLM help. Never for things you can answer from context.' This is a strong when/when-not boundary, but it does not explicitly name alternative sibling tools such as x711_ask_clerk or x711_web_search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources