Skip to main content
Glama

glama_stream_completion

Stream chat completions from the Glama AI gateway and receive a single combined text answer with usage metadata.

Instructions

Streamed chat completion; deltas are reassembled into one text answer with usage metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
messagesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Given no annotations are provided, the description carries the full burden of exposing behavior. It discloses that deltas are reassembled into one text answer and that usage metadata is included, which is useful. However, it does not mention side effects, error conditions, rate limits, or whether the operation is read-only. For a streaming operation, knowing that it returns an aggregated result is significant, but many behavioral aspects remain opaque.

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 very concise, a single sentence that front-loads the core purpose and the key reassembly behavior. It earns its place without fluff. However, it is almost too sparse, sacrificing parameter and usage detail for brevity, yet structurally it is efficient.

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

Completeness2/5

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

Given the simplicity of the schema (2 params, no descriptions) and lack of output schema and annotations, the description does too little to support correct invocation. It fails to explain the messages array format, the role/content structure, the optional model parameter, or the shape of the returned aggregated answer. An agent would likely underspecify or misuse the tool.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not mention the parameters at all. It doesn't explain what 'messages' or 'model' mean, their formats, or any defaults. Since the schema provides only types, the agent has no semantic guidance, making this a significant gap.

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 clear purpose: it performs a streamed chat completion and reassembles the deltas into one text answer. This distinguishes it from sibling tools like glama_chat_completion (presumably non-streamed) and glama_list_models. The verb 'streamed' and the resource 'chat completion' are specific, and the reassembly detail adds functional clarity.

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 when a streamed response is desired, but it does not explicitly mention when to avoid it or name alternatives. There is no guidance on prerequisites, auth, or when to choose non-streamed chat completion. The context is clear but the when/why is left to inference.

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