Skip to main content
Glama

KiotViet MCP by usefulapi

Create sales order

kiotviet_create_order

WRITE: create a sales order (an order, not an invoice: no invoice is made and no payment is recorded) with lines of existing products in a branch, for an existing customer or none. Always confirm the products, quantities and prices with the user first. POST /orders.

Input Schema

NameRequiredDescriptionDefault
itemsYesThe order lines.
discountNoOrder discount amount.
branch_idYesBranch the order is for (see kiotviet_list_branches).
sold_by_idNoSalesperson user id (see kiotviet_list_users).
customer_idNoExisting customer id (see kiotviet_list_customers).
descriptionNoNote on the order.
sale_channel_idNoSales channel id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false and openWorldHint=true. The description adds real value beyond that: the write does not generate an invoice and does not record payment, and inputs must already exist. It omits the practical consequence of non-idempotency (retries can create duplicate orders), which would be the final missing piece.

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?

Three compact sentences, front-loaded with the 'WRITE:' marker and the order-vs-invoice disambiguation before the operational caveats. No restatement of the title, no filler.

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 mutation tool with no output schema, the description covers what is created and the preconditions, but never states what comes back (e.g., the new order id), which the agent needs in order to chain into kiotviet_get_order. That is the one substantive omission.

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 genuine semantics: items must reference existing products, branch_id is the branch the order belongs to, and customer_id is optional ('existing customer or none'). That resolves the optionality question an agent would otherwise have to infer from the required list.

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 sales order) and immediately disambiguates from the nearest confusing concept: 'an order, not an invoice: no invoice is made and no payment is recorded'. The scope is further narrowed to lines of existing products in a branch and an existing customer or none, so an agent can distinguish this from any invoice-related sibling 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 a concrete pre-call workflow constraint ('Always confirm the products, quantities and prices with the user first') and implies prerequisite resources exist (products, branch, customer). It does not name an explicit alternative tool for the invoice path, but with no create_invoice sibling available, the when-to-use context is clear enough.

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.