Skip to main content
Glama

Delete document line

delete_document_line
DestructiveIdempotent

Delete a line item from a document (invoice, quote, bill, etc.). id is the line id; pass the parent document id as quinvoice so the correct document is updated. To change a line rather than remove it use update_document_item (or update_document_items_bulk for several).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesLine item id to delete (required).
invoiceNoAlias for quinvoice (the parent document id); prefer quinvoice.
invoiceidNoAlias for quinvoice (the parent document id); prefer quinvoice.
quinvoiceNoId of the parent document (invoice, quote, bill, etc.) the line belongs to — pass this so the correct document is updated. Required in practice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / id / description
      Added value: +"Line item id to delete (required)."
    • addedInput schema / properties / invoice / description
      Added value: +"Alias for quinvoice (the parent document id); prefer quinvoice."
    • addedInput schema / properties / invoiceid / description
      Added value: +"Alias for quinvoice (the parent document id); prefer quinvoice."
    • addedInput schema / properties / quinvoice / description
      Added value: +"Id of the parent document (invoice, quote, bill, etc.) the line belongs to — pass this so the correct document is updated. Required in practice."
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true; the description aligns with them and adds useful context by requiring the parent document id to update the right document. It doesn't elaborate on side effects like document totals, but this is acceptable given the annotations.

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 tight sentences cover the operation, key parameters, and alternative tool. There is no filler or repeated schema content.

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 tool with annotations covering safety and a fully documented schema, this description covers the necessary call pattern, clarifies the practical requirement, and routes to the correct alternative. Nothing critical is missing for an agent to select and invoke it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the description doesn't need to document every field. It adds value beyond the schema by emphasizing that id is the line id and quinvoice is the parent document id, and by noting quinvoice is required in practice even though it isn't in the schema's required list.

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 opens with a specific action and resource: 'Delete a line item from a document (invoice, quote, bill, etc.)'. This clearly distinguishes it from sibling tools like delete_document and update_document_item.

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?

It explicitly tells agents when not to use this tool: 'To change a line rather than remove it use update_document_item (or update_document_items_bulk for several)'. It also gives the key call requirement to pass quinvoice so the correct document is updated.

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