Skip to main content
Glama

Get Pending Tasks

get_pending_tasks

Fetch pending tasks from the queue at the start of each execution loop to discover new work. Evaluate impact, claim, and begin processing.

Instructions

拉取任务队列(被动触达的 pull 端)。harness 执行循环中每轮调用。

何时必须调用:

  • Agent 执行循环的每轮迭代开始时(检查是否有 Hook 分发给你的任务)

何时不需要:

  • 正在处理一个任务的中间(先完成当前任务)

参数:

  • status: pending(待认领)/ claimed(已认领)/ completed

返回: 任务列表 [{task_id, source_node, message, subscribers, status, ...}] 对订阅了你的任务: 先 query_impact 评估 → 需响应则 claim_task 后开工

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNopending

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/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. It discloses the polling cadence, the passive pull nature, the status semantics, the return shape, and the intended workflow after retrieval. '拉取' clearly implies a read operation with no mutation side effects.

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 well-structured with clear sections: purpose, when to call, when not to call, parameters, return shape, and follow-up workflow. Every section earns its place and the purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with an output schema, the description is complete: it explains the trigger condition, the parameter values, and the downstream interaction with sibling tools. Nothing needed for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It enumerates the three possible status values ('pending(待认领)/ claimed(已认领)/ completed') and their meanings, which the schema does not provide. This fully documents the only parameter.

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: '拉取任务队列(被动触达的 pull 端)', making the tool's role clear. The reference to the harness execution loop and Hook-distributed tasks distinguishes this passive pull mechanism from sibling tools like claim_task and get_pending_intents.

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?

It explicitly states when to call ('每轮迭代开始时') and when not to call ('正在处理一个任务的中间'), and provides a clear downstream workflow: query_impact first, then claim_task if a response is needed. This is model guidance for tool selection.

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