Skip to main content
Glama

Terminate schedule

terminate-schedule
DestructiveIdempotent

End a schedule early at a month-end cutoff without booking any entry. In one transaction: deletes forward facts past the cutoff (refusing when posted entries exist past it; stale drafts past it are deleted), voids the remaining obligation chain past the cutoff (pending and classified rows), and rewrites the SumEquals rule to prove the truncated curve. History at or before the cutoff is untouched, so open months the schedule still covers close normally. Use this when the termination's GL effect is already booked (an asset transferred via a manual entry, a prepaid refunded in the source system) or none is wanted; when the derecognition entry still needs to be booked, use create-event-block(event_type='asset_disposed') instead — the disposal handler posts it atomically with the same obligation void. Run BEFORE promote-obligations at close so terminated periods are never drafted.

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": {
      "structure_id": "<structure_id>",
      "new_end_date": "<new_end_date>",
      "reason": "<reason>"
    },
    "name": "terminate-schedule"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonYesWhy the schedule is ending early — captured in the audit log.
new_end_dateYesLast date the schedule covers — must be the last day of a month (schedule facts are whole-month). Facts and obligations for periods starting after this date are removed/voided.
structure_idYesThe schedule structure to terminate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description goes well beyond that by disclosing the exact transactional effects: forward facts deleted, refusal when posted entries exist past the cutoff, stale drafts deleted, obligation chain voided, and the SumEquals rule rewritten. It also states what survives ('history at or before the cutoff is untouched') and that the whole operation is atomic ('In one transaction'), which is exactly the context an agent needs before invoking a destructive tool.

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, then the transactional detail, then the routing alternative and the close-ordering note — a sensible sequence. The parenthetical clauses ('refusing when posted entries exist past it; stale drafts past it are deleted') are dense but each carries distinct behavioral content, so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, three-required-parameter mutation with no output schema, the description covers preconditions, side effects, atomicity, and sequencing at close. The only gap is that it doesn't indicate what the caller receives back (e.g., counts of deleted facts or voided obligations), which matters for verifying a destructive transaction.

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, and the description adds meaning by framing new_end_date as a 'cutoff' whose downstream facts and obligations are removed/voided together. It doesn't add format or validation details beyond the schema (month-end constraint, audit logging of reason), so it stops short of a 5.

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 ('End a schedule early at a month-end cutoff without booking any entry') plus the scope of the cutoff and its no-entry character. It explicitly distinguishes itself from the sibling create-event-block(event_type='asset_disposed'), so an agent can route correctly without opening any schema.

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 when-to-use condition ('when the termination's GL effect is already booked ... or none is wanted'), an explicit when-not with the named alternative, and even an ordering constraint ('Run BEFORE promote-obligations at close'). No inference is left to the agent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.