Skip to main content
Glama

Delete Expense

delete_expense
Destructive

Moves one of the signed-in person's own expenses to Trash, where it can be restored. An expense already on an invoice, or synced from the accounting system, is refused with the reason. Handles "remove the parking I logged twice".

Input Schema

NameRequiredDescriptionDefault
userIdNoNot needed when signed in: these tools act for the signed-in person, and any other ID is refused. Applies only to a workspace connection with no signed-in user, naming whose expenses these are.
expenseIdYesThe expense id, as an expense read or a logged expense gave it.

Output Schema

NameRequiredDescriptionDefault
undoNoThe call that reverses this one, with its arguments.
trashedNo
expenseIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructive=true and non-idempotent, but the description adds the crucial nuance that this is a soft delete to Trash and is restorable, plus the two refusal conditions and that a reason is returned. Those are behavioral traits the annotations cannot convey.

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?

Three short sentences, zero filler; the destructive-but-recoverable nature is front-loaded, followed by refusal conditions, then an example. Every sentence earns its place.

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-item tool with an output schema present, the description covers scope, reversibility, and refusal behavior — everything an agent needs before invoking it. Return values are legitimately left to the output schema.

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 description coverage is 100%, so expenseId and the optional userId are already fully documented in the schema. The description reinforces the "own expenses" scoping that explains userId's role but adds no new format, syntax, or ID-provenance detail beyond the schema.

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?

Specific verb+resource: it moves one of the signed-in user's own expenses to Trash, and it immediately distinguishes itself from the sibling restore_expense by stating the item is recoverable. The scope qualifier ("own expenses") separates it from any admin-style deletion.

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

Usage Guidelines4/5

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

States clear preconditions and failure modes: only the caller's own expenses, refused if already on an invoice or synced from accounting, with the reason returned. It gives a recognizable use case ("remove the parking I logged twice") but never names an alternative tool or explains when a sibling like delete_time_entry/restore_expense would be the better pick.

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