Skip to main content
Glama

chat_completion

Read-only

Send conversation messages to a chosen LLM provider and receive text completions, letting agents query Anthropic, OpenAI, Together, Replicate, Ollama, or OpenAI-compatible endpoints from one call.

Instructions

Call an LLM for text completion. Providers: anthropic (claude-opus-5-5 / claude-sonnet-5-5), openai (gpt-5.6-luna), together (Together AI), replicate (any Replicate text model), ollama (local, optional), openai_compatible (any /v1/chat/completions server).

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": {
      "messages": "<messages>"
    },
    "name": "chat_completion"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel id. Defaults: claude-sonnet-5-5 (anthropic), gpt-5.6-luna (openai), zai-org/GLM-5.3 (together), qwen/qwen3-235b-a22b-instruct-2507 (replicate), qwen3:14b (ollama), default (openai_compatible). Model aliases: "opus" (claude-opus-5-5), "sonnet" (claude-sonnet-5-5), "haiku" (claude-haiku-5-5). Replicate accepts owner/name, owner/name:version, or a https://replicate.com/owner/name URL.
base_urlNoOnly with provider "openai_compatible": base URL of an OpenAI-compatible /v1 endpoint (e.g. http://localhost:1234/v1). Overrides OPENAI_COMPATIBLE_BASE_URL for this session/call. OPENAI_COMPATIBLE_API_KEY, if set, is sent only to the OPENAI_COMPATIBLE_BASE_URL origin or one listed in ROUNDTABLE_OPENAI_COMPATIBLE_TRUSTED_ORIGINS; any other base URL gets no Authorization header and must be https (http only to loopback, or to private addresses with ROUNDTABLE_ALLOW_PRIVATE_BASE_URLS=1), never a cloud metadata or (without that setting) private address.
messagesYesArray of messages in the conversation.
providerNoLLM provider to use. Default: openai. Options: anthropic; openai; together (Together AI — any Together model id, e.g. zai-org/GLM-5.3 or Qwen/...); replicate (owner/name, owner/name:version, or https://replicate.com/owner/name); ollama (local, only when reachable); openai_compatible (any /v1/chat/completions server — set OPENAI_COMPATIBLE_BASE_URL or pass base_url).
max_tokensNoMaximum tokens in the response (integer, 1-32768). Default: ROUNDTABLE_MAX_TOKENS (8192). Thinking/reasoning tokens count against this.
temperatureNoSampling temperature (0-2). Ignored for anthropic (current Claude models reject it); some OpenAI reasoning models reject it too. Replicate: sent only when the model's schema declares it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv2.0.0
    • changedInput schema / properties / base_url / description
      Previous value: -"Only with provider \"openai_compatible\": base URL of an OpenAI-compatible /v1 endpoint (e.g. http://localhost:1234/v1). Overrides OPENAI_COMPATIBLE_BASE_URL for this session/call. OPENAI_COMPATIBLE_API_KEY, if set, is sent as the bearer token to whichever base URL is used."New value: +"Only with provider \"openai_compatible\": base URL of an OpenAI-compatible /v1 endpoint (e.g. http://localhost:1234/v1). Overrides OPENAI_COMPATIBLE_BASE_URL for this session/call. OPENAI_COMPATIBLE_API_KEY, if set, is sent only to the OPENAI_COMPATIBLE_BASE_URL origin or one listed in ROUNDTABLE_OPENAI_COMPATIBLE_TRUSTED_ORIGINS; any other base URL gets no Authorization header and must be https (http only to loopback, or to private addresses with ROUNDTABLE_ALLOW_PRIVATE_BASE_URLS=1), never a cloud metadata or (without that setting) private address."
    • changedInput schema / properties / max_tokens / description
      Previous value: -"Maximum tokens in the response. Default: ROUNDTABLE_MAX_TOKENS (8192). Thinking/reasoning tokens count against this."New value: +"Maximum tokens in the response (integer, 1-32768). Default: ROUNDTABLE_MAX_TOKENS (8192). Thinking/reasoning tokens count against this."
    • addedInput schema / properties / max_tokens / maximum
      Added value: +32768
    • addedInput schema / properties / max_tokens / minimum
      Added value: +1
    • changedInput schema / properties / max_tokens / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / model / description
      Previous value: -"Model id. Defaults: claude-opus-5 (anthropic), gpt-5.6-luna (openai), zai-org/GLM-5.3 (together), qwen/qwen3-235b-a22b-instruct-2507 (replicate), qwen3:14b (ollama), default (openai_compatible). Anthropic also accepts the aliases \"opus\" (claude-opus-5) and \"sonnet\" (claude-sonnet-5). Replicate accepts owner/name, owner/name:version, or a https://replicate.com/owner/name URL."New value: +"Model id. Defaults: claude-sonnet-5-5 (anthropic), gpt-5.6-luna (openai), zai-org/GLM-5.3 (together), qwen/qwen3-235b-a22b-instruct-2507 (replicate), qwen3:14b (ollama), default (openai_compatible). Model aliases: \"opus\" (claude-opus-5-5), \"sonnet\" (claude-sonnet-5-5), \"haiku\" (claude-haiku-5-5). Replicate accepts owner/name, owner/name:version, or a https://replicate.com/owner/name URL."
    • addedInput schema / properties / temperature / maximum
      Added value: +2
    • addedInput schema / properties / temperature / minimum
      Added value: +0
  2. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=false and destructiveHint=false, so the agent knows this is a non-mutating external call that is not repeatable-safe. The description adds provider reach and locality notes ('ollama (local, optional)'), but says nothing about latency, cost, rate limits, or why repeated identical calls may differ — context that would justify the idempotentHint=false signal.

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, zero preamble, and the core action is front-loaded before the provider catalogue. The parenthetical model list is dense but each item carries actionable information; only the redundant '(Together AI)' and '(local, optional)' annotations are mildly padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With six parameters, full schema coverage and reasonably rich annotations, the definition covers selection adequately, but it never describes the response shape despite there being no output schema — an agent does not learn whether it receives raw text, usage metadata, or a provider-specific object. For a networking tool with a non-idempotent hint, an explicit statement about what comes back is a meaningful omission.

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 each of the six parameters is already documented in detail, including defaults, ranges and the base_url security constraints. The description adds only a compact provider-to-model mapping that largely restates the provider and model parameter descriptions, so the baseline 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 opens with a specific verb and resource ('Call an LLM for text completion') and enumerates the supported providers, so the agent knows exactly what capability the tool exposes. It does not differentiate from any sibling, but none of the listed siblings appear to perform LLM completion, so the ambiguity cost is low.

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 choose this tool over alternatives, nor any stated preconditions (API keys, provider availability, cost/latency tradeoffs). The provider enumeration implies selection criteria but never states them, leaving usage entirely to inference.

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