Skip to main content
Glama

ledger_log_dispatch

Record subagent dispatches for audit and retry tracking. Counts retries per task to enforce budget limits via task status.

Instructions

Record a subagent dispatch (e.g. via the Agent tool) for audit and retry tracking.

Call this every time a subagent is dispatched for a task, so retries of the same task can be counted and budget-limited via ledger_task_status.

Args: task (str): Stable identifier/description of the task being dispatched. Use the SAME string across retries of the same underlying task so retry counting works. agent_type (str): Subagent type used (e.g. "fork", "general-purpose"). model (str): Model used for the dispatch (e.g. "sonnet", "opus"). brief_summary (str): One-line summary of what the dispatch was asked to do.

Returns: dict: {"id": int, "retry_count": int} where retry_count is the number of PRIOR dispatches recorded under the same task (0 for the first).

Errors: Raises ValueError if any field is empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYes
modelYes
agent_typeYes
brief_summaryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The annotations indicate a write operation (readOnlyHint=false) but the description adds significant behavioral detail: the return dict with id and retry_count (and that retry_count counts PRIOR dispatches), the ValueError on empty fields, and the requirement to reuse the same task string. These details go beyond what annotations reveal.

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 well-organized into purpose, usage, Args, Returns, and Errors sections. Every sentence adds value; there is no padding, and the structure makes it easy to scan.

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 accounts for usage, parameters, return value, and error handling. Given the tool's simple functionality and the explicit return/error details, the description is fully complete for an agent to select and invoke it correctly.

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?

With 0% schema description coverage, the description fully compensates by providing meaningful definitions for each parameter: task (stable identifier, same string across retries), agent_type, model, and brief_summary, including examples for each.

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 specific verb ('Record') and resource ('a subagent dispatch'), explicitly stating its audit and retry tracking purpose. This clearly distinguishes it from sibling tools like ledger_log_action and ledger_log_verdict.

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 explicitly states to call it 'every time a subagent is dispatched', establishing a clear usage context. It also ties to ledger_task_status for retry counting but does not explicitly name alternative tools for non-dispatch logging, so it stops short of full when-not guidance.

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