Skip to main content
Glama

Run a chat completion on Synap

synap_chat_completion

Send a conversation to a model on Synap, Linkrra's OpenAI-compatible inference API, and get the model's reply. Use this when you need text generated, code written or a question answered by one of the open models Synap serves. This is the only tool here that costs money: it bills prompt and completion tokens to the Synap API key supplied as the Authorization: Bearer header on the MCP connection. With no key it returns an error and nothing is spent; a key with no balance returns insufficient_credits. Call synap_estimate_cost first if the price matters. Returns the standard OpenAI chat.completion JSON (choices[0].message.content holds the reply, usage holds token counts). The call is not streamed and keeps no memory between calls — send the full message history each time.

Input Schema

NameRequiredDescriptionDefault
modelYesModel id exactly as returned by synap_list_models, e.g. "qwen3-coder-30b". Use "synap-v1" to let Synap pick the cheapest model that can handle the request.
messagesYesThe conversation so far, oldest first. The last message is normally the user turn to answer.
max_tokensNoUpper limit on tokens generated in the reply. Omit to use the model default; lower it to cap cost.
temperatureNoSampling randomness, 0 to 2. Lower is more deterministic. Omit to use the model default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / model / description
      Previous value: -"Model id exactly as returned by synap_list_models, e.g. \"qwen/qwen3-coder-30b-a3b-instruct\". Use \"synap-v1\" to let Synap pick the cheapest model that can handle the request."New value: +"Model id exactly as returned by synap_list_models, e.g. \"qwen3-coder-30b\". Use \"synap-v1\" to let Synap pick the cheapest model that can handle the request."
  2. Changed10 schema fields changed
    • addedInput schema / properties / max_tokens / description
      Added value: +"Upper limit on tokens generated in the reply. Omit to use the model default; lower it to cap cost."
    • addedInput schema / properties / max_tokens / minimum
      Added value: +1
    • addedInput schema / properties / messages / description
      Added value: +"The conversation so far, oldest first. The last message is normally the user turn to answer."
    • addedInput schema / properties / messages / items / properties / content / description
      Added value: +"The message text."
    • addedInput schema / properties / messages / items / properties / role / description
      Added value: +"Who wrote the message: system (instructions), user, or assistant (an earlier model reply)."
    • addedInput schema / properties / messages / minItems
      Added value: +1
    • changedInput schema / properties / model / description
      Previous value: -"Model id — see synap_list_models for the catalogue."New value: +"Model id exactly as returned by synap_list_models, e.g. \"qwen/qwen3-coder-30b-a3b-instruct\". Use \"synap-v1\" to let Synap pick the cheapest model that can handle the request."
    • addedInput schema / properties / temperature / description
      Added value: +"Sampling randomness, 0 to 2. Lower is more deterministic. Omit to use the model default."
    • addedInput schema / properties / temperature / maximum
      Added value: +2
    • addedInput schema / properties / temperature / minimum
      Added value: +0
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With annotations already declaring openWorldHint=true and non-idempotence, the description still adds real behavioral context beyond them: billing of prompt+completion tokens to the connection's API key, two distinct failure modes (missing key -> error with nothing spent, no balance -> insufficient_credits), no streaming, and no memory between calls. This is exactly the kind of disclosure an agent needs before spending money.

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?

Purpose is front-loaded in the first sentence, followed by usage, cost, failure modes, and return shape in a logical order. It is dense with six sentences, but nearly every sentence carries distinct operational value; only the cost/sibling routing sentence slightly overlaps the usage sentence.

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 a paid, non-idempotent inference call with no output schema, the description covers what the agent cannot derive from structured fields: auth requirements, cost model, error semantics, statelessness, and the response payload shape. Nothing material is missing for correct invocation.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, and the description exceeds it by adding the statelessness requirement that forces the agent to resend the full message history each call, plus the return-format mapping (choices[0].message.content, usage). It does not add syntax detail for max_tokens or temperature beyond what the schema already provides.

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 states a specific verb and resource ('Send a conversation to a model on Synap... get the model's reply') and names the concrete capability set (text generation, code, Q&A). It is trivially distinguishable from the sibling tools, which are all read/informational (list models, get model, estimate cost).

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?

It gives explicit when-to-use conditions ('when you need text generated, code written or a question answered') and routes to the alternative 'Call synap_estimate_cost first if the price matters.' The cost caveat ('the only tool here that costs money') sharpens the choice against its free siblings.

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.