# get_balance

Check the balance of 0G native tokens for any wallet address. If no address is provided, checks the balance of the wallet configured in WALLET_ADDRESS environment variable. Returns balance in both 0G tokens and wei formats, along with explorer link.

Agent View of the PolicyLayer registry record for `get_balance`. HTML page: https://policylayer.com/tools/tairon-ai-0g-chain-mcp/get-balance

## Facts

- Tool: `get_balance`
- Server: 0g Chain (`tairon-ai/0g-chain-mcp`) — https://policylayer.com/tools/tairon-ai-0g-chain-mcp.md
- Homepage: https://github.com/Tairon-ai/0g-chain-mcp
- Risk category: Read (Low risk)
- Registry record: grade C, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_balance",
    "arguments": {}
  }
}
```

## Why get_balance is rated Low

This tool purely retrieves and queries balance data without side effects. It does not create, modify, delete, or transfer data. Even in a blockchain context where financial assets are involved, reading a balance is a non-destructive query operation. The tool has minimal blast radius as misuse would only expose read access to public blockchain data.

From the tool's own definition: "Tool name is 'get_balance' and description states it 'Check[s] the balance of 0G native tokens for any wallet address' with no mention of modifications, deletions, or state changes. Returns balance information and explorer link only."

## Use case

AI agents call get_balance to retrieve information from 0g Chain without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches 0g Chain:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "get_balance": {}
  }
}
```

## Other tools on 0g Chain (8)

- `send_native_token` — Financial — https://policylayer.com/tools/tairon-ai-0g-chain-mcp/send-native-token.md
- `stake_tokens` — Financial — https://policylayer.com/tools/tairon-ai-0g-chain-mcp/stake-tokens.md
- `unstake_tokens` — Financial — https://policylayer.com/tools/tairon-ai-0g-chain-mcp/unstake-tokens.md
- `get_accumulated_rewards` — Read — https://policylayer.com/tools/tairon-ai-0g-chain-mcp/get-accumulated-rewards.md
- `get_staking_info` — Read — https://policylayer.com/tools/tairon-ai-0g-chain-mcp/get-staking-info.md
- `get_validator_info` — Read — https://policylayer.com/tools/tairon-ai-0g-chain-mcp/get-validator-info.md
- `get_validators_list` — Read — https://policylayer.com/tools/tairon-ai-0g-chain-mcp/get-validators-list.md
- `create_wallet` — Write — https://policylayer.com/tools/tairon-ai-0g-chain-mcp/create-wallet.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=tairon-ai-0g-chain-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/tairon-ai-0g-chain-mcp
