Skip to main content
Glama

Get Tokens by Address

get_tokens_by_address
Read-only
Get comprehensive ERC20 token holdings for an address with enriched metadata and market data.
Returns detailed token information including contract details (name, symbol, decimals), market metrics (exchange rate, market cap, volume), holders count, and actual balance (provided as is, without adjusting by decimals).
Essential for portfolio analysis, wallet auditing, and DeFi position tracking.
**SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_call to get additional pages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoThe pagination cursor from a previous response to get the next page of results.
addressYesWallet address
chain_idYesThe ID of the blockchain
session_idNoOpaque session identifier.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe main data payload of the tool's response.
notesNoA list of important contextual notes, such as warnings about data truncation or data quality issues.
paginationNoPagination information, present only if the 'data' is a single page of a larger result set.
content_textNoOptional human-readable summary used for MCP content responses.
instructionsNoA list of suggested follow-up actions or instructions for the LLM to plan its next steps.
data_descriptionNoA list of notes explaining the structure, fields, or conventions of the 'data' payload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / session_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Opaque session identifier.",
      +  "title": "Session Id"
      +}
  2. Changed11 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / address / title
      Added value: +"Address"
    • addedInput schema / properties / chain_id / title
      Added value: +"Chain Id"
    • addedInput schema / properties / cursor / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / cursor / default
      Added value: +null
    • changedInput schema / properties / cursor / description
      Previous value: -"Pagination cursor from previous response"New value: +"The pagination cursor from a previous response to get the next page of results."
    • addedInput schema / properties / cursor / title
      Added value: +"Cursor"
    • removedInput schema / properties / cursor / type
      Removed value: -"string"
    • addedInput schema / title
      Added value: +"get_tokens_by_addressArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "NextCallInfo": {
      +      "description": "A structured representation of the tool call required to get the next page.",
      +      "properties": {
      +        "params": {
      +          "additionalProperties": true,
      +          "description": "A complete dictionary of parameters for the next tool call, including the new cursor.",
      +          "title": "Params",
      +          "type": "object"
      +        },
      +        "tool_name": {
      +          "description": "The name of the tool to call for the next page.",
      +          "title": "Tool Name",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "tool_name",
      +        "params"
      +      ],
      +      "title": "NextCallInfo",
      +      "type": "object"
      +    },
      +    "PaginationInfo": {
      +      "description": "Contains the structured information needed to retrieve the next page of results.",
      +      "properties": {
      +        "next_call": {
      +          "$ref": "#/$defs/NextCallInfo",
      +          "description": "The structured tool call required to fetch the subsequent page."
      +        }
      +      },
      +      "required": [
      +        "next_call"
      +      ],
      +      "title": "PaginationInfo",
      +      "type": "object"
      +    },
      +    "TokenHoldingData": {
      +      "description": "Represents a single token holding with its associated metadata.",
      +      "properties": {
      +        "address": {
      +          "description": "The contract address of the token.",
      +          "title": "Address",
      +          "type": "string"
      +        },
      +        "balance": {
      +          "description": "The token balance for the queried address (unadjusted for decimals).",
      +          "title": "Balance",
      +          "type": "string"
      +        },
      +        "circulating_market_cap": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "The circulating market cap, if available.",
      +          "title": "Circulating Market Cap"
      +        },
      +        "decimals": {
      +          "description": "The number of decimals the token uses.",
      +          "title": "Decimals",
      +          "type": "string"
      +        },
      +        "exchange_rate": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "The current exchange rate, if available.",
      +          "title": "Exchange Rate"
      +        },
      +        "holders_count": {
      +          "description": "The number of addresses holding this token.",
      +          "title": "Holders Count",
      +          "type": "string"
      +        },
      +        "name": {
      +          "description": "The full name of the token (e.g., 'USD Coin').",
      +          "title": "Name",
      +          "type": "string"
      +        },
      +        "symbol": {
      +          "description": "The symbol of the token (e.g., 'USDC').",
      +          "title": "Symbol",
      +          "type": "string"
      +        },
      +        "total_supply": {
      +          "description": "The total supply of the token.",
      +          "title": "Total Supply",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "address",
      +        "name",
      +        "symbol",
      +        "decimals",
      +        "total_supply",
      +        "circulating_market_cap",
      +        "exchange_rate",
      +        "holders_count",
      +        "balance"
      +      ],
      +      "title": "TokenHoldingData",
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "content_text": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Optional human-readable summary used for MCP content responses.",
      +      "title": "Content Text"
      +    },
      +    "data": {
      +      "description": "The main data payload of the tool's response.",
      +      "items": {
      +        "$ref": "#/$defs/TokenHoldingData"
      +      },
      +      "title": "Data",
      +      "type": "array"
      +    },
      +    "data_description": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "A list of notes explaining the structure, fields, or conventions of the 'data' payload.",
      +      "title": "Data Description"
      +    },
      +    "instructions": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "A list of suggested follow-up actions or instructions for the LLM to plan its next steps.",
      +      "title": "Instructions"
      +    },
      +    "notes": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "A list of important contextual notes, such as warnings about data truncation or data quality issues.",
      +      "title": "Notes"
      +    },
      +    "pagination": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/PaginationInfo"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Pagination information, present only if the 'data' is a single page of a larger result set."
      +    }
      +  },
      +  "required": [
      +    "data"
      +  ],
      +  "title": "ToolResponse[list[TokenHoldingData]]",
      +  "type": "object"
      +}
  3. Changed10 schema fields changed
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / address / title
      Removed value: -"Address"
    • removedInput schema / properties / chain_id / title
      Removed value: -"Chain Id"
    • removedInput schema / properties / cursor / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / cursor / default
      Removed value: -null
    • changedInput schema / properties / cursor / description
      Previous value: -"The pagination cursor from a previous response to get the next page of results."New value: +"Pagination cursor from previous response"
    • removedInput schema / properties / cursor / title
      Removed value: -"Cursor"
    • addedInput schema / properties / cursor / type
      Added value: +"string"
    • removedInput schema / title
      Removed value: -"get_tokens_by_addressArguments"
  4. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description adds value by detailing that the balance is returned without decimal adjustment and that pagination requires using the next_call in the response. These are specific behavioral traits beyond the annotations, aiding the agent in handling responses correctly.

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 concise at four sentences, front-loads the primary purpose, then details return contents, use cases, and pagination. Each sentence adds distinct value with no redundancy or verbose language, making it efficient for an agent to parse.

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

Completeness4/5

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

Given the presence of an output schema and rich annotations, the description covers essential behavioral context: it notes the raw balance, pagination handling, and typical use cases. While session_id is not mentioned in the description, the schema fully documents it, so no critical gaps exist. The description is adequate for safe and effective tool invocation.

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?

All four parameters are fully described in the input schema, including cursor, address, chain_id, and session_id. The description reiterates address usage and pagination but introduces no new parameter semantics beyond the schema. Per guidelines, high schema coverage (100%) sets a baseline of 3, and the description does not elevate it.

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 description clearly states the tool retrieves ERC20 token holdings for a specific address, with enriched metadata and market data. It distinguishes itself from sibling tools like get_token_transfers_by_address (transfers) and nft_tokens_by_address (NFTs) by focusing on current holdings and holdings details. The action verb 'Get' and specific resource 'ERC20 token holdings' make the purpose unambiguous.

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

Usage Guidelines4/5

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

The description explicitly identifies primary use cases: portfolio analysis, wallet auditing, and DeFi position tracking. However, it does not mention alternatives or when not to use this tool. The context is clear but lacks explicit exclusions, fitting the 'clear context, no exclusions' tier.

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.