Skip to main content
Glama

Delete expense

figa_delete_expense
DestructiveIdempotent

Delete an expense in the explicitly selected recurrence scope. FUTURE_INSTANCES refuses active startsFrom, an active lower-bound plan exclusion, or a family generationEnd before any write; rangeRevision alone does not cause refusal. These restrictions protect family boundaries; separate THIS/ALL deletions are not equivalent. Count-limited series do not support the lifecycle end action. A range-end change stops generation but does not delete saved documents. A deleted one-time expense reads as EXPENSE_NOT_FOUND; deleting it again succeeds without a change. This write requires explicit user intent. A UUID requestId identifies one intended operation; identical retries retain the same ID and payload. A missing response or IDEMPOTENCY_OUTCOME_UNKNOWN, IDEMPOTENT_REQUEST_IN_PROGRESS or INTERNAL_SERVER_ERROR leaves the outcome uncertain, not a confirmed failure. A new ID can duplicate an uncertain write. Corrected inputs after a definite validation or business refusal constitute a new operation. The transport response cache lasts 24 hours; longer replay guarantees are stated above.

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": {
      "workspaceId": "<workspaceId>",
      "requestId": "<requestId>",
      "expenseId": "<expenseId>",
      "scope": "<scope>"
    },
    "name": "figa_delete_expense"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeYeseditScope for a recurring expense: THIS_INSTANCE (this occurrence), FUTURE_INSTANCES (this and later occurrences) or ALL_INSTANCES (the whole series).
expenseIdYesExpense ID as returned by expense reads: a stored expense UUID or the ID of a generated occurrence of a recurring series.
requestIdYesCaller-generated UUID identifying this one intended write. A retry of the same write reuses the ID and payload; the same ID with different input returns IDEMPOTENCY_KEY_MISMATCH.
workspaceIdYesID of a workspace selected for this connection. Other workspaces are rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / expenseId / description
      Added value: +"Expense ID as returned by expense reads: a stored expense UUID or the ID of a generated occurrence of a recurring series."
    • addedInput schema / properties / requestId / description
      Added value: +"Caller-generated UUID identifying this one intended write. A retry of the same write reuses the ID and payload; the same ID with different input returns IDEMPOTENCY_KEY_MISMATCH."
    • addedInput schema / properties / scope / description
      Added value: +"editScope for a recurring expense: THIS_INSTANCE (this occurrence), FUTURE_INSTANCES (this and later occurrences) or ALL_INSTANCES (the whole series)."
    • addedInput schema / properties / workspaceId / description
      Added value: +"ID of a workspace selected for this connection. Other workspaces are rejected."
  2. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description still adds substantial context beyond them: refusal preconditions evaluated before any write, the fact that a deleted one-time expense reads as EXPENSE_NOT_FOUND and a repeat delete succeeds as a no-op, the requestId retry contract, the uncertain-outcome error codes, and the 24-hour transport response cache. The disclosure is weakened by undefined internal jargon ('active startsFrom', 'family generationEnd', 'rangeRevision') that the schema does not explain either.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded correctly, but the body is an undifferentiated block mixing scope refusal rules, series-lifecycle caveats, idempotency semantics, and transport cache details with no grouping or headings. Several sentences do earn their place for a destructive write, yet 'The transport response cache lasts 24 hours; longer replay guarantees are stated above' and the corrected-inputs sentence are hard to parse in context. Length is defensible; organization is not.

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

Completeness3/5

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

For a destructive mutation with no output schema, the description covers a lot: refusal conditions, idempotent retry guidance, uncertain-outcome states, and post-delete read behavior. It omits other things an agent needs before an irreversible call: whether deletion is soft or recoverable, what happens to attached payments or manual-series membership, and which sibling to use when range-ending is the goal. Given the complexity and nested scope object, it is adequate but not complete.

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%, so the schema itself documents all four parameters, including the editScope enum values and the requestId reuse rule; baseline 3 applies. The description does go further on scope by explaining the FUTURE_INSTANCES refusal preconditions and on requestId by spelling out retry/duplicate semantics. It says nothing about expenseId (e.g., what happens if the ID belongs to a different series instance) or workspaceId, beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource ('Delete an expense') plus a scope qualifier ('explicitly selected recurrence scope'), which is far beyond restating the name. It also signals a boundary against series-lifecycle operations ('a range-end change stops generation but does not delete saved documents') and against split deletions ('separate THIS/ALL deletions are not equivalent'), so an agent can partly distinguish it from figa_end_series. It never names the sibling outright, which keeps it from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is real when-not content: FUTURE_INSTANCES is refused under active startsFrom, an active lower-bound plan exclusion, or a family generationEnd, and count-limited series do not support the lifecycle end action. 'This write requires explicit user intent' is a useful prerequisite. However, no alternative tool is ever named for the cases where deletion is refused or where series-ending is what the user actually wants, leaving the agent to infer routing to figa_end_series or figa_preview_expense_range.

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.

Resources