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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_fees"
  }
}

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, rate_limited, limit_reached, view_unavailable. 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`, `data_status` or a proposed change. Read it to the user.
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
next_stepNoWhat the user should do about data_status.
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.
data_statusNoPresent only when the portfolio has no data yet. nothing_connected: no exchange and no wallet is connected, so empty lists and zeros mean "no data", NOT a $0 portfolio, and no data fields come with it (except on get_connections, get_alerts, get_target_allocation and list_profiles, which also answer). Send the user to next_step. syncing: a source is connected but its first sync is still running, so figures are partial and not final.
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. Changed1 schema field changed
    • changedOutput schema / properties / error / description
      Previous value: -"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."New value: +"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, rate_limited, limit_reached, view_unavailable. No data fields come with it; read `message` to the user rather than retrying the same call."
  2. Changed3 schema fields changed
    • addedOutput schema / properties / data_status
      Added value: +{
      +  "description": "Present only when the portfolio has no data yet. nothing_connected: no exchange and no wallet is connected, so empty lists and zeros mean \"no data\", NOT a $0 portfolio, and no data fields come with it (except on get_connections, get_alerts, get_target_allocation and list_profiles, which also answer). Send the user to next_step. syncing: a source is connected but its first sync is still running, so figures are partial and not final.",
      +  "enum": [
      +    "nothing_connected",
      +    "syncing"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / message / description
      Previous value: -"Plain-language explanation that accompanies `error` or a proposed change."New value: +"Plain-language explanation that accompanies `error`, `data_status` or a proposed change. Read it to the user."
    • addedOutput schema / properties / next_step
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "What the user should do about data_status.",
      +  "properties": {
      +    "action": {
      +      "enum": [
      +        "connect_a_source",
      +        "wait_for_first_sync"
      +      ],
      +      "type": "string"
      +    },
      +    "add_exchange_url": {
      +      "description": "App page to connect an exchange with a read-only API key.",
      +      "type": "string"
      +    },
      +    "add_wallet_url": {
      +      "description": "App page to add a wallet address to watch.",
      +      "type": "string"
      +    },
      +    "settings_url": {
      +      "type": "string"
      +    },
      +    "sync_status_url": {
      +      "description": "App page showing sync progress.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "action"
      +  ],
      +  "type": "object"
      +}
  3. 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"
      +}
  4. 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."
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare a safe, idempotent read; the description adds substantial behaviour beyond them — precisely which fee classes are and are not tracked (EVM gas, some chains, swap slippage excluded), that `partial` and `notes` enumerate the gaps, and the sort order of every breakdown (largest first for aggregates, oldest first for the series). That coverage caveat is exactly the kind of disclosure an agent needs before quoting numbers to a user.

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?

Front-loaded with the verb, scope and output shape, and every sentence carries information (valuation day, ordering, coverage, alternatives). The opening sentence is very dense with stacked parentheticals and could be split for readability, which keeps it just short of a 5.

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?

For a read-only aggregation with an output schema already present, the description supplies everything an agent needs: the valuation convention (USD on the day paid), the breakdown axes, the sort orders, and the known coverage limits surfaced through `partial`/`notes`. Nothing material is left for the agent to guess.

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?

Schema coverage is 100%, so every parameter including enums is already documented. The description restates period defaulting to all time and bucket defaulting to month without adding new meaning such as valid combinations or interaction between period and bucket, so the baseline 3 applies.

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?

Names a specific verb and resource ("Total the fees paid over `period`") and enumerates the exact dimensions of the result: totalUsd plus breakdowns by venue, asset and type, plus a bucketed series. It also distinguishes itself from get_performance and get_movements by name, so an agent can pick it without opening a schema.

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?

Gives explicit selecting conditions with two named alternatives: get_performance for fees folded into overall profit, get_movements for single fee-bearing events. The illustrative questions ("what am I paying in fees", "which exchange costs me the most") further pin down the intended intent, leaving no ambiguity about when to reach for this tool.

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.