Skip to main content
Glama

token_manage

Manage Hedera Token Service operations including creation, transfers, minting, burning, compliance controls, and supply management through a unified interface.

Instructions

Comprehensive Hedera Token Service (HTS) management. Execute ANY token operation through a single unified interface.

OPERATIONS:

  • create: Create new fungible token with custom fees, keys, and supply controls

  • associate: Associate token with account (required before receiving tokens)

  • transfer: Transfer tokens between accounts

  • mint: Mint additional tokens (requires supply key)

  • burn: Burn tokens from treasury

  • freeze/unfreeze: Control account's ability to transfer specific token

  • kyc_grant/kyc_revoke: Manage KYC status for regulated tokens

  • wipe: Remove tokens from account (requires wipe key)

  • pause/unpause: Halt/resume all token operations globally

USE THIS FOR: All token lifecycle management, compliance operations, supply control, and transfer operations.

REQUIRES: Operator account with appropriate keys (admin/supply/freeze/kyc/wipe/pause) based on operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesToken operation to perform
tokenIdNoToken ID (format: 0.0.xxxxx) - required for all ops except create
accountIdNoTarget account ID - for associate/freeze/unfreeze/kyc/wipe
amountNoAmount for transfer/mint/burn/wipe operations
nameNoToken name (for create)
symbolNoToken symbol (for create)
decimalsNoDecimal places (for create, default: 0)
initialSupplyNoInitial token supply (for create)
adminKeyNoEnable admin key (for create)
supplyKeyNoEnable supply key for mint/burn (for create)
freezeKeyNoEnable freeze key (for create)
kycKeyNoEnable KYC key (for create)
wipeKeyNoEnable wipe key (for create)
pauseKeyNoEnable pause key (for create)
memoNoToken memo (for create)
fromNoSource account (for transfer)
toNoDestination account (for transfer)

