Skip to main content
Glama

FarmDash Agent OS

execute_swap

Destructive

Compatibility route: validate a signed token-swap request after a fresh successful simulation and return transaction calldata. FarmDash does not broadcast the returned transaction. Generic execute_approved_intent remains unavailable.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fromChainId": "<fromChainId>",
      "toChainId": "<toChainId>",
      "fromToken": "<fromToken>",
      "toToken": "<toToken>",
      "fromAmount": "<fromAmount>",
      "agentAddress": "<agentAddress>",
      "toAddress": "<toAddress>",
      "nonce": "<nonce>",
      "signature": "<signature>",
      "simulationId": "<simulationId>"
    },
    "name": "execute_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
nonceYes
toTokenYesERC-20 token contract address deployed on the corresponding chain. Do not pass a wallet/EOA; the token address and chain ID must match.
intentIdNo
protocolNo
slippageNo
fromTokenYesERC-20 token contract address deployed on the corresponding chain. Do not pass a wallet/EOA; the token address and chain ID must match.
signatureYes
toAddressYes
toChainIdYes
fromAmountYes
fromChainIdYes
agentAddressYes
simulationIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, idempotentHint=false, openWorldHint=true, so the safety profile is covered. The description adds genuinely new behavior: FarmDash does not broadcast the returned transaction, and the request must follow a fresh successful simulation. It does not specify what happens on a stale simulationId or what failure modes are returned, which keeps it from a 5.

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?

Three short sentences, front-loaded with the core action and immediately followed by the most important behavioral caveat (no broadcast). The trailing note about execute_approved_intent earns its place by explaining the route's existence. No filler.

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

Completeness2/5

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

For a destructive, 13-parameter, low-coverage tool with no output schema, the definition omits too much: parameter semantics, what the returned calldata is meant to be used for, and error behavior on invalid signatures or stale simulations. It covers the workflow gating well but leaves an agent unable to construct the call from the description alone.

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

Parameters2/5

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

With 13 parameters and only 15% schema description coverage, the description needs to compensate and does not. It never explains nonce, signature, simulationId, slippage, protocol enum, or the chain-ID pairing rules. Only fromToken/toToken carry schema descriptions, and those come from the schema, not the text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb+resource pair: it validates a signed token-swap request and returns transaction calldata. It also signals positioning relative to a sibling by saying the generic execute_approved_intent route is unavailable, so an agent can tell this is the compatibility path. The only ambiguity is that the name says 'execute' while the text says it returns calldata without broadcasting, which the description does clarify.

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 states a concrete precondition: a fresh successful simulation must precede the call. It also explains why this route exists (execute_approved_intent unavailable), which effectively names the alternative and its status. It stops short of saying when to prefer confirm_swap or the other confirm_* siblings over this one.

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.

Resources