Skip to main content
Glama

retrieve_stateful_response

Read-only

Fetch stored chat completions from xAI using their unique response IDs to retrieve previous assistant replies and conversation data.

Instructions

Fetch a stored chat completion from xAI by its response ID.

Args:
    response_id: ID returned by a prior `stateful_chat` call.

Returns:
    The stored assistant reply and its `**Response ID:**`, or a not-found message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
response_idYes
Behavior3/5

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

Annotations declare readOnlyHint=true, which already indicates this is a safe read operation. The description adds useful context about what gets returned (assistant reply with Response ID) and the not-found behavior, but doesn't mention rate limits, authentication needs, or other behavioral traits beyond what annotations provide.

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?

The description is perfectly sized with three sentences: purpose statement, parameter explanation, and return behavior. Each sentence earns its place, and the information is front-loaded with the core purpose first.

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?

For a single-parameter read tool with readOnlyHint annotation, the description is nearly complete. It explains what the tool does, parameter semantics, and return behavior. The main gap is lack of output schema, but the description compensates by describing return values adequately.

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?

With 0% schema description coverage, the description fully compensates by explaining the parameter's purpose and origin: 'ID returned by a prior `stateful_chat` call.' This adds crucial meaning beyond the schema's basic string type, though it doesn't specify format constraints like length or pattern.

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 the specific action ('Fetch'), resource ('stored chat completion from xAI'), and identifier mechanism ('by its response ID'). It distinguishes from siblings like 'stateful_chat' (which creates responses) and 'delete_stateful_response' (which removes them).

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 provides clear context for when to use this tool: when you have a response ID from a prior 'stateful_chat' call. However, it doesn't explicitly state when NOT to use it or mention alternatives like 'get_chat_history' for retrieving multiple responses.

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/merterbak/Grok-MCP'

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