Skip to main content
Glama

List Purchase Orders

get_purchase_orders
Read-only

List purchase orders — orders THIS business places WITH its suppliers (replenishment POs by default). A customer's orders are SALES orders — use get_sales_orders for those. Supports reconciliation / status reporting. OPEN POs: in everyday speech "open" or "outstanding" purchase orders means the ones not finished yet — pass state=open (drafts, awaiting approval, sent to the supplier, partly received). state=closed is the finished ones (received, closed, closedShort, reconciled, fulfilled, canceled). Do NOT pass status=open for that: status matches ONE exact lifecycle status, and the status named open is only an unsent order still being edited, so it misses drafts and issued orders. Lifecycle statuses: created = draft; open = not yet sent, still editable; waitingApproval = awaiting internal approval; issued = sent to the supplier; receiving / partiallyFulfilled = partly received; pendingReceiptResolution / pendingReconciliation = receipt awaiting a decision; received / closed = fully received; closedShort = closed with quantity never received; reconciled / fulfilled = settled; canceled. Filters (all optional, AND-combined): type (po [default], dr, rfp, cro, crr); state (open, closed); status (one exact status; with state it must belong to that state; unknown values are rejected); numberSearch (case-insensitive substring of the PO number); partnerSearch (vendor name); sku (only POs with a line for that exact SKU); createdFrom/createdTo (ISO 8601 bounds on the created date). Newest first. Paged: returns Total (pre-paging — the answer to "how many") plus the page; default 100, max 500. Each row is an order-level summary (vendor, destination warehouse, total, line count, lifecycle dates) — not line detail. A client-pinned token sees only its own client's POs; an operator token sees the whole tenant's.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_purchase_orders"
  }
}

Input Schema

NameRequiredDescriptionDefault
skuNoReturn only POs containing a line for this exact SKU (case-insensitive).
typeNoDocument type: po (default), dr, rfp, cro, crr.
limitNoPage size (default 100, max 500).
stateNoGrouped lifecycle filter. open = not finished yet (open, created, waitingApproval, issued, receiving, partiallyFulfilled, pendingReceiptResolution, pendingReconciliation) — what "open purchase orders" means in everyday speech. closed = finished (received, reconciled, fulfilled, closed, closedShort, canceled). Omit for both.
offsetNoZero-based offset for paging (default 0).
statusNoExact lifecycle status, one value (e.g. created = draft, issued = sent to the supplier, closed). Not for "open POs" — use state=open; status=open matches only unsent orders still being edited. Omit for all statuses.
createdToNoOnly POs created on/before this ISO 8601 instant, or through the end of this local day for a bare YYYY-MM-DD.
createdFromNoOnly POs created on/after this ISO 8601 instant, or from the start of this local day for a bare YYYY-MM-DD.
numberSearchNoCase-insensitive substring match on the PO number.
partnerSearchNoCase-insensitive substring match on the vendor name.

Output Schema

NameRequiredDescriptionDefault
okNo
limitNo
totalNo
offsetNo
ordersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish read-only, non-destructive, closed-world, so the description is free to add operational behavior the annotations cannot express: newest-first ordering, paging with default 100 / max 500, that Total is pre-paging ('the answer to "how many"'), that rows are order-level summaries rather than line detail, and that a client-pinned token only sees its own client's POs while an operator token sees the tenant. These materially change how an agent interprets and trusts the result.

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 identity/alt-tool distinction before the paging and token detail, and organized in a scannable order. It is long and the full lifecycle-status enumeration duplicates what the state and status schema descriptions already say, which costs it a point, but the dense lines are information-bearing rather than filler.

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 10-parameter, fully optional list tool with an output schema present, the description covers everything an agent needs: scope of the data, ordering, paging semantics including the Total caveat, row granularity, and token-visibility limits. Nothing required to call it or read its output correctly is missing.

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 baseline is 3, but the description adds interpretation the schema alone does not: filters are 'AND-combined', status values must belong to the chosen state, unknown status values are rejected, sku requires an exact line match, and type defaults to po. It largely mirrors the schema's lifecycle glossary, but the combinability and validation notes are genuine additions.

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 ('List purchase orders') and immediately disambiguates the resource by naming the sibling it is not: 'A customer's orders are SALES orders — use get_sales_orders for those.' An agent can pick between get_purchase_orders and get_sales_orders without inspecting either schema.

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 explicit when-to-use framing (reconciliation / status reporting), names the alternative tool and the condition that selects it, and pre-empts the most likely misuse by warning 'Do NOT pass status=open for that' with the reason (status matches one exact lifecycle value). The state=open vs status=open exclusion is exactly the kind of routing guidance that prevents bad calls.

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