Skip to main content
Glama

Ekubo Protocol

Prepare ve-token fee reinvestment

prepare_ve33_reinvest
Read-only

Build the safe phased workflow for 'reinvest my fees': automatically claim all active voter fees, prepare one exact-input swap per claimed non-stake token, then increase one VeToken or every existing active allocation without changing ownership or replacing votes. phase=swap returns jurisdiction metadata inline on the result and on every child swap; it is not permission to trade. For a nonempty restricted_jurisdictions list, follow its execution_notice before requesting any signature. Phases run in order after each confirms: claim (omit claims to discover every active allocation; keep the pre-claim balance snapshots), swap with only the exact claimed deltas, never a pre-existing balance, then stake_all with the refreshed state_id and the measured STONX output.

Input Schema

NameRequiredDescriptionDefault
phaseYes
ve_idNodecimal integer
amountNoStake token base units (decimal integer)
claimsNo
senderYesaddress
sourceNo
chain_idYesWith ve_token, from get_ve33_allocations (STONX: 4663), not the wallet's chain
ve_tokenYesaddress
stake_tokenNoaddress
fee_balancesNo
slippage_bpsNo
current_state_idNobytes32 hex
swap_deadline_minutesNoEkubo router route deadline; default 30

Output Schema

NameRequiredDescriptionDefault
phaseNo
jurisdictionNojurisdiction metadata (ekubo-token-jurisdictions-v2): coverage, execution_hold, restricted_jurisdictions, per-asset classification
exact_input_full_balance_swapsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=true, and the description correctly reinforces rather than contradicts that by declaring 'it is not permission to trade'. It adds substantial non-schema behavior: per-phase confirmation gating, inline jurisdiction metadata on the result and every child swap, required pre-claim balance snapshots, state_id refresh between phases, and a signature-blocking notice for restricted jurisdictions — none of which the annotations convey.

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 intent and the three-phase sequence are front-loaded, and each sentence carries operational weight rather than filler. Some sentences are run-on and pack multiple constraints (balance snapshots, delta discipline, jurisdiction notices) into single clauses, which costs a little readability.

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

Completeness4/5

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

For a 13-parameter, four-phase orchestration tool with an output schema, the description covers ordering, state hand-off, safety constraints, and the return-value caveat about jurisdiction metadata. It leaves a few secondary inputs (source, slippage, swap deadline) unexplained, but the output schema relieves it of describing results and nothing essential to calling it correctly is missing.

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

Parameters4/5

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

With 62% schema coverage across 13 parameters, the description compensates by explaining the phase enum's workflow meaning, the omit-claims discovery mode, the exact-delta constraint on swap amounts, and the refreshed current_state_id requirement for stake_all — all beyond what the schema states. A few parameters (source, slippage_bps, swap_deadline_minutes) get no mention in the description, so it is useful but not exhaustive.

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?

States a specific verb and resource — build a phased 'reinvest my fees' workflow — and enumerates the three composed actions (claim all voter fees, swap claimed non-stake deltas, increase VeToken/allocation). This clearly distinguishes it from the atomic siblings prepare_ve33_claim_all_fees, prepare_ve33_increase_stake, and prepare_ve33_claim_fees, which it orchestrates.

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?

Gives explicit sequencing rules: phases run in order after each confirms, omit claims to discover allocations, swap only claimed deltas and never a pre-existing balance, and stake_all only with the refreshed state_id. The jurisdiction branch ('for a nonempty restricted_jurisdictions list, follow its execution_notice before requesting any signature') is a real when-to-do-X rule. It doesn't explicitly say when to prefer an atomic sibling over this composite, so it stops short of a 5.

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.