Skip to main content
Glama

llm_stream

Stream LLM responses in real-time for long-running tasks like research summaries and content generation. Get partial output early while the model continues processing.

Instructions

Stream an LLM response for long-running tasks — shows output as it arrives.

Uses the same routing logic as llm_route but streams chunks instead of waiting for the full response. Ideal for long-form generation, research summaries, or any task where seeing partial output early is valuable.

Args: prompt: The task or question to stream. task_type: Task type hint — "query", "research", "generate", "analyze", "code". model: Optional model override (e.g. "openai/gpt-4o", "gemini/gemini-2.5-flash"). system_prompt: Optional system instructions. temperature: Sampling temperature (0.0-2.0). max_tokens: Maximum output tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
task_typeNoquery
modelNo
system_promptNo
temperatureNo
max_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses streaming behavior and routing logic, but lacks details on side effects, permissions, rate limits, or how the stream output is handled. With an output schema existing, the description could elaborate on return format.

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 front-loaded with a clear purpose sentence, followed by a use-case paragraph and a structured argument list. It is efficient, but the argument list is necessary due to zero schema coverage; integration with schema descriptions could streamline it.

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

Completeness4/5

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

Given 6 parameters, 1 required, and an output schema, the description covers purpose, use cases, and parameter details well. Minor gaps include lack of output format description (beyond what schema provides) and error handling. Overall, fairly complete.

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

Parameters5/5

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

Schema description coverage is 0%, but the description includes a detailed Args section that explains each parameter beyond schema types and defaults. For example, it specifies task_type values ('query', 'research', etc.) and model examples, adding significant meaning.

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 clearly states 'Stream an LLM response for long-running tasks' with a specific verb (stream) and resource (LLM response). It explicitly distinguishes from the sibling tool llm_route by noting it 'streams chunks instead of waiting for the full response'.

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

Usage Guidelines4/5

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

The description explicitly states when to use this tool (for long-running tasks, long-form generation, research summaries) and contrasts it with llm_route. However, it does not provide explicit when-not-to-use guidance or list alternative tools for short queries.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ypollak2/llm-router'

If you have feedback or need assistance with the MCP directory API, please join our Discord server