Skip to main content
Glama
Primate-Intelligence

Primate Intelligence

Official

wait_for_analysis

Read-only

Block until an analysis reaches a completed, failed, or canceled state. Polls the analysis endpoint and returns the result or timeout guidance for retrying.

Instructions

Block until an analysis reaches a terminal state (completed | failed | canceled), polling GET /v1/analyses/{id}. Returns { analysis, retry }: retry is null when the analysis reached a terminal state, or carries timeout guidance when the wait expired (call again). Default timeout 120s (test-mode analyses complete in seconds). On completion, see get_analysis for the full result field semantics (detected_count, indeterminate_reason, nullable video_duration_s, usage snapshot).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeout_sNoMax seconds to wait (default 120).
analysis_idYesThe analysis id (an_…).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
retryYesNull when the analysis reached a terminal state. Set when the wait timed out — call wait_for_analysis or get_analysis again.
analysisYes
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, covering the safety profile. The description adds valuable behavioral context: it explicitly states the polling endpoint, the return object shape with retry semantics, timeout expiration behavior, and the default timeout value. This goes beyond the annotations and helps the agent understand the blocking/polling nature.

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 compact and well-structured: the first sentence states the core purpose, the second describes the return shape, the third gives timeout context, and the fourth points to the sibling tool for result semantics. Every sentence earns its place with no redundancy or fluff, and the most important information is front-loaded.

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 the tool's complexity (blocking, polling, timeout, retry) and the presence of an output schema, the description covers the key aspects: terminal states, return structure, timeout behavior, and a pointer to get_analysis for detailed field semantics. It does not detail the polling interval or cancellation options, but these are minor gaps given the output schema covers the return shape.

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?

The input schema already provides 100% coverage with descriptions for both analysis_id and timeout_s, including min/max constraints. The description adds semantic value by explaining the default timeout (120s), the fact that test-mode analyses complete in seconds, and how the retry field behaves on timeout. This supplements the schema meaningfully.

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 and resource: 'Block until an analysis reaches a terminal state (completed | failed | canceled), polling GET /v1/analyses/{id}.' This clearly states the tool's function and scopes it to a polling, blocking behavior, distinguishing it from the sibling get_analysis which retrieves results without blocking.

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 usage context: it mentions the default timeout, that test-mode analyses complete in seconds, and that retry should be called again if the wait expires. It also points to get_analysis as the alternative for result field semantics after completion. It lacks an explicit 'when not to use' statement, but the context is sufficient.

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/Primate-Intelligence/primate-intelligence-mcp'

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