Skip to main content
Glama

create_purchase_order

Creates a draft purchase order for an existing supplier with article rows, pricing, currency, and delivery details without sending it.

Instructions

Create a purchase order (not sent). rows: [{article_number, quantity, price (in the PO currency), description?}]; every article must exist (create_article first). Currency defaults to the supplier's, the rate comes from Fortnox. internal_reference = your own reference (e.g. the supplier's order number). language = Fortnox language code for the PO document (GB = English). Delivery address = the stock point's address, else the company address from Fortnox.

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": {
      "supplier_number": "<supplier_number>",
      "rows": "<rows>"
    },
    "name": "create_purchase_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsYes
dry_runNo
currencyNo
languageNoGB
delivery_dateNo
our_referenceNo
payment_termsNo
supplier_numberYes
confirmation_emailNo
internal_referenceNo
message_to_supplierNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does meaningful work: it discloses that the PO is created but not sent, that currency defaults to the supplier's and the rate is sourced from Fortnox, and how the delivery address is resolved (stock point, else company address). It omits failure behavior, permission requirements, and what dry_run actually does, which leaves real gaps for 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?

Dense and front-loaded: the core action and the not-sent caveat come first, followed by row structure, then per-field clarifications. The telegraphic style costs little but the fragmentary clauses around delivery address are slightly harder to parse than necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter mutation tool with no annotations and no output schema, the description covers the high-risk parts (article existence, currency/rate resolution) but leaves a validation flag like dry_run undefined and never indicates what a successful response contains. It is adequate to attempt the call but not complete enough to call correctly on the first try.

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 description coverage is 0% across 11 parameters, so the description must compensate and it only partly does: it defines the rows item shape (article_number, quantity, price semantics, optional description), currency defaulting, internal_reference meaning, and language codes. Six parameters (dry_run, our_reference, payment_terms, confirmation_email, message_to_supplier, delivery_date) get no explanation anywhere, so an agent cannot confidently populate them.

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 ("Create a purchase order") and adds the crucial scope qualifier "(not sent)", which separates it from send_purchase_order and complete_purchase_order in the sibling set. An agent can identify the operation and its terminal state without opening the schema.

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?

Gives an explicit prerequisite ("every article must exist (create_article first)"), which tells the agent what must happen before calling and names the prerequisite tool. It does not explicitly state when to use this versus send_purchase_order in workflow terms, but the "(not sent)" note carries most of that routing signal.

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