Skip to main content
Glama

Fees paid, by venue, asset and type

get_fees
Read-onlyIdempotent

Total the fees paid over period (omit for all time), each valued in USD on the day it was paid: trading, on-chain gas, withdrawal and fiat-spread fees, as totalUsd plus breakdowns by venue (with the effective trading-fee rate in basis points), by asset and by type, each largest first, and a series per bucket (month by default, or day or week), oldest first. Use for "what am I paying in fees", "which exchange costs me the most". Coverage is partial by nature (gas on EVM token transfers and contract calls, some chains, and swap slippage are not tracked), and partial plus notes say what was left out. For fees as one line of overall profit use get_performance; for single fee-bearing events use get_movements.

Input Schema

NameRequiredDescriptionDefault
bucketNoGranularity of the fee series. Defaults to month.
periodNoTime window ending now: last_24h, last_7d, last_30d, last_90d, ytd (since 1 January UTC) or all. Omit for all time.
profileNoWhich portfolio to read, for accounts with more than one: its id, or its name (exact, case-insensitive, e.g. "Trading"). Omit to read this connection's default portfolio; every answer names the portfolio it read in `profile`. An unknown or shared name returns profile_not_found or profile_ambiguous listing the real ones, and list_profiles shows them up front.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent ONLY when the call was refused instead of answered: upgrade_required (Pro plan needed), not_found, profile_not_found, profile_ambiguous, invalid_arguments, write_not_permitted. No data fields come with it; read `message` to the user rather than retrying the same call.
notesNoWhat the coverage leaves out.
bucketNo
byTypeNoLargest first.
pointsNoOldest bucket first.
windowNoThe time window these figures cover.
byAssetNoLargest first.
byVenueNoLargest first.
messageNoPlain-language explanation that accompanies `error` or a proposed change.
partialNotrue when some fees could not be valued or are not tracked.
profileNoThe portfolio these figures belong to (absent on list_profiles).
feeCountNoFee-bearing events counted.
totalUsdNoAll fees in the window, USD, each valued on the day paid.
avgFeeUsdNo
truncatedNoPresent only when a list was longer than the 200-row cap and was cut: list field name -> {total, kept, keep, from, to}. A `<field>_note` string beside that list says the same in words. Never present a cut list as complete.
source_urlNoLink to the page in the WhereItGoes app that shows this data.
points_noteNoPresent only when `points` was cut; says how many rows were kept and which.
upgrade_urlNoWhere the user can upgrade, on an upgrade_required refusal.
stock_assetsNoPresent when the answer mentions Binance Stocks shares (EQ_<ticker>): they are US stocks, not crypto.
unpricedAssetsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / bucket / description
      Previous value: -"Granularity of the fee time series. Defaults to month."New value: +"Granularity of the fee series. Defaults to month."
    • changedInput schema / properties / period / description
      Previous value: -"Time window ending now: last_24h (today / since yesterday), last_7d, last_30d, last_90d, ytd (since 1 January UTC), or all. Omit for all time."New value: +"Time window ending now: last_24h, last_7d, last_30d, last_90d, ytd (since 1 January UTC) or all. Omit for all time."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "avgFeeUsd": {
      +      "type": "string"
      +    },
      +    "bucket": {
      +      "enum": [
      +        "day",
      +        "week",
      +        "month"
      +      ],
      +      "type": "string"
      +    },
      +    "byAsset": {
      +      "description": "Largest first.",
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "asset": {
      +            "type": "string"
      +          },
      +          "count": {
      +            "type": "number"
      +          },
      +          "qty": {
      +            "description": "Native units.",
      +            "type": "string"
      +          },
      +          "usd": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "asset",
      +          "usd",
      +          "qty",
      +          "count"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "byType": {
      +      "description": "Largest first.",
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "count": {
      +            "type": "number"
      +          },
      +          "type": {
      +            "enum": [
      +              "trading",
      +              "network",
      +              "withdrawal",
      +              "fiat",
      +              "other"
      +            ],
      +            "type": "string"
      +          },
      +          "usd": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "usd",
      +          "count"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "byVenue": {
      +      "description": "Largest first.",
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "count": {
      +            "type": "number"
      +          },
      +          "rateBps": {
      +            "description": "Trading fees / traded volume, basis points.",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "tradedVolumeUsd": {
      +            "type": "string"
      +          },
      +          "usd": {
      +            "type": "string"
      +          },
      +          "venue": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "venue",
      +          "usd",
      +          "count",
      +          "tradedVolumeUsd",
      +          "rateBps"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "error": {
      +      "description": "Present ONLY when the call was refused instead of answered: upgrade_required (Pro plan needed), not_found, profile_not_found, profile_ambiguous, invalid_arguments, write_not_permitted. No data fields come with it; read `message` to the user rather than retrying the same call.",
      +      "type": "string"
      +    },
      +    "feeCount": {
      +      "description": "Fee-bearing events counted.",
      +      "type": "number"
      +    },
      +    "message": {
      +      "description": "Plain-language explanation that accompanies `error` or a proposed change.",
      +      "type": "string"
      +    },
      +    "notes": {
      +      "description": "What the coverage leaves out.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "partial": {
      +      "description": "true when some fees could not be valued or are not tracked.",
      +      "type": "boolean"
      +    },
      +    "points": {
      +      "description": "Oldest bucket first.",
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "byType": {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "description": "fee type -> USD in the bucket.",
      +            "type": "object"
      +          },
      +          "rateBps": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "t": {
      +            "type": "string"
      +          },
      +          "tradedVolumeUsd": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "t",
      +          "byType",
      +          "tradedVolumeUsd",
      +          "rateBps"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "points_note": {
      +      "description": "Present only when `points` was cut; says how many rows were kept and which.",
      +      "type": "string"
      +    },
      +    "profile": {
      +      "additionalProperties": true,
      +      "description": "The portfolio these figures belong to (absent on list_profiles).",
      +      "properties": {
      +        "id": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "name"
      +      ],
      +      "type": "object"
      +    },
      +    "source_url": {
      +      "description": "Link to the page in the WhereItGoes app that shows this data.",
      +      "type": "string"
      +    },
      +    "stock_assets": {
      +      "additionalProperties": true,
      +      "description": "Present when the answer mentions Binance Stocks shares (EQ_<ticker>): they are US stocks, not crypto.",
      +      "properties": {
      +        "assets": {
      +          "items": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "asset": {
      +                "type": "string"
      +              },
      +              "ticker": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "asset",
      +              "ticker"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "note": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "note",
      +        "assets"
      +      ],
      +      "type": "object"
      +    },
      +    "totalUsd": {
      +      "description": "All fees in the window, USD, each valued on the day paid.",
      +      "type": "string"
      +    },
      +    "truncated": {
      +      "additionalProperties": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "from": {
      +            "description": "Day or bucket of the first kept row, for a dated series.",
      +            "type": "string"
      +          },
      +          "keep": {
      +            "description": "Which rows survived the cut.",
      +            "enum": [
      +              "first",
      +              "most_recent",
      +              "evenly_spaced",
      +              "best_and_worst"
      +            ],
      +            "type": "string"
      +          },
      +          "kept": {
      +            "description": "Rows returned.",
      +            "type": "number"
      +          },
      +          "to": {
      +            "description": "Day or bucket of the last kept row, for a dated series.",
      +            "type": "string"
      +          },
      +          "total": {
      +            "description": "Rows the full answer had.",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "total",
      +          "kept",
      +          "keep"
      +        ],
      +        "type": "object"
      +      },
      +      "description": "Present only when a list was longer than the 200-row cap and was cut: list field name -> {total, kept, keep, from, to}. A `<field>_note` string beside that list says the same in words. Never present a cut list as complete.",
      +      "type": "object"
      +    },
      +    "unpricedAssets": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "upgrade_url": {
      +      "description": "Where the user can upgrade, on an upgrade_required refusal.",
      +      "type": "string"
      +    },
      +    "window": {
      +      "additionalProperties": true,
      +      "description": "The time window these figures cover.",
      +      "properties": {
      +        "from": {
      +          "description": "Window start, epoch ms; null = from the first record.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "fromDay": {
      +          "description": "First UTC day covered, YYYY-MM-DD.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "to": {
      +          "description": "Window end, epoch ms; null = now.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "toDay": {
      +          "description": "Last UTC day covered, YYYY-MM-DD.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "from",
      +        "to",
      +        "fromDay",
      +        "toDay"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • changedInput schema / properties / bucket / description
      Previous value: -"Time bucket for the fee series."New value: +"Granularity of the fee time series. Defaults to month."
    • changedInput schema / properties / period / description
      Previous value: -"Time window. \"last_24h\" for today/since-yesterday, \"all\" for full history. Defaults to the endpoint's own default (usually last 30 days)."New value: +"Time window ending now: last_24h (today / since yesterday), last_7d, last_30d, last_90d, ytd (since 1 January UTC), or all. Omit for all time."
    • changedInput schema / properties / profile / description
      Previous value: -"Which portfolio to read, by name or id, for accounts that have more than one. Omit to use this connection's default. Call list_profiles first if the user names a portfolio you have not seen."New value: +"Which portfolio to read, for accounts with more than one: its id, or its name (exact, case-insensitive, e.g. \"Trading\"). Omit to read this connection's default portfolio; every answer names the portfolio it read in `profile`. An unknown or shared name returns profile_not_found or profile_ambiguous listing the real ones, and list_profiles shows them up front."
  3. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations, the description adds crucial behavioral context, such as the partial coverage of the data (e.g., slippage not tracked), the precise valuation method (USD on the day it was paid), and the aggregation rules (largest first, oldest first).

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?

The description is appropriately dense for the tool's complexity. It follows a logical structure: definition -> calculation -> output details -> limitations -> alternatives, ensuring every sentence delivers essential information.

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 complexity of multi-metric fee aggregation across different chains/assets, the description is remarkably complete. It addresses limitations, output formatting (bucket structure), and data accuracy constraints, leaving the agent with minimal need to seek external documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While the schema coverage is 100%, the description adds significant semantic value by defining the scope of the fee calculation, detailing the inclusion of the 'effective trading-fee rate in basis points,' and explaining the time constraints of the period parameter ('Omit for all time').

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 purpose is exceptionally clear, specifying that the tool totals various fee types (trading, gas, withdrawal, fiat-spread) and outlines the resulting breakdown (venue, asset, type) and valuation (USD on the day paid). It clearly distinguishes its function from 'get_performance' and 'get_movements'.

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?

Explicit guidance is provided using direct user-facing questions ('what am I paying in fees,' 'which exchange costs me the most'). It also explicitly routes the agent to `get_performance` and `get_movements` for specific, alternative financial queries.

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.