Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_contract_get_token_standard

Retrieve documentation for Zetrix blockchain token standards (ZTP20, ZTP721, ZTP1155) to understand smart contract specifications and implementation requirements.

Instructions

Get token standard specification (ZTP20, ZTP721, or ZTP1155)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
standardYesToken standard to get documentation for

Implementation Reference

  • src/index.ts:685-699 (registration)
    Tool registration including name, description, and input schema definition in the tools array used for ListToolsRequest.
    {
      name: "zetrix_contract_get_token_standard",
      description: "Get token standard specification (ZTP20, ZTP721, or ZTP1155)",
      inputSchema: {
        type: "object",
        properties: {
          standard: {
            type: "string",
            enum: ["ZTP20", "ZTP721", "ZTP1155"],
            description: "Token standard to get documentation for",
          },
        },
        required: ["standard"],
      },
    },
  • Main tool handler in the CallToolRequest switch statement. Validates arguments and delegates to zetrixContractDocs.getTokenStandard, then formats response.
    case "zetrix_contract_get_token_standard": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const docs = zetrixContractDocs.getTokenStandard(args.standard as string);
      return {
        content: [
          {
            type: "text",
            text: docs,
          },
        ],
      };
    }
  • Helper method in ZetrixContractDocs class that provides detailed documentation strings for ZTP20, ZTP721, or ZTP1155 token standards, including methods, events, variants, and code examples.
      getTokenStandard(standard: string): string {
        if (standard === 'ZTP20') {
          return `# ZTP20 Token Standard (Fungible Tokens)
    
    ## Standard Methods
    
    ### Query Methods
    - **balanceOf(address)** - Get token balance of address
    - **totalSupply()** - Get total token supply
    - **allowance(owner, spender)** - Get approved amount
    
    ### Transaction Methods
    - **transfer(to, amount)** - Transfer tokens
    - **approve(spender, amount)** - Approve spending
    - **transferFrom(from, to, amount)** - Transfer on behalf
    
    ### Events
    \`\`\`javascript
    Chain.tlog('Transfer', from, to, amount);
    Chain.tlog('Approval', owner, spender, amount);
    \`\`\`
    
    ## Variants Available
    
    1. **ZTP20Core** - Basic fungible token
    2. **ZTP20Burnable** - Can destroy tokens
    3. **ZTP20Permit** - Gasless approvals
    4. **ZTP20Pausable** - Emergency stop functionality
    5. **ZTP20Capped** - Maximum supply limit
    
    ## Example Implementation
    
    \`\`\`javascript
    const ZTP20Core = function() {
        const self = this;
    
        self.transfer = function(to, amount) {
            const from = Chain.msg.sender;
            Utils.assert(Utils.addressCheck(to), 'Invalid address');
    
            const fromBalance = self.getBalance(from);
            const toBalance = self.getBalance(to);
    
            Utils.assert(
                Utils.int256Compare(fromBalance, amount) >= 0,
                'Insufficient balance'
            );
    
            const newFromBalance = Utils.int256Sub(fromBalance, amount);
            const newToBalance = Utils.int256Add(toBalance, amount);
    
            self.setBalance(from, newFromBalance);
            self.setBalance(to, newToBalance);
    
            Chain.tlog('Transfer', from, to, amount);
            return true;
        };
    };
    \`\`\`
    
    See SMART_CONTRACT_DEVELOPMENT.md for complete details.`;
        } else if (standard === 'ZTP721') {
          return `# ZTP721 Token Standard (Non-Fungible Tokens)
    
    ## Standard Methods
    
    ### Query Methods
    - **balanceOf(owner)** - Get NFT count of owner
    - **ownerOf(tokenId)** - Get owner of NFT
    - **getApproved(tokenId)** - Get approved address for NFT
    - **isApprovedForAll(owner, operator)** - Check operator approval
    
    ### Transaction Methods
    - **approve(to, tokenId)** - Approve NFT transfer
    - **setApprovalForAll(operator, approved)** - Approve all NFTs
    - **transferFrom(from, to, tokenId)** - Transfer NFT
    - **safeTransferFrom(from, to, tokenId, data)** - Safe transfer NFT
    
    ### Events
    \`\`\`javascript
    Chain.tlog('Transfer', from, to, tokenId);
    Chain.tlog('Approval', owner, approved, tokenId);
    Chain.tlog('ApprovalForAll', owner, operator, approved);
    \`\`\`
    
    ## Variants Available
    
    1. **ZTP721Core** - Basic NFT
    2. **ZTP721Burnable** - Destroyable NFTs
    3. **ZTP721Pausable** - Emergency stop
    4. **ZTP721Enumerable** - Token enumeration support
    
    See SMART_CONTRACT_DEVELOPMENT.md for complete details.`;
        } else if (standard === 'ZTP1155') {
          return `# ZTP1155 Token Standard (Multi-Token)
    
    ## Standard Methods
    
    ### Query Methods
    - **balanceOf(account, id)** - Get balance of token ID
    - **balanceOfBatch(accounts, ids)** - Get multiple balances
    - **isApprovedForAll(account, operator)** - Check operator approval
    
    ### Transaction Methods
    - **setApprovalForAll(operator, approved)** - Approve operator
    - **safeTransferFrom(from, to, id, amount, data)** - Transfer tokens
    - **safeBatchTransferFrom(from, to, ids, amounts, data)** - Batch transfer
    
    ### Events
    \`\`\`javascript
    Chain.tlog('TransferSingle', operator, from, to, id, value);
    Chain.tlog('TransferBatch', operator, from, to, ids, values);
    Chain.tlog('ApprovalForAll', account, operator, approved);
    \`\`\`
    
    ## Variants Available
    
    1. **ZTP1155Core** - Basic multi-token
    2. **ZTP1155Burnable** - Destroyable tokens
    3. **ZTP1155Pausable** - Emergency stop
    4. **ZTP1155Supply** - Track total supply per ID
    5. **ZTP1155URIStorage** - Token metadata URIs
    
    See SMART_CONTRACT_DEVELOPMENT.md for complete details.`;
        }
        return 'Unknown token standard';
      }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It implies a read-only operation ('Get'), but doesn't disclose behavioral traits like whether it requires authentication, rate limits, error conditions, or the format of returned documentation. For a tool with zero annotation coverage, this is a significant gap.

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 with zero waste. It's front-loaded with the core purpose and includes essential details (the three standards) without unnecessary elaboration.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It doesn't explain what 'specification' entails (e.g., technical details, usage examples) or the return format, leaving the agent uncertain about the tool's output and behavioral context.

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%, with the parameter 'standard' fully documented in the schema (including enum values). The description adds no additional meaning beyond restating the enum values, so it meets the baseline of 3 where the schema does the heavy lifting.

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 action ('Get') and resource ('token standard specification'), specifying the three possible standards (ZTP20, ZTP721, ZTP1155). It distinguishes this as a documentation retrieval tool, but doesn't explicitly differentiate from sibling tools like 'zetrix_contract_get_structure_guide' or 'zetrix_contract_get_testing_guide' which might also provide documentation.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context (e.g., during contract development), or compare it to other 'get' tools in the sibling list, leaving the agent without usage direction.

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/Zetrix-Chain/zetrix-mcp-server'

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