Implementation Reference

  • Main handler function for 'token_manage' tool. Dispatches to specific tokenTools functions based on the 'operation' parameter (e.g., create, associate, transfer).
    export async function tokenManage(args: {
      operation: 'create' | 'associate' | 'transfer' | 'mint' | 'burn' | 'freeze' | 'unfreeze' | 'kyc_grant' | 'kyc_revoke' | 'wipe' | 'pause' | 'unpause';
      // Common parameters
      tokenId?: string;
      accountId?: string;
      amount?: number;
      // Create-specific
      name?: string;
      symbol?: string;
      decimals?: number;
      initialSupply?: number;
      adminKey?: boolean;
      kycKey?: boolean;
      freezeKey?: boolean;
      wipeKey?: boolean;
      supplyKey?: boolean;
      pauseKey?: boolean;
      memo?: string;
      customFees?: any[];
      // Transfer-specific
      from?: string;
      to?: string;
      senderPrivateKey?: string;
      // Associate-specific
      privateKey?: string;
    }): Promise<ToolResult> {
      try {
        logger.info('Token management operation', { operation: args.operation });
    
        switch (args.operation) {
          case 'create':
            return await tokenTools.createToken({
              name: args.name!,
              symbol: args.symbol!,
              decimals: args.decimals,
              initialSupply: args.initialSupply,
              adminKey: args.adminKey,
              kycKey: args.kycKey,
              freezeKey: args.freezeKey,
              wipeKey: args.wipeKey,
              supplyKey: args.supplyKey,
              pauseKey: args.pauseKey,
              memo: args.memo,
              customFees: args.customFees,
            });
    
          case 'associate':
            return await tokenTools.associateToken({
              accountId: args.accountId!,
              tokenId: args.tokenId!,
              privateKey: args.privateKey,
            });
    
          case 'transfer':
            return await tokenTools.transferToken({
              tokenId: args.tokenId!,
              from: args.from!,
              to: args.to!,
              amount: args.amount!,
              senderPrivateKey: args.senderPrivateKey,
            });
    
          case 'mint':
            return await tokenTools.mintToken({
              tokenId: args.tokenId!,
              amount: args.amount!,
            });
    
          case 'burn':
            return await tokenTools.burnToken({
              tokenId: args.tokenId!,
              amount: args.amount!,
            });
    
          case 'freeze':
            return await tokenTools.freezeToken({
              tokenId: args.tokenId!,
              accountId: args.accountId!,
            });
    
          case 'unfreeze':
            return await tokenTools.unfreezeToken({
              tokenId: args.tokenId!,
              accountId: args.accountId!,
            });
    
          case 'kyc_grant':
            return await tokenTools.grantKyc({
              tokenId: args.tokenId!,
              accountId: args.accountId!,
            });
    
          case 'kyc_revoke':
            return await tokenTools.revokeKyc({
              tokenId: args.tokenId!,
              accountId: args.accountId!,
            });
    
          case 'wipe':
            return await tokenTools.wipeToken({
              tokenId: args.tokenId!,
              accountId: args.accountId!,
              amount: args.amount!,
            });
    
          case 'pause':
            return await tokenTools.pauseToken({
              tokenId: args.tokenId!,
            });
    
          case 'unpause':
            return await tokenTools.unpauseToken({
              tokenId: args.tokenId!,
            });
    
          default:
            return {
              success: false,
              error: `Unknown token operation: ${args.operation}`,
            };
        }
      } catch (error) {
        logger.error('Token management failed', { operation: args.operation, error });
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Unknown error',
        };
      }
    }
  • Tool schema definition for 'token_manage', including detailed description, input schema with all parameters and enums for operations.
      {
        name: 'token_manage',
        description: `Comprehensive Hedera Token Service (HTS) management. Execute ANY token operation through a single unified interface.
    
    OPERATIONS:
    - create: Create new fungible token with custom fees, keys, and supply controls
    - associate: Associate token with account (required before receiving tokens)
    - transfer: Transfer tokens between accounts
    - mint: Mint additional tokens (requires supply key)
    - burn: Burn tokens from treasury
    - freeze/unfreeze: Control account's ability to transfer specific token
    - kyc_grant/kyc_revoke: Manage KYC status for regulated tokens
    - wipe: Remove tokens from account (requires wipe key)
    - pause/unpause: Halt/resume all token operations globally
    
    USE THIS FOR: All token lifecycle management, compliance operations, supply control, and transfer operations.
    
    REQUIRES: Operator account with appropriate keys (admin/supply/freeze/kyc/wipe/pause) based on operation.`,
        inputSchema: {
          type: 'object' as const,
          properties: {
            operation: {
              type: 'string',
              enum: ['create', 'associate', 'transfer', 'mint', 'burn', 'freeze', 'unfreeze', 'kyc_grant', 'kyc_revoke', 'wipe', 'pause', 'unpause'],
              description: 'Token operation to perform',
            },
            tokenId: {
              type: 'string',
              description: 'Token ID (format: 0.0.xxxxx) - required for all ops except create',
            },
            accountId: {
              type: 'string',
              description: 'Target account ID - for associate/freeze/unfreeze/kyc/wipe',
            },
            amount: {
              type: 'number',
              description: 'Amount for transfer/mint/burn/wipe operations',
            },
            name: {
              type: 'string',
              description: 'Token name (for create)',
            },
            symbol: {
              type: 'string',
              description: 'Token symbol (for create)',
            },
            decimals: {
              type: 'number',
              description: 'Decimal places (for create, default: 0)',
            },
            initialSupply: {
              type: 'number',
              description: 'Initial token supply (for create)',
            },
            adminKey: {
              type: 'boolean',
              description: 'Enable admin key (for create)',
            },
            supplyKey: {
              type: 'boolean',
              description: 'Enable supply key for mint/burn (for create)',
            },
            freezeKey: {
              type: 'boolean',
              description: 'Enable freeze key (for create)',
            },
            kycKey: {
              type: 'boolean',
              description: 'Enable KYC key (for create)',
            },
            wipeKey: {
              type: 'boolean',
              description: 'Enable wipe key (for create)',
            },
            pauseKey: {
              type: 'boolean',
              description: 'Enable pause key (for create)',
            },
            memo: {
              type: 'string',
              description: 'Token memo (for create)',
            },
            from: {
              type: 'string',
              description: 'Source account (for transfer)',
            },
            to: {
              type: 'string',
              description: 'Destination account (for transfer)',
            },
          },
          required: ['operation'],
        },
      },
  • src/index.ts:588-589 (registration)
    Tool registration in the main MCP server request handler switch statement, mapping 'token_manage' calls to the tokenManage function.
    case 'token_manage':
      result = await tokenManage(args as any);
  • src/index.ts:34-34 (registration)
    Import of the tokenManage handler function from composite.ts.
    tokenManage,
Behavior4/5

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

With no annotations provided, the description carries full burden. It effectively discloses key behavioral traits: it's a unified interface for multiple operations, requires specific keys for different operations (admin/supply/freeze/kyc/wipe/pause), and mentions prerequisites like association before receiving tokens. However, it doesn't cover rate limits, error conditions, or transaction costs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (OPERATIONS, USE THIS FOR, REQUIRES) and uses bullet points for readability. While comprehensive, it could be more concise by reducing some redundancy in operation explanations. Every sentence adds value, but the overall length is substantial for a single tool.

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

Completeness4/5

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

For a complex tool with 17 parameters, no annotations, and no output schema, the description does a good job covering purpose, usage, and behavioral context. It explains the unified interface approach, lists all operations with brief explanations, and specifies key requirements. The main gap is lack of output format information, which would be helpful given the diverse operations.

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 documents all 17 parameters. The description adds some context by grouping parameters with operations (e.g., 'for create', 'for transfer'), but doesn't provide significant additional semantic meaning beyond what's in the schema descriptions. This meets the baseline 3 for high schema coverage.

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 this is for 'Comprehensive Hedera Token Service (HTS) management' and lists 12 specific operations with brief explanations. It distinguishes itself from sibling tools like 'transfer_hbar' and 'stablecoin_manage' by focusing exclusively on token operations rather than HBAR transfers or stablecoin-specific functions.

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

Usage Guidelines5/5

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

The description explicitly states 'USE THIS FOR: All token lifecycle management, compliance operations, supply control, and transfer operations' and 'REQUIRES: Operator account with appropriate keys... based on operation.' This provides clear when-to-use guidance and prerequisites, though it doesn't explicitly mention when NOT to use it versus alternatives.

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/justmert/hashpilot'

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