Skip to main content
Glama

query_task

query_task
Read-only

Check an async agent task's status, progress, recent log tail, and fine-grained events to identify whether it is running normally or blocked on user authorization.

Instructions

查询任务状态 / 进度 / 最近日志尾部(默认 agent.log 末 40 行)/ 最近细粒度事件。返回任务 meta 与日志片段。meta.recentEvents 为最近 N 条 agent 事件(eventLimit 缺省 10、上限 50),取值 task_dispatched / confirmation_dialog_detected / awaiting_user_authorization / file_modification_started / rework_triggered —— 长任务下可据此区分「正常执行」与「卡在弹窗等人」。未实现事件上报的适配器该数组为空,其余字段不变。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYes
tailLinesNo
eventLimitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.4
    • addedInput schema / properties / eventLimit
      Added value: +{
      +  "maximum": 50,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint=true annotation, the description reveals important behavioral details: the log tail defaults to the last 40 lines of agent.log, eventLimit defaults to 10 with a max of 50, and adapters that don't report events return an empty array while other fields remain unchanged. It also lists the exact event enum values, giving the agent concrete expectations.

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?

The description is a single dense paragraph, but it front-loads the core purpose and then packs defaults, event values, and adapter fallback behavior into later clauses. Some run-on punctuation makes it slightly harder to scan, but every sentence earns its place.

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?

With no output schema, the description explains the return shape (task meta + log snippet), details the recentEvents field and its adapter-dependent empty-array behavior, and provides interpretation guidance for long-running tasks. It doesn't describe other meta fields, log formatting, or error conditions, but it is sufficiently complete for correct selection and invocation.

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?

Schema description coverage is 0%, so the description must compensate. It documents eventLimit's default and maximum, tailLines via the default 'agent.log 末 40 行', and even explains the values returned in meta.recentEvents. taskId is left implicit, but its meaning is obvious from the tool name and required field.

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 concrete verb and resource set: '查询任务状态 / 进度 / 最近日志尾部 / 最近细粒度事件' (query task status / progress / recent log tail / recent fine-grained events). It clearly positions the tool as a read-only inspection tool distinct from siblings like run_task or verify_task by also stating it returns task meta and log snippets.

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 gives a concrete use context: '长任务下可据此区分「正常执行」与「卡在弹窗等人」' (under long tasks, distinguish normal execution from being stuck waiting on a dialog). It does not explicitly name alternatives or say when not to use it, but the context is clear enough for an agent to select it for status/progress/log inspection.

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