Skip to main content
Glama

complete

Sends a prompt through a named upstream model route to generate text, blocks PII or secrets locally before network calls, and returns JSON with fallback suggestions.

Instructions

Call a named upstream route to generate text. Params: route (required), prompt (required), optional system, model, reasoning_level (none|minimal|low|medium|high|xhigh|max), max_tokens, temperature (only sent if provided; some reasoning models reject it). Locally blocks prompts containing PII, secrets, contract bodies, or unpublished financial figures before any network call. Returns JSON: {ok, route, protocol, model, reasoning_level, text, usage?, error?, safety_blocked?, suggest_local_fallback?, attempted_routes?, cross_route_used?}. If ok=false and suggest_local_fallback=true (timeout, overload, empty, or upstream error), the caller can finish with its own model. safety_blocked means do NOT fall back with the same sensitive prompt. Optional cross_route (default true): when the intent model matches config cross_route_fallbacks, failed entry route retries other sites with the SAME model; set false to pin to one route.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "route": "<route>",
      "prompt": "<prompt>"
    },
    "name": "complete"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo
routeYes
promptYes
systemNo
max_tokensNo
cross_routeNo
temperatureNo
reasoning_levelNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses a local pre-flight PII/secrets/contract/financial-figure block before any network call, notes that temperature is only forwarded and may be rejected by reasoning models, and explains cross-route retry semantics with the same model. It also clarifies that safety_blocked forbids retrying the sensitive prompt, which is exactly the kind of non-obvious behavior an agent would otherwise get wrong.

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 functional content is front-loaded and each behavioral clause earns its place, but the definition is a dense single block with heavy parenthetical use. Enumerating the full return JSON shape is partly wasted since an output schema already exists, even though the follow-up sentences explaining safety_blocked and suggest_local_fallback add genuine value.

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 an eight-parameter, unannotated mutation-of-state call with real safety consequences, the definition covers invocation, safety blocking, error/fallback paths, and cross-route behavior. An agent has everything needed to call it correctly and to interpret a failure without guessing.

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 description coverage is 0% and no enums are declared, so the description must compensate — and it does. It enumerates all eight parameters, supplies the reasoning_level enum values (none|minimal|low|medium|high|xhigh|max) that the schema omits, marks route and prompt required, and explains temperature's conditional transmission plus cross_route's default of true.

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 opening sentence gives a specific verb and resource: 'Call a named upstream route to generate text.' That is enough for an agent to distinguish this completion tool from the sibling 'list_routes', which by name alone is a discovery operation rather than an execution one.

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 supplies real decision guidance: use suggest_local_fallback when ok=false for timeout/overload/empty/upstream error, and do NOT fall back when safety_blocked. It also explains when to set cross_route=false to pin to one route. It stops short of stating prerequisites (auth, how routes are discovered) or an explicit 'use list_routes first' instruction, which keeps it at 4 rather than 5.

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

Deploy Server

Other Tools