Skip to main content
Glama

chat

Destructive

Run a chat completion on Phase Router, paid from the Phase API key or the wallet this server uses (free models cost nothing). Returns the answer, actual price, task id for the receipt and usage.

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": {
      "model": "<model>"
    },
    "name": "chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYesmodel id from list_models, or a class: auto | eco | premium | agentic
promptNosingle user message (use messages for multi-turn)
systemNooptional system prompt
sessionNosaved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn
messagesNofull conversation; overrides prompt/system
max_tokensNooutput cap; also bounds the price ceiling
temperatureNosampling temperature 0–2 (Claude ignores it)

Output Schema

NameRequiredDescriptionDefault
textYes
batchNopayment batch this call was charged to (settled with one transaction later)
levelNo
modelYes
usageYes
paymentYes
sessionNo
task_idYes
tx_hashNo
providerYes
price_usdYes
elapsed_msYes
ceiling_usdNo
receipt_urlNo
session_urlNo
routed_modelNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

The annotations already disclose that this call is not read-only, is destructive and non-idempotent, and the description is consistent with that by explaining the charge comes from the API key or wallet. That adds useful billing context beyond the annotations. However, it leaves unstated what happens on failure (whether credit is still spent), whether spend is capped, and whether the price is fixed per call, which are the details a paying, destructive call most needs.

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?

Two sentences, front-loaded with the action and the payment source, and no wasted phrasing. The telegraphic parentheses ('paid from the Phase API key or the wallet this server uses') are dense but readable and earn their place by conveying cost behavior.

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?

The output schema exists, so the description only needs a brief note on returns, and it supplies one (answer, actual price, task id, usage). For a 7-parameter call, the description also covers the billing consequence, which is the most important thing an agent cannot get from structured fields. It does not explain whether reusing a session costs extra or how model classes differ in price, which is a minor gap.

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 every parameter (model classes auto/eco/premium/agentic, session history behavior, messages overriding prompt/system, max_tokens bounding the price ceiling) is already documented in the schema. The description adds no parameter-level meaning beyond what the schema already provides, so the baseline score of 3 applies.

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

Purpose4/5

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

The description names a specific verb and resource ('Run a chat completion on Phase Router') plus the billing source, so the agent knows exactly what the call does. It stops short of distinguishing itself from siblings such as embed or quote, which is why it falls short of a 5.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus the sibling tools (embed, quote, session, list_models), and no stated preconditions beyond the model being required. The parenthetical that free models cost nothing is cost context rather than routing guidance, so the agent must infer the choice on its own.

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