Skip to main content
Glama

chat_completion

Send chat messages to supported LLM providers and get text completions back. Works with Anthropic, OpenAI, Together, Replicate, Ollama, and OpenAI-compatible endpoints.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel 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.
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 as the bearer token to whichever base URL is used.
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. 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. First observedv0.1.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions external providers and local ollama, but does not disclose authentication needs, API key requirements, rate limits, cost implications, latency, or the shape of the returned completion. This is a significant gap for a tool that makes external network calls.

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 description is a single, front-loaded sentence that immediately states the tool's purpose. The provider list is somewhat redundant with the schema, but it remains compact and scannable without wasting words.

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?

The schema is rich and covers all six parameters with descriptions and enums, so the description does not need to repeat those details. However, with no output schema and no annotations, the description omits practical context such as authentication setup and provider-specific environmental requirements, leaving minor gaps for an agent deciding how to invoke the tool safely.

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 the baseline is 3. The description's provider/model list largely duplicates what the schema already documents for 'provider' and 'model'; it adds no meaningful parameter semantics beyond a compact summary.

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 opens with a specific verb-resource pair, 'Call an LLM for text completion,' and then enumerates the supported providers. This clearly distinguishes the tool from its siblings (collaboration/meeting/say tools), which operate in a different domain.

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

Usage Guidelines3/5

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

The description implies usage via 'Call an LLM for text completion,' and the provider list gives some selection context. However, it never states when to prefer this tool over alternatives like 'say' or when not to use it, and it does not name any sibling alternatives.

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