Skip to main content
Glama

Prepare CoW Order for Signing

cow_prepare_order
Read-onlyIdempotent

Generate EIP-712 typed data to sign a CoW Protocol order. Use after getting a quote to build the order structure for signing and submission.

Instructions

Prepare an order for signing with EIP-712.

This generates the typed data structure needed to sign a CoW Protocol order. Use this after getting a quote from cow_get_quote.

Args:

  • network: The blockchain network

  • sellToken, buyToken: Token addresses or symbols

  • sellAmount, buyAmount, feeAmount: Amounts from the quote

  • validTo: Expiration timestamp from the quote

  • from: The address that will sign the order

  • kind: Order kind (sell/buy)

  • partiallyFillable: Whether partial fills are allowed

  • receiver: Optional receiver (defaults to from)

  • appData: Optional app data hash

Returns:

  • EIP-712 typed data JSON

  • Foundry cast command to sign the order

  • curl command to submit the signed order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesThe address that will sign and own the order
kindNoOrder kindsell
appDataNoOptional app data hash (defaults to empty)
networkNoThe network to prepare the order formainnet
validToYesUnix timestamp when order expires (from quote.validTo)
buyTokenYesThe token to buy (address or symbol)
receiverNoOptional receiver address (defaults to from)
buyAmountYesThe minimum amount to buy in wei
feeAmountYesThe fee amount in wei (from quote)
sellTokenYesThe token to sell (address or symbol)
sellAmountYesThe exact amount to sell in wei
partiallyFillableNoWhether the order can be partially filled
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive. The description adds behavioral details: it generates typed data structure, returns EIP-712 JSON and shell commands. This goes beyond annotations by describing the output format and the signing preparation nature, confirming it does not submit orders.

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 extremely concise with two short paragraphs and bullet lists for args and returns. Every sentence adds value: the first line states the action, the workflow hint, then structured parameter and return details. No fluff.

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?

Given 12 parameters (7 required) and no output schema, the description is complete: it explains the tool's purpose, workflow position, full input list (though not detailed beyond schema), and detailed return structure (three items). 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%, so each parameter already has a description. The description's Args section lists parameters but does not add new information beyond the schema. It does group them and notes they come from the quote, which is mild added value. Baseline score of 3 is appropriate.

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 clearly states the tool prepares an order for EIP-712 signing, a distinct step after getting a quote. It uses specific verbs and resource, and the sibling tools list shows no overlap (e.g., cow_get_quote, cow_get_order). The workflow hint 'Use this after getting a quote from cow_get_quote' further distinguishes it.

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?

The description explicitly says to use this tool after cow_get_quote, providing clear context for its place in the workflow. It does not explicitly state when not to use it or mention alternatives, but the use case is very specific and well-defined.

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/saturn-dbeal/cow-skill'

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