Skip to main content
Glama

create_order_transaction

Create a transaction for an order, covering authorization, capture, sale, void, or refund, and update the order's financial status accordingly.

Instructions

Create a transaction for an order (e.g. capture, sale, refund). Side effect: creates a Transaction record and may change order financial_status. kind: authorization | capture | sale | void | refund.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesTransaction kind. Required.
amountYesTransaction amount in VND (float). Required.
gatewayNoPayment gateway name (e.g. "cod", "bank_transfer").
currencyNoCurrency code, defaults to "VND" for Sapo stores.
order_idYesOrder ID to create transaction for. Required.
parent_idNoParent transaction ID (required for capture/void/refund kinds).
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden. It transparently discloses that this tool creates a Transaction record and may change order financial_status, which are key side effects. However, it does not mention error scenarios, prerequisites (e.g., parent_id for certain kinds), or return behavior, leaving some gaps.

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?

The description is three short sentences, front-loaded with the core purpose, followed by side effect and allowed kinds. The kind enumeration is somewhat redundant with the schema, but the overall structure is efficient and free of fluff. It could omit the repeated enum to be even more concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has six parameters, no annotations, and no output schema. The description explains the primary side effect and allowed kinds, but lacks details on what the response contains, prerequisites for certain kinds (beyond schema), or failure modes. For a mutation tool with non-trivial side effects, this is adequate but not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters. The description only repeats the kind enum values already present in the schema and adds minimal new meaning; the side effect note is behavioral rather than parameter-specific. This matches the baseline for high schema coverage.

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?

Clearly states the action: 'Create a transaction for an order' with specific kinds (capture, sale, refund). It also distinguishes itself from sibling list tools like list_order_transactions by focusing on creation, and from update_order by targeting transaction records and financial status.

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?

The description implies usage through the kinds (authorization, capture, sale, void, refund) and the side effect on financial_status, but it does not explicitly state when to use this tool versus alternatives or provide exclusion conditions. No direct comparison with sibling tools like update_order or create_fulfillment is given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nguyennguyenit/Sapo-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server