Skip to main content
Glama
ucetka-mcp

ucetka-mcp

Remove expense record

remove_expense
Destructive

Delete a recorded expense from the ledger when a received invoice should not be kept or must be replaced. Removes its stored JSON by expense ID and re-runs the import check.

Instructions

Delete a received invoice (expense) record from the ledger — only when the user explicitly deleted the document or does not want it recorded (e.g. list_import_issues reports its PDF as missing), or to replace a wrong add_expense entry.

Destructive: deletes ~/.ucetka/expenses/<expense_id>.json with no undo; the PDF itself is not touched. It then re-runs the received-invoice import, so if the PDF is still in the received folder it is imported or flagged again right away. Fails if the ID does not exist. Confirm with the user first. Returns what was removed.

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": {
      "expense_id": "<expense_id>"
    },
    "name": "remove_expense"
  }
}

Input Schema

NameRequiredDescriptionDefault
expense_idYesID of the recorded expense = its PDF name without extension, e.g. '2603002'.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / expense_id / description
      Previous value: -"ID výdaje (název PDF bez přípony)."New value: +"ID of the recorded expense = its PDF name without extension, e.g. '2603002'."
    • addedInput schema / properties / expense_id / pattern
      Added value: +"^[A-Za-z0-9_-]{1,40}$"
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations: it names the exact artifact removed (~/.ucetka/expenses/<expense_id>.json), states there is no undo, clarifies the PDF itself is untouched, and discloses the non-obvious side effect that the received-invoice import re-runs so a still-present PDF can be re-imported or re-flagged immediately. It also documents the failure mode (nonexistent ID) and that the response reports what was removed.

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?

Front-loads the core action and eligibility conditions, then layers destruction/side-effect warnings in a clearly separated paragraph. Every sentence carries actionable information — file path, undo status, PDF non-deletion, re-import, failure mode, confirmation — with no filler.

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 destructive single-parameter tool with an output schema, everything an agent needs is present: when it is legitimate, what is destroyed, what is preserved, what happens afterward, how it fails, and whether to confirm. Return values are summarized briefly and the output schema covers the rest.

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

Parameters3/5

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

Schema coverage is 100% and the expense_id property already documents the pattern, the meaning (PDF name without extension), and an example. The description adds only the behavioral consequence of a bad ID ('fails if the ID does not exist'), not additional semantics about the parameter itself, so the baseline of 3 applies.

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 ('Delete a received invoice (expense) record from the ledger') and immediately ties it to siblings by naming add_expense and list_import_issues as related scenarios. An agent can distinguish this from add_expense or get_invoice 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 explicit preconditions ('only when the user explicitly deleted the document or does not want it recorded'), a concrete trigger case (list_import_issues reports the PDF as missing), and a corrective use case (replace a wrong add_expense entry). It also adds a procedural rule, 'Confirm with the user first,' which is the correct gating instruction for a destructive tool.

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