Skip to main content
Glama
ERP Procurement MCP Server

ERP Procurement MCP Server

Get invoice

get_invoice
Read-only

Fetch a single invoice by ID, including line items, supplier, linked purchase order, and goods receipts, to support ERP invoice review and three-way matching.

Instructions

Returns one invoice with its lines, the supplier, the purchase order it bills and the goods receipts for that order.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "invoiceId": "<invoiceId>"
    },
    "name": "get_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoiceIdYesInternal invoice id, for example INV-1001

Output Schema

NameRequiredDescriptionDefault
invoiceYes
supplierYes
goodsReceiptsYes
purchaseOrderYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

readOnlyHint=true and openWorldHint=false already tell the agent this is a safe, closed-world read, so the description's job is reduced. It usefully discloses that the response eagerly joins related entities (supplier, purchase order, goods receipts), which helps the agent avoid follow-up calls, but it says nothing about behavior on an unknown id or any access constraints.

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?

One sentence with zero filler, front-loading what is returned and then the related records bundled with it. Nothing could be removed without losing information.

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?

An output schema exists, so the description needn't enumerate return fields, yet it still sketches the response shape, which is a bonus rather than a gap. For a single-parameter read-only tool with full schema coverage, the only notable omission is not-found behavior.

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%: invoiceId, its ^INV-\d{4}$ pattern and an example are all documented in the schema itself. The description adds no further meaning about the identifier, 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?

"Returns one invoice" gives a specific verb and a single-resource scope, and the enumeration of lines, supplier, purchase order and goods receipts tells the agent exactly what the payload composes. It is implicitly distinguishable from search_invoices, but it never names or contrasts a sibling, so it falls short of the top mark.

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 tool takes a single invoiceId, so an agent can infer it is for fetching one known invoice rather than browsing. There is no explicit when-to-use, when-not-to-use, or pointer to search_invoices or match_invoice for discovery-style lookups.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.