Skip to main content
Glama

Cancel an invoice not yet delivered

sef_cancel_invoice
Destructive

Cancels a SEF sales invoice in Draft, New, or Sending error status after explicit user approval; use storno for Sent, Accepted, or Rejected invoices.

Instructions

Cancels a sales invoice on SEF. SEF allows this only for status Draft, New or Sending error; for Sent/Accepted/Rejected use sef_storno_invoice. Only call after explicit user approval.

Input Schema

NameRequiredDescriptionDefault
commentYes
invoiceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, idempotentHint=false and readOnlyHint=false, so the mutation profile is known. The description adds genuinely new behavioral context: the server-side status precondition and the user-approval gate that must precede the call. It does not say what happens after cancellation (whether the invoice record survives, whether the number is reusable) or what the required comment is used for, which matters for a destructive operation.

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, no waste. The core action and its status gate come first, the alternative second, the approval prerequisite last where it is most likely to be obeyed.

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, non-idempotent two-parameter tool with no output schema, the description covers preconditions and the sibling alternative well, which is the hardest part. It is incomplete on the parameter side, especially the mandatory comment field, and says nothing about the result of a successful cancellation.

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

Parameters2/5

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

Schema description coverage is 0% for both parameters, so the description carries the full burden and adds nothing: neither invoiceId nor the required 'comment' (3-1000 chars) is explained. An agent cannot tell from this text whether the comment is an audit reason shown to a user or an internal note, despite it being mandatory.

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 ('Cancels a sales invoice on SEF') and immediately scopes it by invoice status. It also names the sibling tool to use instead for other statuses, so an agent can distinguish it from sef_storno_invoice without opening either 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?

Explicit when-to-use rule (status Draft, New or Sending error), an explicit when-not rule with the named alternative (Sent/Accepted/Rejected → sef_storno_invoice), and a hard prerequisite ('Only call after explicit user approval'). Nothing is left to inference.

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