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

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel 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.
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. 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
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only give the generic readOnly/openWorld/idempotent/destructive flags; the description adds the cost model (bills prompt and completion tokens to the API key), the two failure modes (no key -> error, no balance -> insufficient_credits), and two behavioral traits not in any structured field: it is not streamed and keeps no memory between calls. This is exactly the extra context annotations cannot carry.

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?

Front-loaded with the core action, then cost, then failure modes, then return shape and statelessness. Every sentence carries distinct, non-redundant information despite the length.

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?

With no output schema, the description supplies the return shape (choices[0].message.content, usage token counts), the cost and error behavior, and the statelessness constraint — everything an agent needs to call this correctly and interpret the result.

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 coverage is 100%, so the baseline is 3, and the description adds genuine meaning beyond it by explaining that the tool is stateless and the full message history must be resent each call, which reframes the 'messages' parameter. It also clarifies the billing/header context, though it adds nothing new for max_tokens or temperature beyond the 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?

States a specific verb and resource (send a conversation to a model, get the reply) and further scopes it as 'the only tool here that costs money,' which cleanly separates it from synap_estimate_cost, synap_get_model, and synap_list_models. An agent can identify the tool without opening the schema.

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?

Explicitly states when to use it ('text generated, code written or a question answered by one of the open models') and names the alternative plus its trigger condition ('Call synap_estimate_cost first if the price matters'). Both the use case and the routing decision are spelled out.

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