Skip to main content
Glama

write.asset_manager.merkl_operator

Read-onlyIdempotent

Encode Merkl protocol incentive reward claims for Arcadia Finance liquidity pools. Configure asset managers to capture additional token team rewards beyond standard LP fees.

Instructions

Encode args for the Merkl operator automation. Claims external Merkl protocol incentive rewards into the account — additional rewards paid by token teams on top of regular LP fees. Enable when the pool has active Merkl campaigns (check APY breakdown in read.strategy.list). Always combine with rebalancer when both are relevant — no conflict, extra free yield. Returns { asset_managers, statuses, datas } — pass to write.account.set_asset_managers. Combinable with other intent tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reward_recipientYesAddress to receive Merkl rewards
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 handler function that executes the logic for the "write.asset_manager.merkl_operator" tool.
    async (params) => {
      try {
        const validChainId = validateChainId(params.chain_id);
        const amAddress = getStandaloneAmAddress(validChainId, "merklOperator");
    
        if (!params.enabled)
          return formatResult(disabledIntent([amAddress], "Disable merkl_operator"));
    
        const validRewardRecipient = validateAddress(params.reward_recipient, "reward_recipient");
        const callbackData = encodeMerklOperatorCallbackData(MERKL_INITIATOR, validRewardRecipient);
    
        const result = {
          description: "Enable merkl_operator",
          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,
        };
      }
    },
  • Registration function for the tool.
    export function registerMerklOperatorTool(
      server: McpServer,
      _chains: Record<ChainId, ChainConfig>,
    ) {
      server.registerTool(
        "write.asset_manager.merkl_operator",
        {
          annotations: {
            title: "Encode Merkl Operator Automation",
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false,
          },
          description:
            "Encode args for the Merkl operator automation. Claims external Merkl protocol incentive rewards into the account — additional rewards paid by token teams on top of regular LP fees. Enable when the pool has active Merkl campaigns (check APY breakdown in read.strategy.list). Always combine with rebalancer when both are relevant — no conflict, extra free yield. Returns { asset_managers, statuses, datas } — pass to write.account.set_asset_managers. Combinable with other intent tools.",
          outputSchema: IntentOutput,
          inputSchema: {
            reward_recipient: z.string().describe("Address to receive Merkl rewards"),
            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 amAddress = getStandaloneAmAddress(validChainId, "merklOperator");
    
            if (!params.enabled)
              return formatResult(disabledIntent([amAddress], "Disable merkl_operator"));
    
            const validRewardRecipient = validateAddress(params.reward_recipient, "reward_recipient");
            const callbackData = encodeMerklOperatorCallbackData(MERKL_INITIATOR, validRewardRecipient);
    
            const result = {
              description: "Enable merkl_operator",
              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