Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_contract_get_testing_guide

Learn to test Zetrix smart contracts using TEST_INVOKE and TEST_QUERY methods for development verification.

Instructions

Get guide on testing Zetrix smart contracts with TEST_INVOKE and TEST_QUERY

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler case in the main tool dispatcher that calls ZetrixContractDocs.getTestingGuide() to retrieve and return the testing guide documentation.
    case "zetrix_contract_get_testing_guide": {
      const docs = zetrixContractDocs.getTestingGuide();
      return {
        content: [
          {
            type: "text",
            text: docs,
          },
        ],
      };
    }
  • Tool schema definition and registration in the tools array, specifying name, description, and empty input schema.
    {
      name: "zetrix_contract_get_testing_guide",
      description: "Get guide on testing Zetrix smart contracts with TEST_INVOKE and TEST_QUERY",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Core helper method that returns the detailed markdown-formatted testing guide for Zetrix smart contracts, including TEST_INVOKE and TEST_QUERY usage examples.
      getTestingGuide(): string {
        return `# Zetrix Smart Contract Testing Guide
    
    ## TEST_INVOKE Function
    
    Execute transactions and validate results:
    
    \`\`\`javascript
    TEST_INVOKE(
        "Test description",
        contractAddress,
        txInitiator,
        {
            method: "methodName",
            params: {
                param1: "value1",
                param2: "value2"
            }
        },
        TEST_RESULT.SUCCESS  // or TEST_RESULT.FAILED
    );
    \`\`\`
    
    ### Example
    \`\`\`javascript
    TEST_INVOKE(
        "Transfer tokens from Alice to Bob",
        contractAddress,
        aliceAddress,
        {
            method: "transfer",
            params: {
                to: bobAddress,
                amount: "1000"
            }
        },
        TEST_RESULT.SUCCESS
    );
    \`\`\`
    
    ## TEST_QUERY Function
    
    Query contract state and validate:
    
    \`\`\`javascript
    TEST_QUERY(
        "Test description",
        contractAddress,
        {
            method: "methodName",
            params: {
                param1: "value1"
            }
        },
        TEST_CONDITION.EQUALS,  // Comparison operator
        expectedValue,
        ["result", "field", "path"]  // JSON path to value
    );
    \`\`\`
    
    ### Example
    \`\`\`javascript
    TEST_QUERY(
        "Check Bob's balance is 1000",
        contractAddress,
        {
            method: "balanceOf",
            params: {
                address: bobAddress
            }
        },
        TEST_CONDITION.EQUALS,
        "1000",
        ["result", "balance"]
    );
    \`\`\`
    
    ## Test Conditions
    
    - **TEST_CONDITION.EQUALS** - Exact value match
    - **TEST_CONDITION.GREATER_THAN** - Numeric greater than
    - **TEST_CONDITION.LESSER_THAN** - Numeric less than
    - **TEST_CONDITION.CONTAINS** - String/array contains
    
    ## Test Organization
    
    ### Integration Tests (On-Chain)
    Located in \`tests/integration/\`
    \`\`\`bash
    npm test tests/integration/ztp20/test-ztp20Core.js
    \`\`\`
    
    ### Unit Tests (Local)
    Located in \`tests/unit/\`
    \`\`\`bash
    npm run test-coverage tests/unit/ztp20/test-ztp20.js
    \`\`\`
    
    See SMART_CONTRACT_DEVELOPMENT.md for complete testing guide.`;
      }
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 mentions 'Get guide' which suggests a read-only operation, but doesn't disclose behavioral traits such as whether it returns static documentation, requires authentication, has rate limits, or what format the guide is in. 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, efficient sentence that front-loads the purpose ('Get guide on testing Zetrix smart contracts') and adds specific detail ('with TEST_INVOKE and TEST_QUERY'). There is no wasted verbiage, making it appropriately sized and well-structured.

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. It states what the tool does but lacks details on behavior, output format, or integration context. For a guide-fetching tool, more information on the guide's content or usage would improve completeness, but it meets the basic threshold.

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 tool has 0 parameters with 100% schema description coverage, so no parameter information is needed in the description. The description doesn't add any parameter details, which is acceptable given the baseline of 4 for zero parameters, as it doesn't need to compensate for schema gaps.

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' and the resource 'guide on testing Zetrix smart contracts', specifying it covers TEST_INVOKE and TEST_QUERY methods. It distinguishes from siblings like 'zetrix_contract_get_structure_guide' by focusing on testing rather than structure, but could be more explicit about the distinction.

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 explicit guidance on when to use this tool versus alternatives is provided. The description implies usage for testing smart contracts, but it doesn't specify prerequisites, timing, or how it differs from other contract-related tools like 'zetrix_contract_get_chain_functions' or 'zetrix_test_transaction'.

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