Skip to main content
Glama

Get Segwise Query

get_segwise_query
Read-onlyIdempotent

Wait for and retrieve a Segwise query started by start_segwise_query. Pass the returned job_id unchanged. This call waits for up to 25 seconds for the query to finish; if status is still running, call it again. Queries can take several minutes and many status checks. A running status means the query is still executing, not that it failed or has no data. Keep calling get_segwise_query with the exact same job_id, respecting poll_after_seconds. Do not start a duplicate query or stop because repeated checks return running. Give brief progress updates while continuing to poll; do not finish with a still-running answer while polling remains available. Stop polling on completed, failed, execution_deadline, an unrecoverable error, or user cancellation. Retry transient status-check errors with bounded backoff and honor retry delays; do not retry authentication or permission failures. If the host prevents further execution, distinguish that interruption from query failure and preserve the job_id for resumption. When status is completed, use the nested result as the answer. Preserve the exact conversation_id and organization_id for follow-ups in the original user's conversation. If delegated, return both IDs unchanged to the parent with the answer and tell it to pass them into later start_segwise_query calls; do not reset merely because a new child agent or subprocess handles the follow-up. Jobs are temporary and may be interrupted by a service restart.

Input Schema

NameRequiredDescriptionDefault
job_idYesExact job_id returned by start_segwise_query.

Output Schema

NameRequiredDescriptionDefault
errorNo
job_idYes
resultNo
statusYesRunning means keep polling the same job. Completed and failed are terminal statuses.
messageNoGuidance for continuing this running query. Absent for terminal results.
next_actionNoTool to call next with the same job_id when running. Absent for terminal results.
organization_idYes
organization_nameYes
execution_deadlineYesAbsolute RFC3339 execution deadline set when this query started. Polling does not extend it. Completed results remain retrievable within the result retention window.
poll_after_secondsNoMinimum delay in seconds before the next get_segwise_query call when running.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial context beyond them: the 25-second wait window, that queries may take minutes and require many polls, that running does not mean failure or empty data, and that jobs are temporary and can be lost to service restarts. It also covers retry policy (bounded backoff, no retry on auth/permission failures) and host-interruption semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core instruction is front-loaded in the first two sentences, but the remainder is a long block of overlapping directives that restate the same points ('do not stop because repeated checks return running' appears in several forms). Much of the delegation and conversation_id guidance is situational and dilutes the primary polling loop.

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?

An output schema exists, so return-value explanation is correctly omitted, and the description covers the edge cases that matter for a long-running poll (timeouts, transient errors, auth failures, host interruption, job loss). The one gap is the mention of poll_after_seconds, which has no corresponding schema field, leaving the agent unsure whether such a value exists or where to get it.

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 coverage is 100% for the single job_id parameter, so the baseline is 3; the description does add meaning by insisting the id be passed unchanged, reused across every poll, and preserved for resumption or delegation. However, it references 'poll_after_seconds', which is not a property in the schema (additionalProperties is false), creating minor confusion about an argument that cannot be supplied.

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 first sentence names a specific verb pair (wait for and retrieve) and the exact resource (a Segwise query started by start_segwise_query), tying it directly to the sibling that creates it. An agent can immediately distinguish this polling/read tool from start_segwise_query and list_segwise_organizations.

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

Usage Guidelines5/5

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

Explicit when-to-use and when-to-stop guidance: keep polling on running, stop on completed/failed/execution_deadline/unrecoverable error/user cancellation. It also names the anti-patterns explicitly (do not start a duplicate query, do not stop on repeated running).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources