Skip to main content
Glama

write.asset_manager.yield_claimer

Read-onlyIdempotent

Automate periodic claiming of pending fees and emissions from liquidity positions, then transfer them to a specified recipient address.

Instructions

Encode args for the standalone yield claimer automation. Periodically claims pending fees/emissions and sends them to a designated recipient (wallet, another account, or any address). Returns { asset_managers, statuses, datas } — pass to write.account.set_asset_managers. Combinable with other intent tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dex_protocolYesDEX protocol of the LP position — used to resolve the correct asset manager address.
fee_recipientYesAddress to receive claimed fees (wallet address or any destination)
enabledNoTrue to enable, false to disable
chain_idNoChain ID: 8453 (Base) or 130 (Unichain)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasYes
statusesYes
descriptionNo
strategy_nameNo
asset_managersYes

Implementation Reference

  • The tool "write.asset_manager.yield_claimer" is registered and handled within this function in src/tools/write/asset-managers/yield-claimer.ts.
    export function registerYieldClaimerTools(
      server: McpServer,
      _chains: Record<ChainId, ChainConfig>,
    ) {
      server.registerTool(
        "write.asset_manager.yield_claimer",
        {
          annotations: {
            title: "Encode Yield Claimer Automation",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
          },
          description:
            "Encode args for the standalone yield claimer automation. Periodically claims pending fees/emissions and sends them to a designated recipient (wallet, another account, or any address). Returns { asset_managers, statuses, datas } — pass to write.account.set_asset_managers. Combinable with other intent tools.",
          outputSchema: IntentOutput,
          inputSchema: {
            dex_protocol: DEX_PROTOCOL_SCHEMA,
            fee_recipient: z
              .string()
              .describe("Address to receive claimed fees (wallet address or any destination)"),
            enabled: z.boolean().default(true).describe("True to enable, false to disable"),
            chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
          },
        },
        async (params) => {
          try {
            const validChainId = validateChainId(params.chain_id);
            const amKey = dexProtocolToAmKey(params.dex_protocol);
            const amAddress = getAmProtocolAddress(validChainId, "yieldClaimers", amKey);
    
            if (!params.enabled)
              return formatResult(
                disabledIntent([amAddress], `Disable yield_claimer (${params.dex_protocol})`),
              );
    
            const validFeeRecipient = validateAddress(params.fee_recipient, "fee_recipient");
            const callbackData = encodeYieldClaimerCallbackData(CLAIMER_INITIATOR, validFeeRecipient);
    
            const result = {
              description: `Enable yield_claimer (${params.dex_protocol})`,
              asset_managers: [amAddress],
              statuses: [true],
              datas: [callbackData],
            };
            return formatResult(result);
          } catch (err) {
            return {
              content: [
                {
                  type: "text" as const,
                  text: `Error: ${err instanceof Error ? err.message : String(err)}`,
                },
              ],
              isError: true,
            };
          }
        },
      );

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/arcadia-finance/arcadia-finance-mcp-server'

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