Skip to main content
Glama

ledger_task_status

Read-onlyIdempotent

Check dispatch, retry, and verdict status for a task before dispatching a subagent to enforce retry limits.

Instructions

Look up dispatch/retry/verdict status for a given task string.

Use this BEFORE dispatching a subagent to check whether the same task has already been retried too many times (budget enforcement).

Args: task (str): The exact task string used with ledger_log_dispatch.

Returns: dict: { "dispatch_count": int, # total dispatches recorded for this task "retry_count": int, # dispatch_count - 1, floored at 0 "last_verdict": str | None, # verdict of most recent dispatch, or null "over_retry_limit": bool # true when retry_count >= 2 }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the safety profile is covered. The description adds meaningful behavioral context beyond annotations: the exact return fields, the formula for retry_count (dispatch_count - 1 floored at 0), and the threshold for over_retry_limit (>= 2). This specifies the tool's semantics without contradicting 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?

The description is compact and well-structured with separate sections for Args and Returns. Every line serves a purpose: the first line states the function, the second provides usage context, and the return block details the output. No fluff or repetition.

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?

The description fully specifies the tool's behavior, return values with types and comments, and the exact context for use. Since there is no separate output schema, the 'Returns' section compensates by documenting all four fields and their meanings. The tool is simple (one param, no nested objects) and the description covers all necessary aspects.

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% in the input schema (task has only type/title). The description compensates fully: 'task (str): The exact task string used with ledger_log_dispatch.' This adds crucial semantic meaning—that the string must match previously logged dispatches—which the schema alone could not convey.

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 starts with 'Look up dispatch/retry/verdict status for a given task string,' which is a specific verb+resource phrase. It clearly distinguishes from sibling tools like ledger_log_dispatch (which logs) and ledger_stats (which aggregates). The additional 'Use this BEFORE dispatching a subagent' context further specifies its role.

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?

Explicitly states when to use: 'Use this BEFORE dispatching a subagent to check whether the same task has already been retried too many times (budget enforcement).' It also references ledger_log_dispatch for task string consistency. However, it does not enumerate when not to use or alternative tools, but the context is clear enough.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/watasisaikou/nagi-ledger'

If you have feedback or need assistance with the MCP directory API, please join our Discord server