Skip to main content
Glama

Remove provision from invoice

remove_provision_from_invoice

Detach a provision from a DRAFT final invoice and recalculate its advances_total / amount_due. The provision becomes available again for that matter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idYesThe Draft final invoice UUID.
provision_idYesThe provision UUID to detach.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
amount_dueYesGross total minus applied provisions, in the document currency.
advances_totalYesSum of provisions now applied to the invoice, in the document currency.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "advances_total": {
      +      "description": "Sum of provisions now applied to the invoice, in the document currency.",
      +      "type": "number"
      +    },
      +    "amount_due": {
      +      "description": "Gross total minus applied provisions, in the document currency.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "advances_total",
      +    "amount_due"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

The description discloses key side effects: recalculation of invoice totals and the provision becoming available for reuse. It does not mention error conditions or permission requirements, but given the simple nature of the operation and that annotations provide limited detail, the description covers the primary behavioral outcomes well.

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?

The description is two concise sentences with no redundant information. It directly states the action, the target, the restriction, and the result, making it efficient and easy to parse.

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

Completeness4/5

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

The description covers the essential context: the draft restriction, the calculation update, and the provision reuse. It does not specify the return value or handle non-draft cases, but for a straightforward operation these omissions are minor and the description is sufficiently complete for typical use.

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?

Both parameters have clear descriptions in the input schema ('The Draft final invoice UUID' and 'The provision UUID to detach'), providing full coverage. The tool description does not add extra meaning beyond what the schema already conveys, so the baseline score of 3 is appropriate.

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 clearly states the action 'Detach a provision from a DRAFT final invoice' and the effect 'recalculate its advances_total / amount_due'. It distinguishes this from sibling tools like 'apply_provisions_to_invoice' by specifying the removal action and the draft-invoice constraint.

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?

The description implies usage for draft invoices only and notes that the provision becomes available again, but it does not explicitly contrast with alternatives or state when not to use it. This leaves some ambiguity for an agent deciding between removal and other invoice modification functions.

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.