Skip to main content
Glama

getUser

Retrieve user information from Snapshot.org by providing an Ethereum address to access profile data and activity details.

Instructions

Get information about a Snapshot user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesEthereum address of the user

Implementation Reference

  • The core handler function that executes the tool logic by querying the Snapshot GraphQL API for user data using the provided Ethereum address.
    async getUser(address: string): Promise<User> {
      const query = `
        query {
          users(first: 1, where: { id_in: ["${address}"] }) {
            id
            name
            about
            avatar
          }
        }
      `;
    
      const result = await this.queryGraphQL(query);
      return result.users[0];
    }
  • src/server.ts:104-114 (registration)
    Registration of the getUser tool in the ListTools handler, including name, description, and inputSchema.
    {
      name: "getUser",
      description: "Get information about a Snapshot user",
      inputSchema: {  // Changed from parameters to inputSchema
        type: "object",
        properties: {
          address: { type: "string", description: "Ethereum address of the user" }
        },
        required: ["address"]
      }
    },
  • Zod validation schema for getUser tool input parameters.
    const UserParamsSchema = z.object({
      address: z.string()
    });
  • MCP CallTool handler case for getUser, which parses arguments, invokes the service handler, and returns formatted JSON response.
    case "getUser": {
      const parsedArgs = UserParamsSchema.parse(args);
      const user = await this.snapshotService.getUser(parsedArgs.address);
      return {
        content: [{
          type: "text",
          text: JSON.stringify(user, null, 2)
        }]
      };
  • TypeScript interface defining the structure of the User object returned by the getUser handler.
    interface User {
      id: string;
      name?: string;
      about?: string;
      avatar?: string;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'Get information' but doesn't specify what type of information, whether it's read-only, requires authentication, has rate limits, or error handling. This leaves significant gaps in understanding the tool's behavior.

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 a single, clear sentence with no wasted words. It's appropriately sized and front-loaded, efficiently conveying the core purpose without unnecessary elaboration.

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

Completeness2/5

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

Given the tool has no annotations and no output schema, the description is incomplete. It doesn't explain what information is returned, potential errors, or behavioral traits, making it inadequate for a tool that retrieves user data with a required parameter.

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?

The input schema has 100% description coverage, with the 'address' parameter documented as 'Ethereum address of the user'. The description adds no additional meaning beyond this, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('information about a Snapshot user'), making the purpose understandable. However, it doesn't differentiate this from potential sibling tools like 'getSpaces' or 'getProposals' beyond specifying the user resource, missing explicit distinction.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description lacks context about prerequisites, such as needing a valid Ethereum address, or comparisons to other user-related tools, leaving usage unclear.

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/crazyrabbitLTC/mcp-snapshot-server'

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