Skip to main content
Glama

Crypto & Macro Market Data (Tanod)

get_protocol_fees

Read-onlyIdempotent

chainpeek: Get protocol fees and revenue. For TVL use get_protocol_tvl. Returns a protocol's fees and revenue in USD over 24 hours, 7 days, 30 days, 1 year and all time, the change, the revenue-to-fees ratio and DefiLlama's definitions, from Tanod's cache of DefiLlama data. Cached DefiLlama data (refreshed every few hours), never live; as_of shows its age; revenue is DefiLlama's definition (see methodology); an unknown protocol is a 422 with suggestions and a missing or over-2-day-old cache a 503 (neither charged). Informational only. Typically under 1 s (a local cache read). Price: USD 0.002. Free: 10 chain reads per IP per UTC day. Docs: https://tanod.dev/learn/defi-data-api.html

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "protocol": "<protocol>"
    },
    "name": "get_protocol_fees"
  }
}

Input Schema

NameRequiredDescriptionDefault
protocolYesProtocol (or chain) name or slug, e.g. aave, uniswap, lido, ethereum (a parent such as aave sums its versions). An unknown name is a 422 with suggestions.

Output Schema

NameRequiredDescriptionDefault
noteNo
as_ofNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
staleNo
sourceNo
protocolNo
other_matchesNo
cache_age_hoursNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / properties / protocol / title
      Removed value: -"Protocol"
    • removedInput schema / title
      Removed value: -"get_protocol_feesArguments"
    • removedOutput schema / properties / other_matches / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / protocol / properties
      Removed value: -{
      -  "category": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "chains": {
      -    "items": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "type": [
      -      "array",
      -      "null"
      -    ]
      -  },
      -  "fees": {
      -    "properties": {
      -      "1y_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "24h_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "30d_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "7d_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "all_time_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "change_1d_pct": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "change_30d_pct": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "change_7d_pct": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      }
      -    },
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  },
      -  "methodology": {
      -    "properties": {
      -      "fees": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "revenue": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  },
      -  "name": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "revenue": {
      -    "properties": {
      -      "1y_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "24h_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "30d_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "7d_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "all_time_usd": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "change_1d_pct": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "change_30d_pct": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "change_7d_pct": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      }
      -    },
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  },
      -  "revenue_to_fees_30d_pct": {
      -    "type": [
      -      "number",
      -      "null"
      -    ]
      -  },
      -  "slug": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "type": {
      -    "enum": [
      -      "protocol",
      -      "parent",
      -      "chain",
      -      null
      -    ]
      -  },
      -  "versions": {
      -    "items": {
      -      "properties": {
      -        "fees_30d_usd": {
      -          "type": [
      -            "integer",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "revenue_30d_usd": {
      -          "type": [
      -            "integer",
      -            "null"
      -          ]
      -        },
      -        "slug": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": [
      -        "object",
      -        "null"
      -      ]
      -    },
      -    "type": [
      -      "array",
      -      "null"
      -    ]
      -  }
      -}
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds substantial non-annotation context: data is cached and refreshed every few hours (never live), `as_of` reports staleness, 422 returns suggestions, 503 signals missing/over-2-day-old cache and is not charged, latency is typically under 1 s, and pricing is $0.002 with 10 free reads/IP/day. The only slight gap is that it does not spell out pagination or result-size limits, though for a single-protocol lookup that is minor.

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?

Purpose and the TVL alternative are front-loaded in the first two sentences, then operational facts follow in a dense block. It is long for a one-parameter tool and repeats cache provenance ('cache of DefiLlama data' then 'Cached DefiLlama data... never live'), but nearly every remaining clause (staleness, error codes, latency, price) earns its place.

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?

An output schema exists, yet the description still summarizes the returned metrics, which is helpful rather than redundant. Safety is covered by annotations, the sole parameter is fully documented, and error, freshness, cost, and latency behavior are all disclosed — nothing an agent needs to invoke 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?

Schema description coverage is 100%, so the baseline is 3; the schema already documents the single `protocol` parameter with examples and the unknown-name 422 behavior. The description corroborates that a name or slug plus chain names are accepted, which is marginal added value rather than new syntax, so it sits just above baseline.

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?

The opening 'Get protocol fees and revenue' states a specific verb and resource, and the very next clause explicitly excludes the nearest sibling ('For TVL use get_protocol_tvl'). The description then enumerates the exact data returned (fees/revenue in USD over 24h/7d/30d/1y/all-time, change, revenue-to-fees ratio), leaving no ambiguity about what this tool produces versus other DeFi data tools.

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?

It names the alternative tool (get_protocol_tvl) and the condition that selects it, which is exactly the when-not guidance an agent needs. It further states prerequisite-like conditions: cache freshness via `as_of`, the 422-on-unknown-protocol path, and the 503-on-stale/missing-cache path, so an agent can anticipate failures and retry behavior.

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.