Skip to main content
Glama

get_task_usage

Read-only

Retrieve per-execution local CLI invocation status and reported token usage for a task, marking unavailable data as false with a reason instead of zero. Use it to audit agent CLI usage.

Instructions

Read, per execution of a task, whether a local CLI was invoked and the token usage that CLI reported. Read-only. When usage is unavailable (for example a ChatGPT web execution never starts a local CLI) the entry says available=false with a reason; it is never reported as zero. Use get_task_result for the reports themselves.

Input Schema

NameRequiredDescriptionDefault
task_idNoTask id. Omit it to use the project's current workstream task, which is what you want almost always; pass it only to look up a historical task.
project_idYesRegistered project id, as returned by list_projects.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.3
    • addedInput schema / properties / project_id / description
      Added value: +"Registered project id, as returned by list_projects."
    • addedInput schema / properties / task_id / description
      Added value: +"Task id. Omit it to use the project's current workstream task, which is what you want almost always; pass it only to look up a historical task."
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavior that annotations cannot express: unavailability is reported as available=false with a reason and is never coerced to zero, which prevents a common misreading of the output. It does not discuss pagination or execution ordering, but with an output schema present that gap is minor.

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?

Three compact sentences, front-loaded with the core action and ending with the sibling routing hint. The opening 'Read, per execution of a task' is slightly awkward phrasing but no sentence is wasted.

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?

With only two parameters, full schema coverage, and an output schema that carries the return shape, the description covers everything an agent needs: what is returned conceptually, the unavailability semantics, and which sibling to use instead. Nothing material is missing.

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 100%, and the task_id parameter already documents the important default behavior (omit it to use the project's current workstream task; pass it only for historical tasks). The description adds no parameter-level meaning of its own, so the baseline of 3 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?

States a specific verb and resource: it reads, per execution of a task, whether a local CLI was invoked and the token usage reported by that CLI. It is clearly distinguishable from sibling reporting tools because it explicitly names get_task_result as the tool for the reports themselves.

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?

Names the alternative (get_task_result) and the boundary between them: usage data here, report content there. It also flags the ChatGPT web execution case as an example of when usage is unavailable. It lacks explicit 'do not use this when' framing beyond that single alternative, so it falls short of a 5.

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