Skip to main content
Glama

Build: sell an index

build_sell_index
Read-only

Sell index shares for USDC: one transaction redeems the shares for the basket and sells each token on KyberSwap, reverting below the quoted minimum.

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": {
      "wallet": "<wallet>",
      "index": "<index>",
      "shares": "<shares>"
    },
    "name": "build_sell_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYesthe index's token address
sharesYesindex shares to sell (18 decimals), as a decimal string, e.g. "25" or "0.5"
walletYesthe agent's wallet address — the one that will sign and send the calls

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=true; the description is consistent with that if read as describing the transaction that gets built (the schema notes the wallet is the one that "will sign and send the calls"). It adds genuinely useful behavior beyond the annotations: atomicity (redemption plus per-token KyberSwap sales in one transaction) and slippage protection (reverts below the quoted minimum). It stops short of saying what is actually returned (unsigned calls? gas estimate?) or which external venue supplies the quote.

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?

One front-loaded sentence: the action first, then the two facts that matter (single-transaction mechanism, revert-on-slippage). There is no filler, and each clause carries information.

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?

For a three-parameter, no-output-schema transaction builder, the definition covers the mechanism but omits what the caller receives back (so the agent cannot tell if it must sign and send separately), where the quoted minimum originates, and any approval prerequisites. Adequate but leaves real gaps for a state-changing workflow.

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 all three parameters (wallet, index, shares) are already documented, including the 18-decimal string format. The description adds no parameter-level meaning and in fact raises an unresolved question: it mentions a "quoted minimum", yet no quote or min-out parameter exists in the schema.

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 leads with a specific verb and resource ("Sell index shares for USDC") and then states the mechanism: a single transaction that redeems shares for the basket and sells each token on KyberSwap. That is enough to distinguish it from build_buy_index and the other build_* siblings without opening a schema.

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?

Usage is only implied by the verb "Sell" — the description never states when to choose this over build_buy_index, nor preconditions such as holding the shares, prior token approvals, or a fresh quote. An agent can infer the direction of the operation but gets no routing guidance or exclusions.

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