Skip to main content
Glama

menese_balance

Check native token balances across 19 blockchains including Ethereum, Solana, and Bitcoin to monitor cryptocurrency holdings.

Instructions

Get your native token balance on a specific blockchain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesBlockchain to check

Implementation Reference

  • The handler function for menese_balance, which retrieves the native token balance for a specified chain.
    async ({ chain }) => {
      const identity = store.get();
      if (!identity) {
        return { content: [{ type: "text" as const, text: "No wallet configured. Use menese_setup first." }], isError: true };
      }
    
      const result = await cacheFetch(
        CacheKeys.balance(identity.principal, chain),
        TTL.BALANCE,
        async () => {
          if (AUTH_CHAINS.includes(chain)) {
            return getChainBalanceAuthenticated(config, resolveActorIdentity(store), chain);
          }
          return getChainBalance(config, identity.principal, chain);
        },
      );
    
      return {
        content: [{
          type: "text" as const,
          text: JSON.stringify(result, bigIntReplacer, 2),
        }],
      };
    },
  • Input schema validation for the menese_balance tool, enforcing that the chain must be one of the supported chains.
    inputSchema: {
      chain: z.enum(SUPPORTED_CHAINS as unknown as [string, ...string[]]).describe("Blockchain to check"),
    },
  • Tool registration for menese_balance within the MCP server.
    server.registerTool(
      "menese_balance",
      {
        description: "Get your native token balance on a specific blockchain.",
        inputSchema: {
          chain: z.enum(SUPPORTED_CHAINS as unknown as [string, ...string[]]).describe("Blockchain to check"),
        },
      },
      async ({ chain }) => {
        const identity = store.get();
        if (!identity) {
          return { content: [{ type: "text" as const, text: "No wallet configured. Use menese_setup first." }], isError: true };
        }
    
        const result = await cacheFetch(
          CacheKeys.balance(identity.principal, chain),
          TTL.BALANCE,
          async () => {
            if (AUTH_CHAINS.includes(chain)) {
              return getChainBalanceAuthenticated(config, resolveActorIdentity(store), chain);
            }
            return getChainBalance(config, identity.principal, chain);
          },
        );
    
        return {
          content: [{
            type: "text" as const,
            text: JSON.stringify(result, bigIntReplacer, 2),
          }],
        };
      },
    );
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 but fails to specify critical operational details such as the return value format (e.g., wei vs. ether), authentication requirements implied by 'your,' error handling for uninitialized wallets, or rate limiting constraints.

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 consists of a single, efficient sentence of nine words that immediately states the action and resource. There is no redundant or extraneous information; every word contributes to defining the tool's function.

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

Completeness3/5

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

Given the tool's low complexity (single parameter) and complete schema documentation, the description adequately covers the basic invocation pattern. However, it lacks necessary contextual details regarding the response format and authentication requirements that would be essential without an output schema or annotations.

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 ('Blockchain to check'), establishing a baseline score. The description adds 'specific' to reference the chain parameter and implies personal context with 'your,' but does not augment the parameter semantics with additional format constraints or usage nuances beyond the schema definition.

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 uses the specific verb 'Get' and clearly identifies the resource as 'your native token balance' with scope 'on a specific blockchain.' While it effectively distinguishes this from portfolio-wide queries through the 'native token' specification, it does not explicitly differentiate from sibling tools like `menese_portfolio` or mention when to prefer this over alternatives.

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?

The description provides no guidance on when to use this tool versus related tools such as `menese_portfolio` (which likely retrieves multi-asset balances) or `menese_send`. It also omits prerequisites such as whether wallet setup via `menese_setup` is required first.

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/Aboodtt404/mcp-menese-sdk'

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