Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_contract_get_utils_functions

Retrieve documentation for built-in Utils object functions to develop and debug Zetrix smart contracts.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:669-676 (registration)
    Tool registration entry defining the tool name, description, and empty input schema (no parameters required).
    {
      name: "zetrix_contract_get_utils_functions",
      description: "Get documentation for all built-in Utils object functions available in Zetrix smart contracts",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Switch case handler that invokes zetrixContractDocs.getUtilsFunctions() and formats the result as MCP text content response.
    case "zetrix_contract_get_utils_functions": {
      const docs = zetrixContractDocs.getUtilsFunctions();
      return {
        content: [
          {
            type: "text",
            text: docs,
          },
        ],
      };
    }
  • Core helper method that returns comprehensive Markdown documentation listing all Utils object functions available in Zetrix smart contracts, categorized by operation type.
      getUtilsFunctions(): string {
        return `# Zetrix Smart Contract - Utils Object Functions
    
    ## 256-bit Integer Operations
    - **Utils.int256Compare(x, y)** - Compare (returns 1, 0, or -1)
    - **Utils.int256Add(x, y)** - Addition (returns string)
    - **Utils.int256Sub(x, y)** - Subtraction (returns string)
    - **Utils.int256Mul(x, y)** - Multiplication (returns string)
    - **Utils.int256Div(x, y)** - Division (returns string)
    - **Utils.int256Mod(x, y)** - Modulo (returns string)
    
    ## 64-bit Integer Operations
    - **Utils.int64Compare(x, y)** - Compare (returns 1, 0, or -1)
    - **Utils.int64Add(x, y)** - Addition (returns string)
    - **Utils.int64Sub(x, y)** - Subtraction (returns string)
    - **Utils.int64Mul(x, y)** - Multiplication (returns string)
    - **Utils.int64Div(x, y)** - Division (returns string)
    - **Utils.int64Mod(x, y)** - Modulo (returns string)
    
    ## Cryptographic Functions
    - **Utils.sha256(data, dataType)** - SHA-256 hash (returns base16)
    - **Utils.ecVerify(signedData, publicKey, blobData, blobDataType)** - Verify signature
    - **Utils.toAddress(publicKey)** - Convert public key to address
    
    ## Validation Functions
    - **Utils.addressCheck(address)** - Validate address format
    - **Utils.stoI64Check(strNumber)** - Validate 64-bit string number
    - **Utils.stoI256Check(strNumber)** - Validate 256-bit string number
    
    ## Utility Functions
    - **Utils.log(info)** - Output trace log
    - **Utils.assert(condition, msg)** - Assert with error message
    - **Utils.toBaseUnit(value)** - Convert to base unit (× 10^6)
    - **Utils.hexToDec(strHex)** - Convert hex to decimal string
    
    ## Zero-Knowledge Proof Functions
    - **Utils.bpRangeProofVerify(commit, proof)** - Verify range proof
    - **Utils.pedersenTallyVerify(inputCommits, outputCommits, excessMsg, excessSign)** - Verify commitment tally
    
    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 of behavioral disclosure. It states the action is to 'Get documentation', which implies a read-only operation, but doesn't specify details like whether it requires authentication, rate limits, error handling, or the format of the returned documentation. This leaves significant gaps for a tool with zero 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, clear sentence that efficiently conveys the tool's purpose without any wasted words. It is front-loaded with the core action and resource, making it easy to parse and understand quickly.

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 0 parameters, no annotations, and no output schema, the description is minimally adequate for a simple read operation. However, it lacks details on the output format (e.g., structure of the documentation) and behavioral context, which could be important for an agent to use it effectively. It's complete enough for basic understanding but has room for improvement.

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% description coverage, so no parameter documentation is needed. The description appropriately doesn't mention parameters, and since there are none, it doesn't need to compensate for any gaps. A baseline of 4 is given as it meets the requirement without unnecessary information.

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 verb 'Get documentation' and the resource 'all built-in Utils object functions available in Zetrix smart contracts', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'zetrix_contract_get_chain_functions' or 'zetrix_contract_get_structure_guide', which appear to serve similar documentation purposes for different aspects.

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?

The description provides no guidance on when to use this tool versus alternatives, such as other 'get' tools in the sibling list (e.g., 'zetrix_contract_get_chain_functions'). It lacks context about prerequisites, typical use cases, or exclusions, leaving the agent to infer usage based on the name alone.

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