Skip to main content
Glama
arcadia-finance

arcadia-finance-mcp-server

read.account.history

Read-onlyIdempotent

Retrieve historical collateral and debt values for an Arcadia Finance account to analyze performance trends over time.

Instructions

Get historical collateral and debt values for an Arcadia account over time. Returns a time series of snapshots (timestamp, collateral_value, debt_value, net_value). Each value is the account's net value in USD (human-readable, not raw units). Useful for charting account performance over a period.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_addressYesArcadia account address
daysNoNumber of days of history (default 14)
chain_idNoChain ID: 8453 (Base) or 130 (Unichain)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
historyYes

Implementation Reference

  • The handler function for 'read.account.history', which calls api.getAccountHistory and returns the formatted account history data.
    async ({ account_address, days, chain_id }) => {
      try {
        const validChainId = validateChainId(chain_id);
        if (days <= 0) {
          return {
            content: [{ type: "text" as const, text: "Error: days must be a positive number" }],
            isError: true,
          };
        }
        const raw = await api.getAccountHistory(validChainId, account_address, days);
        const result = { history: Array.isArray(raw) ? raw : [] };
        return {
          content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
          structuredContent: result,
        };
      } catch (err) {
        return {
          content: [
            {
              type: "text" as const,
              text: `Error: ${err instanceof Error ? err.message : String(err)}`,
            },
          ],
          isError: true,
        };
      }
  • Registration block for 'read.account.history' tool including definition of inputs and outputs.
    server.registerTool(
      "read.account.history",
      {
        annotations: {
          title: "Get Account History",
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
        description:
          "Get historical collateral and debt values for an Arcadia account over time. Returns a time series of snapshots (timestamp, collateral_value, debt_value, net_value). Each value is the account's net value in USD (human-readable, not raw units). Useful for charting account performance over a period.",
        inputSchema: {
          account_address: z.string().describe("Arcadia account address"),
          days: z.number().default(14).describe("Number of days of history (default 14)"),
          chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"),
        },
        outputSchema: AccountHistoryOutput,
      },

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