Skip to main content
Glama

Poll Task

poll_task

Waits for a task to reach completed, failed, or cancelled by checking status periodically, with an optional timeout, for use only when the user explicitly asks to wait or poll.

Instructions

轮询任务直到获得最终结果(仅用户明确要求时使用)

它是等待手段;只看一眼请用 get_task。 每 20 秒查询一次任务状态,直到任务进入 completed / failed / cancelled 状态。 默认不设置超时;传入 timeout_seconds 可限制最大轮询时长。

⚠️ 重要:Agent 禁止主动调用此工具。ONLY use this tool when the user explicitly asks to wait for or poll a task result (e.g. "帮我等结果"、"轮询一下任务"). 如果用户没有明确表达等待意图,应询问用户而不是直接轮询。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "task_id": "<task_id>"
    },
    "name": "poll_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
serverNo
task_idYes
timeout_secondsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.8

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so: it discloses the 20-second polling cadence, the terminal states (completed/failed/cancelled), the default of no timeout, and that timeout_seconds caps total polling duration. It also adds an unusual but critical behavioral constraint — the agent must not invoke it proactively — which no annotation would have conveyed.

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?

Front-loaded with the core purpose, then peer comparison, then mechanics, then the warning — a sensible order. The bilingual restatement of the 'do not poll proactively' warning is redundant text, but the emphasis is defensible for a tool that is easy to misuse.

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 values need no explanation, and the description covers cadence, terminal conditions, and timeout behavior. The remaining gap is the `server` parameter's meaning and what happens on timeout expiry (partial results vs. error), which keeps it short of complete.

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 description coverage is 0%, so the description must compensate. It explains timeout_seconds well (default null means unlimited polling; a value bounds maximum duration), but says nothing about the `server` parameter (default empty string) or clarifies task_id's expected format. Partial compensation only.

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 line states a specific verb+resource+termination condition: poll a task until a final result is obtained. It explicitly contrasts with the sibling get_task ("只看一眼请用 get_task"), so an agent can distinguish the two without opening either schema.

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?

Gives explicit when-to-use ('only when the user explicitly asks to wait/poll'), when-not ('if the user hasn't expressed waiting intent, ask rather than poll'), and names the alternative for the non-waiting case. This is about as unambiguous as routing guidance gets.

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