Skip to main content
Glama

close_month

Closes the first open month permanently after your explicit confirmation. Validates the draft stateHash and returns the closed month, new queue and next step.

Instructions

Closes the first open month, whole and for good (the family can undo only the last closing from the site): call it only after the user's explicit "close". Pass month and the stateHash from the most recent get_month_draft or commit answer, i.e. the one the user saw. advisor.draft_stale means the draft or the spending changed since: read get_month_draft again and show the user the new totals before asking again. month_out_of_order means that month is not the first open one; month_has_problems lists the accounts or loans still missing figures. Answers the closed month, the new queue and nextStep.

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": {
      "month": "<month>",
      "stateHash": "<stateHash>"
    },
    "name": "close_month"
  }
}

Input Schema

NameRequiredDescriptionDefault
monthYesThe month to close, YYYY-MM: the first of the queue
stateHashYesThe stateHash of the draft the user saw

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

The only annotation is readOnlyHint=false, so the description carries the disclosure burden and does it well: it names the operation as effectively irreversible ('for good', undo only possible by the family from the site and only for the last closing), requires explicit user consent, and decodes three failure modes (advisor.draft_stale, month_out_of_order, month_has_problems) including what the latter enumerates. It would reach a 5 if it stated what stateHash protects against specifically (stale writes on an already-changed draft) rather than only how to recover.

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 action and the consent gate, then error handling in compact form; every sentence carries information and nothing is repeated from the schema. It is a dense single paragraph, though, and splitting the recovery conditions from the primary instruction would aid scanning.

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?

There is no output schema, and the description compensates by naming the response shape (the closed month, the new queue, nextStep). Combined with the consent gate, the undo limitation, and the three error codes, an agent has everything needed to call this correctly and interpret failure.

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, but the description earns more by adding provenance the schema lacks: stateHash must come from the most recent get_month_draft or commit answer, i.e. the exact draft the user saw, and month must be the first in the queue rather than any valid YYYY-MM. That is real semantic guidance beyond the property descriptions.

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 ('Closes the first open month') plus a hard scope constraint ('the first open month', 'whole and for good'), which separates it from the sibling draft/commit tools. An agent knows exactly what is mutated and which month qualifies.

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?

Gives an explicit precondition ('call it only after the user's explicit "close"') and a recovery path when the precondition fails ('read get_month_draft again and show the user the new totals before asking again'). It also names the blocking alternate state via get_month_draft for draft_stale, so when-to-use and when-not-to-use are both covered.

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