Skip to main content
Glama

get-mon-balance

Check MON token balances on the Monad testnet by providing a wallet address to monitor cryptocurrency holdings.

Instructions

查询 Monad 测试网地址的 MON 代币余额

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes需要查询的 Monad 测试网地址

Implementation Reference

  • The handler function for the 'get-mon-balance' tool. It queries the MON balance for the given address on Monad testnet using viem's publicClient.getBalance, formats the balance using formatUnits with 18 decimals, and returns a text response or error message.
    async ({ address }) => {
        try {
            // 调用接口查询余额
            const balance = await publicClient.getBalance({
                address: address as `0x${string}`,
            });
    
            // 返回格式化的查询结果
            return {
                content: [
                    {
                        type: "text",
                        text: `地址 ${address} 的 MON 余额为:${formatUnits(balance, 18)} MON`,
                    },
                ],
            };
        } catch (error) {
            // 错误处理
            return {
                content: [
                    {
                        type: "text",
                        text: `查询地址 ${address} 的余额失败:${
                        error instanceof Error ? error.message : String(error)
                        }`,
                    },
                ],
            };
        }
    }
  • Zod schema defining the input parameter 'address' as a string for the Monad testnet address.
    {
        address: z.string().describe("需要查询的 Monad 测试网地址"),
    },
  • src/index.ts:23-28 (registration)
    MCP server creation declaring capabilities including 'get-mon-balance'.
    const server = new McpServer({
        name: "monad-testnet",
        version: "0.0.1",
        // 定义服务器支持的功能列表
        capabilities: ["get-mon-balance", "get-nft-count"]
      });
  • src/index.ts:31-33 (registration)
    Start of the server.tool registration for 'get-mon-balance' tool.
    server.tool(
        // 功能标识符
        "get-mon-balance",
  • Viem publicClient instance for Monad testnet, used by the get-mon-balance handler to query balances.
    const publicClient = createPublicClient({
        chain: monadTestnet,
        transport: http(),
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it states this is a query operation (implying read-only), it doesn't specify whether this requires authentication, has rate limits, returns real-time or cached data, or what happens with invalid addresses. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple query tool and front-loads the essential information. Every word earns its place.

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 simplicity (single parameter, no annotations, no output schema), the description is minimally adequate. It tells what the tool does but lacks important context about behavioral characteristics, usage scenarios, and output format. For a balance query tool, users would benefit from knowing what the return value looks like (numeric balance, units, etc.) and any constraints.

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 schema description coverage is 100%, with the single parameter 'address' fully documented in the schema as '需要查询的 Monad 测试网地址' (Monad testnet address to query). The description doesn't add any additional parameter information beyond what's already in the schema, such as address format examples or validation rules. With complete schema coverage, the baseline score of 3 is appropriate.

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 tool's purpose: '查询 Monad 测试网地址的 MON 代币余额' (Query MON token balance for a Monad testnet address). It specifies the verb (query), resource (MON token balance), and target (Monad testnet address). However, it doesn't explicitly differentiate from its sibling tool 'get-nft-count', which appears to serve a different purpose (NFT count vs token balance).

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 alternatives. It doesn't mention the sibling tool 'get-nft-count' or any other potential tools for querying different types of balances or addresses. There's no indication of prerequisites, limitations, or when this tool would be preferred over other methods.

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/bble/monad-mcp'

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