Skip to main content
Glama

getTokenHolders

Read-only

Retrieve all ERC20 or ERC721 token holders, with optional historic block-height filtering, to visualize holder distribution and create charts.

Instructions

Commonly used to get a list of all the token holders for a specified ERC20 or ERC721 token. Returns historic token holders when block-height is set (defaults to latest). Useful for building pie charts of token holders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authTokenYesAuthorization token for accessing the Somnia API
chainNameYes
tokenAddressYesToken address to fetch holders for
Behavior3/5

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

The annotations already declare readOnlyHint=true and destructiveHint=false, so the description does not need to reiterate safety. It adds useful context about returning historic holders when block-height is set and defaulting to latest, but it introduces a mismatch: the input schema has no block-height parameter (additionalProperties: false). This inconsistency creates ambiguity about how to actually set that value. The description also does not mention pagination or return format.

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?

The description is three sentences and front-loaded with the core function. It is concise but includes a filler phrase 'Commonly used' and an optional use-case sentence. The key behavioral details (historic vs. latest) are present, and no sentences are redundant with the schema or annotations.

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?

For a read-only tool with no output schema, the description covers the main purpose, the token types, the historic/latest distinction, and a use case. It is missing details like potential pagination limits or the exact structure of the returned holder list, but the tool appears simple enough that the description is largely adequate. The block-height discrepancy with the schema is a notable gap.

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 description coverage is 67% (authToken and tokenAddress have descriptions, chainName has a const but no description). The description adds meaning by specifying that the tokenAddress is for an ERC20 or ERC721 token, which helps clarify the parameter's purpose. However, it does not explain authToken or chainName, and the mention of block-height is not reflected in the schema, potentially confusing parameter invocation.

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 identifies the action ('get a list of all the token holders') and the resource (a specified ERC20 or ERC721 token). It also differentiates the tool by emphasizing 'all' holders and the historic behavior, distinguishing it from sibling tools like getTokenBalance or getERC20Balance that focus on balances rather than holder lists.

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 gives clear context for when to use the tool: to fetch token holders for ERC20/ERC721, including historical holders. It does not explicitly state exclusions or alternatives, but the mention of 'Commonly used' implies it is the standard choice for this purpose, and the use case 'building pie charts' provides practical guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/vastavikadi/somnia-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server