Skip to main content
Glama
emercoin

Emercoin swap

Official

Cancel an unpaid EMC order

cancel_order
Destructive

Cancel an unpaid buy order using its token to expire it and free the slot. Use this only before payment is made.

Instructions

Cancel a still-unpaid buy_emc order by its token, expiring it now and freeing its slot ahead of the TTL. Use this only before you pay; once a payment is in flight or confirmed it is too late and this errors. A payment sent after cancellation matches nothing and is NOT refunded. To only inspect an order without changing it, use get_order_status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesopaque order handle returned by buy_emc; pass it back unchanged

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYeshuman-quotable order number (DB id)
statusYes
amount_usdtYes
emc_amountYes
destination_emc_addressYes
deposit_addressYes
emc_txidNo
expires_atYes
Behavior5/5

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

Describes destruction (expiring, freeing slot), error on late payment, and consequence of no refund. Annotations already indicate destructiveHint=true, but description adds valuable context beyond annotations.

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 sentences with no wasted words. First sentence states core action and effect. Subsequent sentences provide timing constraints, error condition, and alternative tool. Efficient and well-structured.

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

Completeness5/5

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

For a single-parameter tool with output schema present, description gives complete behavioral context: what it does, when to use, error cases, consequence of misuse, and alternative. No gaps.

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 coverage is 100% for the single token parameter. Description only references the token generically, adding no new semantics beyond what the schema already provides for the parameter.

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?

Description clearly states the tool cancels an unpaid buy_emc order by token, expiring it and freeing its slot. It distinguishes from sibling get_order_status, which is for inspection only.

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?

Explicitly states to use only before payment, with clear error condition if too late. Mentions alternative get_order_status for inspection. Does not contrast against buy_emc or get_swap_config, but coverage is adequate.

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/emercoin/swap'

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