Skip to main content
Glama

Get TraeCN Task

traecn_get_task
Read-onlyIdempotent

Retrieve a gateway task by ID to read its status and final result, or request the full execution trace to diagnose failures. Call once on completion or after reconnecting, not for polling.

Instructions

Read one known gateway task by ID: status plus final result, or the full execution trace with detailLevel 'trace' for diagnosis. Call once when notified of completion or once later when resuming after a disconnect. Not a progress primitive — do not poll in a tight loop.

Input Schema

NameRequiredDescriptionDefault
taskIdYesStable task identifier returned by traecn_send_message.
detailLevelNoresult returns only the final answer (default); trace includes the full visible Trae execution process.

Output Schema

NameRequiredDescriptionDefault
codeNoStable machine-readable result or error code.
errorNoOriginal task error, or null when no execution error was recorded.
resultNoFinal agent answer payload: text, stable flag, elapsedMs; or code/error when unavailable.
statusNoTask status such as queued, executing, done, error, cancelled, awaiting_review, approval_required.
taskIdNoEchoed task identifier.
changedNoWhether visible TraeCN state changed.
elapsedNoMilliseconds elapsed since creation.
messageNoHuman-readable outcome summary.
successNoWhether the operation succeeded.
lastStepNoMost recent execution step summary (trace level).
metadataNoGateway bookkeeping metadata recorded with the task.
createdAtNoEpoch milliseconds when the task was created.
errorCodeNoStable code when the task itself failed.
retryableNoWhether retrying the same call can succeed later.
stepCountNoNumber of recorded execution steps.
nextActionNoSuggested next step after a failure.
completedAtNoTask completion time: epoch milliseconds, an ISO 8601 timestamp from persisted history, or null when unavailable.
detailLevelNoRequested detail level.
fromHistoryNoTrue when served from persisted history instead of the active queue.
detailWarningNoPresent when trace details could not be fully recovered.
historyStatusNoInternal history status when the task already left the active queue.
conversationIdNoStable TraeCN conversation identifier.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.7.1-glama.1
    • changedOutput schema / properties / completedAt / description
      Previous value: -"Epoch milliseconds when the task completed."New value: +"Task completion time: epoch milliseconds, an ISO 8601 timestamp from persisted history, or null when unavailable."
    • addedOutput schema / properties / completedAt / format
      Added value: +"date-time"
    • changedOutput schema / properties / completedAt / type
      Previous value: -[
      -  "number",
      -  "null"
      -]New value: +[
      +  "number",
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / error / description
      Previous value: -"Error identifier or diagnostic when the operation failed."New value: +"Original task error, or null when no execution error was recorded."
    • changedOutput schema / properties / error / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered; the description contributes the non-obvious behavioral constraint that repeated tight-loop polling is not the intended model. It also clarifies the payload difference between the two detail levels. It stops short of describing failure cases such as an unknown or expired taskId, which would be the natural remaining detail.

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 short sentences, each carrying distinct information: what is returned, when to call it, and when not to. The exclusion is front-loaded with 'Not a progress primitive', which is the highest-value warning placed where it will be read.

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 an output schema present and annotations covering the safety profile, the description need not explain return values, and it correctly focuses on invocation timing and the polling pitfall. It is essentially complete for a simple two-parameter read, though it omits what happens when the task ID is unknown or how long a completed task remains retrievable.

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 coverage is 100% and both parameters are already documented at the property level, including the enum values and the default of "result"; the description only restates the 'trace' option in service of the diagnostic use case. That reinforcement is mildly useful but does not add new meaning beyond the schema, so the baseline applies.

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?

"Read one known gateway task by ID" is a specific verb plus resource plus scope, and it immediately states what comes back (status plus final result, or the execution trace). That cleanly separates it from siblings like traecn_cancel_task and traecn_send_message, so an agent does not need to open the schema to know what this does.

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 gives explicit positive triggers (once when notified of completion, once when resuming after a disconnect) and an explicit exclusion ("Not a progress primitive — do not poll in a tight loop"). That anti-pattern warning is exactly the guidance an agent needs, since polling is the most likely misuse of a task-status tool.

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