Skip to main content
Glama
vansyson1308

kiotviet-mcp

by vansyson1308

Draft a purchase order (step 1 of 2)

create_purchase_order_draft

Create a purchase order draft from suggestions or given SKUs, returning a 5-minute confirmation token. Confirm before anything is sent to KiotViet.

Instructions

Drafts a KiotViet purchase order from the current suggestions (or the given product codes) and returns a confirmation_token valid for 5 minutes. Nothing is sent to KiotViet until confirm_purchase_order is called after the user says yes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesYes
est_totalYes
confirmation_tokenYes
expires_in_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

The annotations only state that the operation is not read-only and not destructive, but the description adds crucial behavioral detail: the action is a draft only, nothing reaches KiotViet until confirmation, and the returned confirmation_token expires in 5 minutes. This transient-token and two-step commit context is exactly what an agent needs.

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?

The description is two sentences with no filler. The first sentence front-loads the action and result; the second sentence states the critical non-effect of not sending the order until confirmation.

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 single-optional-param draft tool with an output schema and non-destructive annotations, it covers token expiry, the two-step confirmation flow, and how item input is sourced. A minor gap is what happens when neither suggestions nor items are available, but this does not block 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?

With 0% schema coverage, the description compensates meaningfully by explaining that the tool can use 'current suggestions' when no items are given, or can take given product codes as an override. It does not fully describe qty semantics, but the param names and constraints already convey most of that.

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 description names a specific verb ('Drafts'), a specific resource ('KiotViet purchase order'), and the workflow position ('step 1 of 2'). It also clearly distinguishes this from the sibling confirm_purchase_order by stating that nothing is sent until that later step is called.

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 establishes this tool as the first step in a two-step flow and explains that confirm_purchase_order must follow only after the user approves. It does not explicitly list when not to use it or compare against other siblings, but the workflow context is unambiguous.

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