Skip to main content
Glama

Create a purchase order

create_purchase_order

Draft a purchase order to a vendor in these books. A line with no unit_cost takes the item's cost from the price book, and a line with neither is refused — never $0.00. It is created as a draft unless issue: true, which opens it straight away (or sends it for approval when the books require one) so goods can be received against it. Nothing is emailed to the vendor either way. Usually queued for the account holder to approve (read staged). Nothing is paid by this.

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": {
      "vendor_id": "<vendor_id>",
      "lines": "<lines>"
    },
    "name": "create_purchase_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
memoNo
issueNoOpen the order now (or send it for approval, if the books require one) instead of saving a draft. Needed before goods can be received.
linesYes
ship_toNo
entity_idNoAnother entity in the same books (ids from `list_entities`). Leave out to use the entity the person is working in.
tax_totalNoTax on the order, if known. Default 0.
vendor_idYesFrom `list_vendors`.
order_dateNoISO date. Default today.
expected_dateNoISO date it should arrive.

Output Schema

NameRequiredDescriptionDefault
idNoThe created or updated record's id, when the write was applied rather than staged.
noteNoWhy the result was truncated, when it was.
stagedNoTRUE means nothing has changed yet — the write is queued in the account holder's Approvals queue in Seayora. Say it is waiting for approval; never report it as done.
draft_idNoThe staged proposal's id, when it was queued rather than performed.
truncatedNoPresent and true when the result was too large to return in full. Treat it as a partial answer.
total_availableNoHow many rows existed before truncation.

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?

Beyond the annotations (readOnlyHint=false, destructiveHint=false, non-idempotent), it discloses the cost-resolution fallback, the refusal behavior for incomplete lines ('never $0.00'), the draft/issue/approval branching, and the approval queue with a pointer to read `staged`. The explicit 'nothing is emailed' and 'nothing is paid' statements prevent costly misinterpretation of a create operation.

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 definition is dense but front-loaded, with the creation behavior first and the negative guarantees (no email, no payment) as short trailing sentences that each resolve a real ambiguity. A slightly tighter grouping of the approval-related sentences would read better, but there is no 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 9-parameter mutation tool with an output schema already covering return values, the description supplies exactly what structured fields cannot: state branching, cost fallback rules, rejection behavior, and side-effect guarantees. Nothing an agent needs to invoke it safely 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?

With 67% schema coverage, the description still adds real meaning for the highest-risk parameters: it explains the dependency between `unit_cost`, `item_id`, and `description` on a line and what happens when both are absent. Secondary fields like memo, ship_to, and tax_total are left to the schema, which is reasonable.

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 opening sentence names a specific verb ('Draft') and resource ('purchase order') with scope ('to a vendor in these books'), which cleanly separates it from sibling creation tools like create_sales_order or create_work_order. The description also clarifies the two terminal states of the created object (draft vs issued).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly states the condition that changes behavior ('created as a draft unless `issue: true`') and what that flag unlocks ('so goods can be received against it'). It also sets boundaries by saying nothing is emailed and nothing is paid, implicitly ruling out send/pay tools, though it names no explicit alternative tool.

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