Skip to main content
Glama

ERPNext: Get sales invoice

erpnext_get_sales_invoice
Read-only

ERPNext: One sales invoice with its lines, taxes, totals and status. Returns the full invoice: customer, dates, every item line with quantity, rate and amount, the tax rows, net and grand totals, outstanding amount and status. docstatus is 0 for a draft, 1 for a submitted invoice and 2 for a cancelled one. 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

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds genuine behavioral value beyond that: the docstatus enum semantics (0=draft, 1=submitted, 2=cancelled) and the requirement for a Cotlet API key with access to the app. It does not cover failure modes (e.g. unknown invoice ID), keeping it below 5.

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?

Front-loaded with the core action, then return shape, then docstatus semantics, then auth. Each sentence carries information, though the enumerated return fields are somewhat list-like and the auth note could be tightened. No output schema exists, so describing the return payload is justified rather than redundant.

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?

With no output schema, the description properly compensates by naming the returned fields (customer, dates, lines, taxes, totals, outstanding, status) and explains the docstatus codes. Auth prerequisites are stated. Only minor gaps remain, such as error behavior for a missing or inaccessible invoice.

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% for the single 'invoice' parameter, and the schema itself explains that the value comes from list_sales_invoices or create_sales_invoice. The description adds no parameter-level detail beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource (get one sales invoice) and enumerates exactly what comes back: lines, taxes, totals, status. The singular 'One sales invoice' implicitly contrasts with the sibling list_sales_invoices, but no sibling is named explicitly, so it falls short of the top-tier sibling differentiation.

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?

Usage is only implied: the schema tells the agent the invoice ID comes from list_sales_invoices or create_sales_invoice, which hints at when this tool is reachable. There is no explicit when-to-use vs when-to-use-something-else guidance (e.g. versus list_sales_invoices or list_overdue_invoices).

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