Skip to main content
Glama

Delete line item (draft)

delete_invoice_item
Destructive

Remove a line item from a Draft invoice. Totals are recalculated automatically. Item ids come from get_invoice or add_invoice_item. Call with confirm:true to delete; without it, returns a preview of the item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoMust be true to delete. Omit/false to preview only.
item_idYesThe line item UUID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoDeleted line item UUID (after confirm:true).
noteNoNext-step guidance, present on preview responses.
previewNoTrue when the call was a preview (confirm omitted or false): nothing was changed.
would_deleteNoLine item that would be deleted (preview only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / item_id / description
      Added value: +"The line item UUID."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "id": {
      +      "description": "Deleted line item UUID (after confirm:true).",
      +      "type": "string"
      +    },
      +    "note": {
      +      "description": "Next-step guidance, present on preview responses.",
      +      "type": "string"
      +    },
      +    "preview": {
      +      "description": "True when the call was a preview (confirm omitted or false): nothing was changed.",
      +      "type": "boolean"
      +    },
      +    "would_delete": {
      +      "additionalProperties": false,
      +      "description": "Line item that would be deleted (preview only).",
      +      "properties": {
      +        "description": {
      +          "description": "Line text.",
      +          "type": "string"
      +        },
      +        "id": {
      +          "description": "Line item UUID.",
      +          "type": "string"
      +        },
      +        "invoice_id": {
      +          "description": "Parent invoice UUID.",
      +          "type": "string"
      +        },
      +        "line_total": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Line total incl. VAT, null for non-item lines."
      +        },
      +        "quantity": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Quantity, null for section/description lines."
      +        },
      +        "unit_price": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Unit price excl. VAT, null for non-item lines."
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "description",
      +        "quantity",
      +        "unit_price",
      +        "line_total",
      +        "invoice_id"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes beyond the destructiveHint annotation by explaining that totals are recalculated automatically, that item IDs come from get_invoice/add_invoice_item, and that confirm:true is required for actual deletion while omission returns a preview.

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 compact and logically ordered: action, automatic side effect, ID source, and confirmation requirement. No redundant or vague wording.

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?

Covers the key workflow aspects including deletion guard and preview return, but does not explicitly state the success return shape or error scenarios, though the preview mention gives partial output context.

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

Parameters5/5

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

Both parameters are fully described in the schema, and the description adds practical context for item_id sourcing and the boolean confirm semantics (delete vs preview).

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?

Clearly states the specific action 'Remove a line item from a Draft invoice', identifies the source of item IDs, and explains the confirm/preview behavior, which distinguishes it from related invoice/item tools.

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?

Provides clear conditions for use (Draft invoices only) and explains the confirm flag behavior, but does not explicitly contrast with sibling tools such as update_invoice_item or delete_invoice.

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.