Skip to main content
Glama

identity_resolve

Resolve Hedera account IDs to view on-chain identity profiles including account age, token holdings, transaction history, and HCS-based identity records.

Instructions

Resolve a Hedera account ID to its on-chain identity profile including account age, token holdings, transaction history, and any HCS-based identity records. Costs 0.1 HBAR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesYour HederaIntel API key
account_idYesHedera account ID to resolve (e.g. 0.0.123456)

Implementation Reference

  • The core handler logic for "identity_resolve" which fetches account details, token holdings, transactions, and calculates account age and risks.
    // --- identity_resolve ---
    if (name === "identity_resolve") {
      const payment = chargeForTool("identity_resolve", args.api_key);
      const base = getMirrorNodeBase();
    
      // Resolve EVM address or Hedera ID
      const resolved = await resolveAccountInput(args.account_id, base);
      const hederaId = resolved.hederaId;
    
      // Use cached account data if available from resolution
      const account = resolved._account ||
        (await axios.get(`${base}/api/v1/accounts/${hederaId}`)).data;
    
      // Fetch token balances
      const tokenRes = await axios.get(
        `${base}/api/v1/accounts/${hederaId}/tokens?limit=50&order=desc`
      ).catch(() => ({ data: { tokens: [] } }));
      const tokens = tokenRes.data.tokens || [];
    
      // Fetch recent transactions
      const txRes = await axios.get(
        `${base}/api/v1/transactions?account.id=${hederaId}&limit=25&order=desc`
      ).catch(() => ({ data: { transactions: [] } }));
      const transactions = txRes.data.transactions || [];
    
      // Fetch NFT holdings
      const nftRes = await axios.get(
        `${base}/api/v1/accounts/${hederaId}/nfts?limit=25&order=desc`
      ).catch(() => ({ data: { nfts: [] } }));
      const nfts = nftRes.data.nfts || [];
    
      // Calculate account age
      const createdAt = account.created_timestamp
        ? new Date(parseFloat(account.created_timestamp) * 1000)
        : null;
      const ageMs = createdAt ? Date.now() - createdAt.getTime() : null;
      const ageDays = ageMs ? Math.floor(ageMs / (1000 * 60 * 60 * 24)) : null;
    
      // Transaction type breakdown
      const txTypes = {};
      for (const tx of transactions) {
        const t = tx.name || "UNKNOWN";
        txTypes[t] = (txTypes[t] || 0) + 1;
      }
    
      // Staking info
      const stakingInfo = account.staked_node_id !== null && account.staked_node_id !== undefined
        ? { staked_node: account.staked_node_id, staked_account: account.staked_account_id || null }
        : null;
    
      return {
        account_id: hederaId,
        input: args.account_id,
        input_type: resolved.inputType,
        alias: account.alias || null,
        evm_address: resolved.evmAddress || account.evm_address || null,
        hbar_balance: account.balance?.balance
          ? (account.balance.balance / 100000000).toFixed(4) + " HBAR"
          : "unknown",
        account_age_days: ageDays,
        created_at: createdAt ? createdAt.toISOString() : null,
        memo: account.memo || null,
        receiver_sig_required: account.receiver_sig_required || false,
        max_auto_token_associations: account.max_automatic_token_associations || 0,
        token_count: tokens.length,
        nft_count: nfts.length,
        recent_transaction_count: transactions.length,
        transaction_type_breakdown: txTypes,
        staking: stakingInfo,
        key_type: account.key?._type || null,
        tokens: tokens.slice(0, 10).map(t => ({
          token_id: t.token_id,
          balance: t.balance,
          kyc_status: t.kyc_status || "NOT_APPLICABLE",
          freeze_status: t.freeze_status || "NOT_APPLICABLE",
        })),
        identity_summary: ageDays > 365
          ? "Established account - over 1 year old with transaction history."
          : ageDays > 30
          ? "Active account - between 1 month and 1 year old."
          : "New account - less than 30 days old.",
        payment,
        timestamp: new Date().toISOString(),
      };
    }
  • Schema definition for the "identity_resolve" tool, including input requirements and description.
    {
      name: "identity_resolve",
      description: "Resolve a Hedera account ID or EVM address to its on-chain identity profile including account age, token holdings, transaction history, and any HCS-based identity records. Accepts both Hedera native IDs (0.0.123456) and EVM addresses (0x...). Costs 0.2 HBAR.",
      inputSchema: {
        type: "object",
        properties: {
          account_id: { type: "string", description: "Hedera account ID (e.g. 0.0.123456) or EVM address (e.g. 0x1234...)" },
          api_key: { type: "string", description: "Your HederaIntel API key" },
        },
        required: ["account_id", "api_key"],
      },
    },
Behavior4/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 effectively describes the tool's function and explicitly states a cost (0.1 HBAR), which is valuable operational context. However, it does not cover other behavioral aspects like rate limits, error conditions, or response format.

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, well-structured sentence that efficiently conveys purpose, scope, and cost. Every element serves a purpose with no redundant information, making it highly concise and front-loaded.

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 moderate complexity (identity resolution with multiple data points), no annotations, and no output schema, the description is adequate but incomplete. It covers the core function and cost, but lacks details on output structure, error handling, or integration with sibling tools, leaving gaps for an AI agent.

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 100%, so the schema already fully documents both parameters. The description does not add any additional meaning or context beyond what the schema provides, such as format examples for 'account_id' beyond the schema's example. Baseline 3 is appropriate when schema does the heavy lifting.

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 states the specific action ('Resolve') and resource ('Hedera account ID'), detailing what information is retrieved (account age, token holdings, transaction history, HCS-based identity records). It distinguishes from siblings like 'account_info' by focusing on identity resolution rather than basic account data.

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

Usage Guidelines3/5

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

The description implies usage for identity resolution, but does not explicitly state when to use this tool versus alternatives like 'identity_check_sanctions' or 'identity_verify_kyc'. It mentions a cost (0.1 HBAR), which provides some context but lacks clear guidance on exclusions or prerequisites.

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/mountainmystic/hederatoolbox'

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