Skip to main content
Glama

AssetLab

Create purchase order line

create_purchase_order_line

Add a line item to a purchase order. Requires purchase_orders:write scope. The PO's amount becomes the sum of its lines. A line naming a part_id is counted in whole units, and its quantity_received is added to that part's stock. Required: purchase_order_id, description, quantity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
part_idNoPart from inventory - resolve via list_parts
quantityYesQuantity ordered (required)
unit_costNoPrice per unit, in the organization currency
descriptionYesWhat is being ordered (required)
line_numberNoPosition on the order
purchase_order_idYesPurchase order ID (required) - resolve via list_purchase_orders
quantity_receivedNoQuantity received so far, 0 to quantity

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the auth scope needed, the side effect on the parent PO (amount becomes the sum of its lines), and an inventory side effect (quantity_received is added to the part's stock, counted in whole units). This is real mutation context the hints alone do not convey, though it stops short of describing failure/reversal behavior.

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?

Four short sentences, front-loaded with the core action and scope, followed by side-effect behavior and required fields. No filler, though the required-params sentence partially repeats the schema's required array.

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?

For a 7-parameter non-idempotent mutation with no output schema, the description covers scope, parent-record effects, and inventory effects. Minor gaps (line_number defaulting, error behavior) are not critical for correct invocation.

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, but the description adds meaning beyond the schema by explaining how quantity interacts with part stock and units, and by restating the three required params. The unit-cost and line_number semantics remain schema-only.

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?

States a specific verb and resource ('Add a line item to a purchase order'), which clearly distinguishes it from create_purchase_order and update_purchase_order_line. It does not explicitly name sibling alternatives, so it sits just below the top tier.

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 implied by the purchase-order workflow and the stated required scope, but the description never says when to use this versus update_purchase_order_line or bulk_create, nor does it mention prerequisites beyond the scope string. Adequate but with clear gaps.

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