Skip to main content
Glama

ERPNext: Submit sales invoice

erpnext_submit_sales_invoice

ERPNext: Submits a draft sales invoice so it posts to the ledger. Moves a draft Sales Invoice to submitted (docstatus 1). The invoice then affects the books and shows Unpaid until paid, or Overdue after its due date. A submitted invoice cannot be edited; to change it, cancel it with cancel_sales_invoice and create a new draft. The call returns ERPNext's error if a required field is empty. By default you confirm each call; you can switch that off for this tool. Reaches other people: confirm with the user before each call. Needs the user's Cotlet API key with access to this app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoiceYesSales Invoice ID from list_sales_invoices or create_sales_invoice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: ledger posting, resulting status (Unpaid/Overdue), immutability after submission, the required cancel-and-recreate path, error behavior for missing fields, confirmation default, and the need for a Cotlet API key. With annotations already declaring readOnly=false and destructive=false, these details give the agent the operational context it needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the purpose and state transition, and most sentences earn their place by covering immutability, alternatives, confirmation, and auth. It is somewhat longer than necessary, with confirmation/safety guidance split across two sentences, but it remains readable and well-structured.

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 mutation tool with no output schema, the description supplies the missing context: ledger impact, document lifecycle, reversal path, error behavior, confirmation requirements, and auth needs. Combined with annotations that already cover safety hints, an agent has everything needed to decide when and how to call it.

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 coverage is 100%, so the single invoice parameter is already fully documented in the schema as a Sales Invoice ID from list_sales_invoices or create_sales_invoice. The description does not add argument-level detail such as format, source constraints, or example value beyond what the schema provides, so the baseline 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?

States a specific verb and resource ('Submits a draft sales invoice') and the exact state transition ('Moves a draft Sales Invoice to submitted (docstatus 1)'). It also distinguishes itself from the sibling correction path by naming cancel_sales_invoice, so an agent can tell when this posts versus when another tool is needed.

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?

Gives clear when-to-use context (a draft invoice that should post to the ledger) and when-not-to-use/alternative guidance ('A submitted invoice cannot be edited; to change it, cancel it with cancel_sales_invoice and create a new draft'). It also adds the important invocation condition that the call reaches other people and should be confirmed with the user first.

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