Skip to main content
Glama
boray
by boray

get-network-state

Retrieve current Mina blockchain network state data for monitoring and analysis.

Instructions

Get the current state of the Mina network

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:116-133 (registration)
    Registers the "get-network-state" MCP tool with no input parameters. The handler fetches network state via GraphQL client and returns it as JSON text.
    server.tool(
      "get-network-state",
      "Get the current state of the Mina network",
      {},
      async () => {
        try {
          const result = await minaClient.queryNetworkState();
          return {
            content: [{
              type: "text",
              text: JSON.stringify(result, null, 2)
            }]
          };
        } catch (error) {
          throw new Error(`Failed to get network state: ${error}`);
        }
      }
    );
  • The MCP tool handler function that executes the logic: queries network state and formats response.
    async () => {
      try {
        const result = await minaClient.queryNetworkState();
        return {
          content: [{
            type: "text",
            text: JSON.stringify(result, null, 2)
          }]
        };
      } catch (error) {
        throw new Error(`Failed to get network state: ${error}`);
      }
    }
  • Core implementation: performs GraphQL query to retrieve Mina network state (canonical and pending max block heights).
    async queryNetworkState(): Promise<{ networkState: NetworkStateOutput }> {
      const query = `
        query {
          networkState {
            maxBlockHeight {
              canonicalMaxBlockHeight
              pendingMaxBlockHeight
            }
          }
        }
      `;
    
      return this.client.request(query);
    }
  • TypeScript interface defining the structure of the network state output data.
    export interface NetworkStateOutput {
      maxBlockHeight: MaxBlockHeightInfo;
    }
  • TypeScript interface for max block height information used in network state.
    export interface MaxBlockHeightInfo {
      canonicalMaxBlockHeight: number;
      pendingMaxBlockHeight: number;
    }
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 the tool retrieves network state but doesn't mention whether this is a read-only operation, if it requires authentication, rate limits, or what the output format might be. This is a significant gap 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 core purpose without any wasted words. It's appropriately sized for a simple, parameterless tool, making it easy for an agent to parse 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's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It explains what the tool does but lacks behavioral details and usage context, which are important even for simple tools. This meets the minimum viable threshold but doesn't fully compensate for the missing structured data.

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 documentation is needed. The description appropriately doesn't discuss parameters, and since there are none, it doesn't need to compensate for any gaps, earning a high baseline score.

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 ('current state of the Mina network'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'query-actions' or 'query-events', which might also retrieve network-related information, preventing 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?

No guidance is provided on when to use this tool versus alternatives like 'query-actions' or 'query-events'. The description implies it's for retrieving the current network state, but it doesn't specify contexts, prerequisites, or exclusions, leaving the agent with minimal 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/boray/mcp-mina-archive-node'

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