Skip to main content
Glama

query_task

query_task
Read-only

Check a task's status, progress, and recent log tail. Returns task metadata and log snippet to monitor execution.

Instructions

查询任务状态 / 进度 / 最近日志尾部(默认 agent.log 末 40 行)。返回任务 meta 与日志片段。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYes
tailLinesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
modeNo
modelNo
roundNo
checksNo
resultNo
statusNo
taskIdNo
agentIdNo
logFileNo
messageNo
diffstatNo
errorTypeNo
finishedAtNo
abortSourceNo
projectPathNo
reportFilesNo
reportRoundNo
cancelReasonNo
changedFilesNo
keptInstanceNo
lastRunSignalNo
modelProviderNo
needsUserKindNo
agentEndReasonNo
permissionModeNo
zcodeSessionIdNo
pendingQuestionNo
progressSummaryNo
boundProjectPathNo
cancelRequestedAtNo
verificationSourceNo
latestVerificationVerdictNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "abortSource": {
      +      "type": "string"
      +    },
      +    "agentEndReason": {
      +      "type": "string"
      +    },
      +    "agentId": {
      +      "type": "string"
      +    },
      +    "boundProjectPath": {
      +      "type": "string"
      +    },
      +    "cancelReason": {
      +      "type": "string"
      +    },
      +    "cancelRequestedAt": {
      +      "type": "string"
      +    },
      +    "changedFiles": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "checks": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "durationMs": {
      +            "type": "number"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "passed": {
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "passed",
      +          "durationMs"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "diffstat": {
      +      "type": "string"
      +    },
      +    "errorType": {
      +      "type": "string"
      +    },
      +    "finishedAt": {
      +      "type": "string"
      +    },
      +    "keptInstance": {
      +      "type": "boolean"
      +    },
      +    "lastRunSignal": {
      +      "type": "string"
      +    },
      +    "latestVerificationVerdict": {
      +      "type": "string"
      +    },
      +    "logFile": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "mode": {
      +      "type": "string"
      +    },
      +    "model": {
      +      "type": "string"
      +    },
      +    "modelProvider": {
      +      "type": "string"
      +    },
      +    "needsUserKind": {
      +      "type": "string"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "pendingQuestion": {
      +      "type": "string"
      +    },
      +    "permissionMode": {
      +      "type": "string"
      +    },
      +    "progressSummary": {
      +      "type": "string"
      +    },
      +    "projectPath": {
      +      "type": "string"
      +    },
      +    "reportFiles": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "json": {
      +          "type": "string"
      +        },
      +        "md": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "reportRound": {
      +      "type": "number"
      +    },
      +    "result": {},
      +    "round": {
      +      "type": "number"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "taskId": {
      +      "type": "string"
      +    },
      +    "verificationSource": {
      +      "type": "string"
      +    },
      +    "zcodeSessionId": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv0.5.4

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile, and the description is consistent with those (a query operation). It adds value beyond annotations by specifying the default log tail behavior (last 40 lines) and the two-part return shape (meta + log snippet). No contradiction with the annotations.

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?

A single, front-loaded sentence conveys purpose, default behavior, and return content with zero filler. Every clause earns its place, and the most important information (status/progress/log tail) appears first.

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?

The presence of an output schema covers the return values, so the description needn't detail them. For a moderate 2-parameter read tool, it covers purpose, default behavior, and return content adequately. The only gap is the lack of explicit guidance on when to choose this over get_task_report/verify_task, which is minor given the clarity of the read-only purpose.

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 bears the compensation burden. It explains tailLines behavior implicitly via the 'default last 40 lines' note, which clarifies the default when tailLines is omitted. taskId is not described but is self-evident from its name. The description partially compensates for the coverage gap but doesn't fully document parameter syntax or constraints.

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?

The description clearly states a specific verb ('查询'/query), the resource (task), and the precise scope: status, progress, and recent log tail with a stated default of the last 40 lines of agent.log. It also names the return content (task meta and log snippet), which distinguishes it from siblings like run_task (execution), cancel_task (cancellation), and list_tasks (listing). It doesn't explicitly name a sibling alternative, but the purpose is unambiguous.

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

Usage Guidelines3/5

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

Usage context is implied — an agent would infer this tool is for checking task state/progress/logs — but there is no explicit when-to-use vs. when-not guidance and no named alternatives or exclusions. The description leaves sibling differentiation (e.g., vs. get_task_report or verify_task) to the agent's inference rather than stating it.

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