Skip to main content
Glama

Email Purchase Order

email_purchase_order

Send a purchase order to its vendor by email (the PO as a PDF, with prices). A draft (status created) is issued first; an order already issued is sent again. An order that still needs a person's approval is not sent — issue_purchase_order sends it for approval instead. The email goes to the vendor's email address, or to emailTo when given; with neither, the call is refused. The preview shows the recipient, PO number, total and whether the order will be issued. Two-step: preview=true, then commit with the previewReceipt.

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": {
      "purchaseOrder": "<purchaseOrder>"
    },
    "name": "email_purchase_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailToNoOptional address to send to instead of the vendor's email (one address).
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing is sent until the commit call.
purchaseOrderYesPurchase order id (GUID) or document number (e.g. PO-1042).
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
okNo
issuedNo
numberNo
statusNo
emailedNo
previewNo
warningsNo
expiresAtNo
recipientNo
emailErrorNo
commitInputNo
emailStatusNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
purchaseOrderIdNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, destructive=false, idempotent=false, openWorld=true), the description discloses the side effects: the draft is transitioned to issued, already-issued orders are re-sent, and orders awaiting approval are rejected. It also spells out the two-step preview/commit requirement and what the preview returns, none of which the annotations convey.

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?

Roughly six short sentences, each carrying distinct information — delivery form, state preconditions, the sibling alternative, recipient resolution, preview contents, and the two-step procedure. The ordering is front-loaded with the primary action and the constraint that would most change an agent's decision.

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 state-dependent write tool, the description covers preconditions, refusal cases, recipient resolution, and the mandatory preview-then-commit flow; an output schema exists, so return shape is covered structurally. Nothing an agent needs to call it 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 the baseline is 3; the description still adds value by explaining the emailTo override with its fallback-to-vendor behavior and the refusal when neither address exists, and by framing preview and previewReceipt as ordered steps rather than standalone fields. It is largely consistent with the schema text, so it is additive but not transformative.

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 ('Send a purchase order to its vendor by email'), plus the delivery form (PO as a PDF with prices). It explicitly distinguishes itself from issue_purchase_order, which handles the approval path, so an agent can route between the two without opening schemas.

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 concrete when-to-use cases (draft status 'created' is issued; an already-issued order is re-sent) and an explicit when-not with the alternative named: an order needing approval is not sent here, use issue_purchase_order instead. It also states the refusal condition when no recipient exists.

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