Skip to main content
Glama

commit_statement

Saves an approved statement preview into the month's draft using its draftId, replacing the account's figures and category lines so the same filing produces no duplicates.

Instructions

Saves the statement preview_statement prepared, exactly as previewed, into the month's draft (the user then closes the month): pass only its draftId, and only after the user said yes to this exact preview. It replaces the account's figures and, when the preview had categories, its lines by category for the month, so filing the same statement again changes nothing. advisor.draft_stale means the account's row, the loan lines it names, its lines or the income and expenses tracking changed since the preview, or the month is no longer the open one; draft_conflict means a write changed the draft during validation: prepare a new preview and ask for yes again; advisor.draft_not_found means the preview expired (30 minutes), was used already or is another user's: prepare a new preview and ask for yes again. Answers what was filled, which accounts still miss figures (missing), warnings (loan_balance_differs, checked again against the schedule as it is now: an early payment entered since the preview changes it), the queue, a new stateHash and nextStep. If the month-close wizard is open in a browser, tell the user to reload it before typing or closing there: Claude's changes appear only after a reload, and stale browser writes are rejected. At most 20 previews wait at once; a further one drops the oldest — commit before previewing more.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "draftId": "<draftId>"
    },
    "name": "commit_statement"
  }
}

Input Schema

NameRequiredDescriptionDefault
draftIdYesThe draftId preview_statement answered for the table the user said yes to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, so the description carries the burden and does so thoroughly: it discloses replacement semantics for figures and category lines, idempotency, the 30-minute preview expiry, a 20-preview queue with oldest-dropped eviction, and a stale-browser-write rejection rule. The three error codes (draft_stale, draft_conflict, draft_not_found) are each explained with cause and required remedy.

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?

Front-loaded with the core action and precondition before the failure modes and return payload. It is a dense single paragraph, and the 'prepare a new preview and ask for yes again' remedy is repeated for both draft_conflict and draft_not_found, which could be consolidated without losing information.

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?

For a mutating commit tool with no output schema, the description enumerates the response shape (what was filled, missing accounts, warnings, queue, stateHash, nextStep) and covers the concurrent-write and expiry edge cases an agent would otherwise hit blind. Nothing needed to call it correctly appears absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds real constraint by saying to pass only the draftId and that it must be the one returned for the exact table the user approved. That narrows how to source the value in a way the schema's one-line description does not fully 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?

States a specific verb (saves/commits) and resource (the statement preview_statement prepared) and pins it to the month's draft, making it immediately distinguishable from preview_statement and close_month. It also clarifies the semantic difference from a plain save by noting it is idempotent ('filing the same statement again changes nothing').

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?

Explicitly states the precondition ('only after the user said yes to this exact preview') and the scope restriction ('pass only its draftId'), which routes the agent away from re-previewing or passing extra fields. It also names the alternative workflow for each failure mode ('prepare a new preview and ask for yes again'), leaving nothing to inference.

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