Skip to main content
Glama

Wait for task changes

wait_for_tasks
Read-only

Long-polls up to 25 seconds for task changes or new open workspace tasks, then returns the claimed-task inbox so agents can run a worker loop without timer polling.

Instructions

Long-poll: holds up to timeoutSeconds (max 25) until a task assigned to this account changes (or, with workspaceId, until an open task appears there), then returns the inbox of claimed tasks. Pass back the returned at as since on the next call. Use this in a worker loop instead of polling on a timer.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "wait_for_tasks"
  }
}

Input Schema

NameRequiredDescriptionDefault
sinceNoWatermark from the previous call (ms since epoch); 0 or omitted = now
workspaceIdNoAlso wake on new open tasks in this workspace
timeoutSecondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.8

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, while the description supplies the behavior that actually matters: the call blocks up to a bounded timeout, wakes on assignment changes or new workspace tasks, and returns a claimed-task inbox. It also explains the watermark chaining contract ('pass back the returned `at` as `since`'), which no annotation or schema field conveys.

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?

Three tight sentences, front-loaded with the long-poll semantics before the parameters and the chaining instruction. The only near-redundancy is the repeated max of 25 for timeoutSeconds, which is negligible.

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 zero-required-parameter, read-only tool with no output schema, the definition covers blocking behavior, wake conditions, and the returned watermark, which is most of what a caller needs. It omits what the response looks like when the timeout elapses with no change, a meaningful gap for a long-poll.

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 67% schema coverage the baseline is 3, and the description earns above that by explaining where `since` comes from (the previously returned `at`) and what `workspaceId` changes about wake conditions. `timeoutSeconds` is only restated as max 25, which the schema already enforces, so one parameter adds nothing new.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific operation and resource: a long-poll that holds until a task for this account changes, or until an open task appears in the given workspace, then returns the inbox of claimed tasks. That is well beyond restating the name. It stops short of 5 because it never names a sibling such as list_my_tasks; differentiation from sibling list tools is only implied by the 'instead of polling' phrasing.

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?

Gives an explicit usage context: 'Use this in a worker loop instead of polling on a timer,' and the conditional variant 'with workspaceId, until an open task appears there' tells the caller when to supply that parameter. There is no explicit when-not guidance (e.g., use list_my_tasks for an immediate non-blocking snapshot), which keeps it from a 5.

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