Skip to main content
Glama

read.strategy.recommendation

Read-onlyIdempotent

Provides a rebalancing recommendation for an Arcadia account, suggesting asset changes to optimize yield using 1-day APY.

Instructions

Get a rebalancing recommendation for an Arcadia account — suggests asset changes to optimize yield. Uses 1d APY (not 7d like read.strategy.list), so recommended strategies may differ from the list ranking. APY values are decimal fractions (0.05 = 5%). weekly_earning_difference is in USD.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_addressYesArcadia account address
chain_idNoChain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'read.strategy.recommendation' tool on the MCP server with annotations, description, input schema, and handler.
    server.registerTool(
      "read.strategy.recommendation",
      {
        annotations: {
          title: "Get Recommendation",
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
        description:
          "Get a rebalancing recommendation for an Arcadia account — suggests asset changes to optimize yield. Uses 1d APY (not 7d like read.strategy.list), so recommended strategies may differ from the list ranking. APY values are decimal fractions (0.05 = 5%). weekly_earning_difference is in USD.",
        inputSchema: {
          account_address: z.string().describe("Arcadia account address"),
          chain_id: z.number().default(8453).describe(CHAIN_ID_DESCRIPTION),
        },
        outputSchema: StrategyRecommendationOutput,
      },
      async ({ account_address, chain_id }) => {
        try {
          const result = await api.getRecommendation(chain_id, account_address);
          const rec = result as Record<string, unknown>;
          if (
            Array.isArray(rec.added_assets) &&
            rec.added_assets.length === 0 &&
            Array.isArray(rec.removed_assets) &&
            rec.removed_assets.length === 0 &&
            Number(rec.current_apy ?? 0) === 0 &&
            Number(rec.proposed_apy ?? 0) === 0
          ) {
            rec.context_notes = [
              "Account has no active positions — no rebalancing recommendations available.",
            ];
          }
          return {
            content: [{ type: "text" as const, text: JSON.stringify(rec, null, 2) }],
            structuredContent: rec,
          };
        } catch (err) {
          return {
            content: [
              {
                type: "text" as const,
                text: `Error: ${err instanceof Error ? err.message : String(err)}`,
              },
            ],
            isError: true,
          };
        }
      },
    );
  • Handler function for read.strategy.recommendation: calls api.getRecommendation(chain_id, account_address), checks if result has no positions (empty added/removed assets and zero APYs) to add context_notes, returns JSON-stringified result with structuredContent.
    async ({ account_address, chain_id }) => {
      try {
        const result = await api.getRecommendation(chain_id, account_address);
        const rec = result as Record<string, unknown>;
        if (
          Array.isArray(rec.added_assets) &&
          rec.added_assets.length === 0 &&
          Array.isArray(rec.removed_assets) &&
          rec.removed_assets.length === 0 &&
          Number(rec.current_apy ?? 0) === 0 &&
          Number(rec.proposed_apy ?? 0) === 0
        ) {
          rec.context_notes = [
            "Account has no active positions — no rebalancing recommendations available.",
          ];
        }
        return {
          content: [{ type: "text" as const, text: JSON.stringify(rec, null, 2) }],
          structuredContent: rec,
        };
      } catch (err) {
        return {
          content: [
            {
              type: "text" as const,
              text: `Error: ${err instanceof Error ? err.message : String(err)}`,
            },
          ],
          isError: true,
        };
      }
    },
  • Output schema StrategyRecommendationOutput — a passthrough empty object schema allowing any shape.
    export const StrategyRecommendationOutput = z.object({}).passthrough();
  • ArcadiaApiClient.getRecommendation method — fetches GET /recommendation with chain_id and account parameters from the Arcadia API.
    // ── Recommendation ───────────────────────────────────────────────
    
    async getRecommendation(chainId: number, account: string) {
      return this.get("/recommendation", { chain_id: chainId, account });
    }
  • References read.strategy.recommendation in the 'analyze-account' workflow prompt, instructing the model to call it as step 4.
    "4. Call read.strategy.recommendation to check if rebalancing is needed",
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. Description adds behavioral context: uses 1d APY, output format details. No contradictions, and the description complements annotations well.

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?

Three concise sentences, each adding value: purpose, usage distinction, and output format hints. No wasted words.

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

Completeness5/5

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

Given the existence of an output schema, the description adequately covers return value hints (APY decimal, USD unit). Distinguishes from sibling and provides enough context for a simple two-parameter tool.

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?

Input schema has 100% coverage with clear descriptions for both parameters (account_address, chain_id). Description does not add new meaning beyond what schema provides, so baseline 3 is appropriate.

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?

Clearly states it gets a rebalancing recommendation for an Arcadia account, suggesting asset changes to optimize yield. Distinguishes from sibling read.strategy.list by specifying different APY period (1d vs 7d).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use this tool vs read.strategy.list, explaining that recommended strategies may differ due to APY basis. Also provides format hints for output values (APY decimal, USD).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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