Skip to main content
Glama

Undo a chore completion

chore_complete_undo

Undo a mistaken chore completion: restore the prior due date, assignee and anchor, reopen any closed swap request, and remove that completion from history within the two-minute window.

Instructions

Take back the caller's own latest completion of a chore: the app restores the due date, assignee and anchor from before the completion, reopens the swap request the completion closed and removes the completion from the history. Use it right after chore_complete when it was a mistake; to change a chore for any other reason use chore_update. Only the member who completed can undo (not_owner for others), only the latest completion, and only within about two minutes after the chore last changed (undo_expired afterwards, not_latest_completion if a later completion exists, completion_not_found if it was already undone). Returns chore_changed if the chore moved on since the completion: read it again. Not idempotent: a second call fails. Pass back the completion and chore values exactly as the chore_complete response returned them. Returns the restored chore.

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": {
      "id": "<id>",
      "completionId": "<completionId>",
      "previous": "<previous>",
      "expectedNextDueAt": "<expectedNextDueAt>",
      "expectedAssignedMemberId": "<expectedAssignedMemberId>"
    },
    "name": "chore_complete_undo"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId of the chore, from chores_list.
wgCodeNoShare code of the flat (code from wg_list). Leave it out when the account belongs to one flat.
previousYesThe completion.previous object from the chore_complete response, passed back unchanged.
completionIdYesId of the completion to undo, from completion.id in the chore_complete response.
expectedNextDueAtYesThe chore nextDueAt as returned by chore_complete. The undo only applies while the chore still has it.
expectedAssignedMemberIdYesThe chore assignedMemberId as returned by chore_complete, or null. The undo only applies while the chore still has it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond annotations, the description discloses what gets mutated (restore previous state, reopen swap request, purge the completion record) plus ownership enforcement, the time-window limit, and a full error taxonomy (not_owner, undo_expired, not_latest_completion, completion_not_found, chore_changed). It also warns that conflicts should trigger a re-read. The only shortfall is that it doesn't discuss side effects such as notifications or what happens to dependent swap requests beyond reopening.

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?

The paragraph is dense but front-loaded, with purpose first, then usage and alternative, then failure modes. Every sentence carries information. The long parenthetical listing five error codes in one sentence is slightly hard to scan but costs no wasted length.

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 six-parameter mutation tool with a nested object and no output schema, the description covers purpose, preconditions, error semantics, non-idempotency, and the return ('returns the restored chore'). Combined with the fully documented schema, an agent has everything needed to call it correctly.

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 adds non-obvious guidance: pass the completion and chore values back exactly as the chore_complete response returned them, and it explains that the expectedNextDueAt/expectedAssignedMemberId fields act as optimistic-concurrency guards ('read it again' on chore_changed). That meaningfully supplements the per-field schema text.

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 names a specific verb and resource ('Take back the caller's own latest completion of a chore') and spells out the concrete effects: restoring due date, assignee and anchor, reopening the closed swap request, and removing the completion from history. It is immediately distinguishable from chore_complete (the action being reverted) and chore_update (out of scope for this tool).

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?

It states exactly when to call it ('right after chore_complete when it was a mistake') and names the alternative for every other case ('to change a chore for any other reason use chore_update'). It also enumerates the preconditions an agent must check first: caller must be the owner, only the latest completion, and only within roughly two minutes of the last change.

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