Skip to main content
Glama
pokt-network

Grove Public Endpoints MCP Server

Official
by pokt-network

call_contract_view

Execute read-only smart contract functions to retrieve blockchain data without modifying state, supporting Ethereum, Solana, Cosmos, and Layer 2 networks through Grove's public endpoints.

Instructions

Call a read-only contract function

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
contractAddressYesContract address
dataYesEncoded function call data
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Registers the 'call_contract_view' MCP tool with name, description, and input schema definition
    {
      name: 'call_contract_view',
      description: 'Call a read-only contract function',
      inputSchema: {
        type: 'object',
        properties: {
          blockchain: {
            type: 'string',
            description: 'Blockchain name',
          },
          contractAddress: {
            type: 'string',
            description: 'Contract address',
          },
          data: {
            type: 'string',
            description: 'Encoded function call data',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['blockchain', 'contractAddress', 'data'],
      },
    },
  • Handler logic for 'call_contract_view' tool: extracts arguments, calls AdvancedBlockchainService.callContractView, formats and returns the result as MCP response
    case 'call_contract_view': {
      const blockchain = args?.blockchain as string;
      const contractAddress = args?.contractAddress as string;
      const data = args?.data as string;
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await advancedBlockchain.callContractView(
        blockchain,
        contractAddress,
        data,
        network
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Core implementation: performs 'eth_call' RPC call to the contract address with the provided calldata on the specified blockchain and network
    async callContractView(
      blockchain: string,
      contractAddress: string,
      data: string,
      network: 'mainnet' | 'testnet' = 'mainnet'
    ): Promise<EndpointResponse> {
      const service = this.blockchainService.getServiceByBlockchain(blockchain, network);
    
      if (!service) {
        return {
          success: false,
          error: `Blockchain service not found: ${blockchain} (${network})`,
        };
      }
    
      return this.blockchainService.callRPCMethod(
        service.id,
        'eth_call',
        [
          {
            to: contractAddress,
            data: data,
          },
          'latest',
        ]
      );
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'read-only' which implies non-destructive behavior, but doesn't mention authentication requirements, rate limits, error conditions, or what the response looks like. For a tool with 4 parameters and no output schema, this leaves significant behavioral gaps.

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 extremely concise at just 5 words, front-loading the essential information ('Call a read-only contract function') with zero wasted words. Every word earns its place, making it highly efficient for an agent to parse.

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 the tool's complexity (4 parameters, no annotations, no output schema), the description is insufficiently complete. It doesn't explain what 'read-only' means operationally, what format the response takes, error handling, or how this differs from similar tools. The agent lacks critical context for proper tool selection and invocation.

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?

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema. The baseline score of 3 reflects that the schema does the heavy lifting for parameter documentation.

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 tool's purpose as 'Call a read-only contract function', specifying the verb ('Call') and resource ('contract function') with the important qualifier 'read-only'. However, it doesn't explicitly differentiate from sibling tools like 'call_endpoint' or 'call_rpc_method', which prevents a perfect score.

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 minimal usage guidance by indicating this is for 'read-only' contract functions, but offers no explicit when-to-use guidance, no alternatives mentioned, and no context about when to choose this over similar tools like 'call_endpoint' or 'call_rpc_method'. The agent must infer usage from the description 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/pokt-network/mcp'

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