Skip to main content
Glama
janishkumar

po-guard-mcp

by janishkumar

amend_purchase_order

Replace the line items on an unapproved purchase order and return it to Draft for resubmission, using a preview confirmation code to apply the amendment.

Instructions

Replace the lines of an unapproved order. It goes back to Draft for resubmission.

Args: po: Purchase order ID. lines: The full new set of lines (same shape as create_purchase_order). confirmation_code: From preview("amend_purchase_order", ). notes: Optional new notes.

Input Schema

NameRequiredDescriptionDefault
poYes
linesYes
notesNo
confirmation_codeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Beyond annotations it discloses the two things an agent most needs: existing lines are wholly replaced (not merged) and the order state is reset to Draft, which matters most for an unapproved-only operation. It also surfaces the two-step confirmation guard from preview. Minor tension with destructiveHint=false given full line replacement, but since the target is an unapproved draft that is recoverable via resubmission, this reads as scoping rather than contradiction.

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?

Purpose and state effect are front-loaded in two sentences, then a compact Args block with one line per parameter. No filler; the docstring format is slightly mechanical but every entry earns its place.

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?

An output schema exists so return values need no explanation, and the description covers the state rule, replacement semantics, and prerequisite confirmation code. Remaining unstated behavior (validation errors on approved orders, whether prices/approvers are re-derived) is not critical to calling it correctly.

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 description coverage is 0%, so the description carries the full burden and mostly does: po is the order ID, lines is the complete replacement set (explicitly not additive) and defers shape to create_purchase_order, confirmation_code's provenance is spelled out, notes is optional. Only gap is that the exact object shape of a line is left entirely to a sibling tool.

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+resource ('Replace the lines of an unapproved order') plus the resulting state change ('goes back to Draft for resubmission'). It also implicitly distinguishes itself from create_purchase_order by referencing that tool's line shape, though it never explicitly names which sibling to use when the order IS approved.

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 a hard precondition ('unapproved order') and a required workflow step: confirmation_code must come from preview("amend_purchase_order", <these same args>). That is real when-to-use guidance. It stops short of naming the alternative path for approved orders (e.g. cancel/reject + recreate), leaving that to inference.

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