Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_contract_get_chain_functions

Retrieve documentation for all built-in Chain object functions to understand available methods for Zetrix smart contract development.

Instructions

Get documentation for all built-in Chain object functions available in Zetrix smart contracts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:661-668 (registration)
    Tool registration entry defining name, description, and input schema (empty object properties). Serves as both registration and schema definition.
    {
      name: "zetrix_contract_get_chain_functions",
      description: "Get documentation for all built-in Chain object functions available in Zetrix smart contracts",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • MCP tool handler switch case that calls ZetrixContractDocs.getChainFunctions() and returns the result as text content.
    case "zetrix_contract_get_chain_functions": {
      const docs = zetrixContractDocs.getChainFunctions();
      return {
        content: [
          {
            type: "text",
            text: docs,
          },
        ],
      };
    }
  • Helper method in ZetrixContractDocs class that returns the complete hardcoded Markdown documentation for all Chain object functions used in Zetrix smart contracts.
      getChainFunctions(): string {
        return `# Zetrix Smart Contract - Chain Object Functions
    
    ## Metadata Management
    - **Chain.store(key, value)** - Store data in contract storage
    - **Chain.load(key)** - Retrieve data from contract storage
    - **Chain.del(key)** - Delete data from contract storage
    
    ## Account Query Functions
    - **Chain.getBalance(address)** - Get account balance (returns string)
    - **Chain.getAccountMetadata(address, key)** - Get account metadata
    - **Chain.getAccountAsset(address, assetKey)** - Get account assets
    - **Chain.getAccountPrivilege(address)** - Get account privileges (JSON)
    - **Chain.getContractProperty(address)** - Get contract properties
    
    ## Transaction Functions
    - **Chain.payCoin(address, amount, input, metadata)** - Transfer ZTX coins
    - **Chain.payAsset(address, issuer, code, amount, input, metadata)** - Transfer assets
    - **Chain.issueAsset(code, amount)** - Issue new assets
    
    ## Contract Operations
    - **Chain.contractCall(address, asset, amount, input)** - Call another contract
    - **Chain.contractQuery(address, input)** - Query another contract (read-only)
    - **Chain.contractCreate(balance, type, code, input)** - Deploy new contract
    - **Chain.delegateCall(address, input)** - Execute code in current context
    - **Chain.delegateQuery(address, input)** - Query in current context
    
    ## Logging
    - **Chain.tlog(topic, arg1, arg2, arg3, arg4, arg5)** - Log transaction event
    
    ## Built-in Objects
    - **Chain.block.number** - Current block number
    - **Chain.block.timestamp** - Current block timestamp
    - **Chain.tx.initiator** - Transaction initiator
    - **Chain.tx.sender** - Transaction sender
    - **Chain.tx.gasPrice** - Gas price
    - **Chain.tx.hash** - Transaction hash
    - **Chain.tx.feeLimit** - Fee limit
    - **Chain.msg.initiator** - Message initiator
    - **Chain.msg.sender** - Message sender
    - **Chain.msg.coinAmount** - Coin amount sent
    - **Chain.msg.asset** - Asset sent
    - **Chain.msg.nonce** - Message nonce
    - **Chain.msg.operationIndex** - Operation index
    - **Chain.thisAddress** - Current contract address
    
    See SMART_CONTRACT_DEVELOPMENT.md for examples.`;
      }
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. It states the tool retrieves documentation, implying a read-only operation, but does not disclose behavioral traits such as whether it requires authentication, rate limits, or the format of the returned documentation. This leaves gaps for a tool with no annotation coverage.

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 any wasted words. It is front-loaded and appropriately sized for a no-parameter tool.

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 has no parameters and no output schema, the description is minimal but adequate for a simple documentation retrieval tool. However, without annotations or output details, it lacks completeness regarding behavioral context and return format, which could be important for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter information is needed. The description appropriately does not discuss parameters, earning a baseline score of 4 for not adding unnecessary details.

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 verb 'Get documentation' and specifies the resource 'all built-in Chain object functions available in Zetrix smart contracts.' It distinguishes from sibling tools like zetrix_contract_get_utils_functions by focusing specifically on Chain object functions rather than utilities.

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 when documentation for Chain object functions is needed, but it does not explicitly state when to use this tool versus alternatives like zetrix_contract_get_structure_guide or zetrix_contract_get_testing_guide. No exclusions or prerequisites are mentioned.

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