Skip to main content
Glama

list_nodit_data_apis

Discover available blockchain data operations to access normalized, multi-chain information for AI applications without handling complex node RPCs or raw event logs.

Instructions

Lists available Nodit Data API operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline async handler function for the 'list_nodit_data_apis' tool. It processes the Nodit Data API OpenAPI spec to extract and list available POST operations with their operationId, description, path, and supported chains, formatting them into a text response.
      server.tool("list_nodit_data_apis", "Lists available Nodit Data API operations.", {}, async () => {
        const toolName = "list_nodit_data_apis";
        try {
          const apiList = Object.entries(noditDataApiSpec.paths)
            .filter(([, pathItem]) => pathItem?.post?.operationId)
            .map(([pathKey, pathItem]) => {
              let supportedChains: string[] = [];
              if (pathItem?.post?.parameters) {
                const chainParam = pathItem.post.parameters.find((param: any) => param.name === 'chain');
                if (chainParam?.schema?.enum) {
                  supportedChains = chainParam.schema.enum;
                }
              }
    
              return {
                operationId: pathItem!.post!.operationId!,
                description: normalizeDescription(pathItem!.post!.description),
                path: pathKey,
                supportedChains: supportedChains
              };
            });
    
          const formattedList = apiList
            .map(api => `  - operationId: ${api.operationId}, supported chains: [${api.supportedChains.join(',')}], description: ${api.description}`)
            .join("\n");
    
          const content = `Nodit Blockchain Context data api has endpoints with patterns like https://web3.nodit.io/v1/{chain}/{network}/getBlockByHashOrNumber. For example, Ethereum mainnet uses an endpoint like https://web3.nodit.io/v1/ethereum/mainnet/getBlockByHashOrNumber.
    The API list is as follows. You can use the get_nodit_api_spec tool to get more detailed API specifications.
    - baseUrl: ${noditDataApiSpec.servers[0].url}
    - Available Nodit API Operations:
    ${formattedList}
    `
          return { content: [{ type: "text", text: content }] };
        } catch (error) {
          return createErrorResponse(`Failed to list APIs: ${(error as Error).message}`, toolName);
        }
      });
  • The registerDataApiTools function registers the 'list_nodit_data_apis' tool on the MCP server using server.tool, including the handler inline.
    export function registerDataApiTools(server: McpServer) {
      const noditDataApiSpec: NoditOpenApiSpecType = loadNoditDataApiSpec();
      server.tool("list_nodit_data_apis", "Lists available Nodit Data API operations.", {}, async () => {
        const toolName = "list_nodit_data_apis";
        try {
          const apiList = Object.entries(noditDataApiSpec.paths)
            .filter(([, pathItem]) => pathItem?.post?.operationId)
            .map(([pathKey, pathItem]) => {
              let supportedChains: string[] = [];
              if (pathItem?.post?.parameters) {
                const chainParam = pathItem.post.parameters.find((param: any) => param.name === 'chain');
                if (chainParam?.schema?.enum) {
                  supportedChains = chainParam.schema.enum;
                }
              }
    
              return {
                operationId: pathItem!.post!.operationId!,
                description: normalizeDescription(pathItem!.post!.description),
                path: pathKey,
                supportedChains: supportedChains
              };
            });
    
          const formattedList = apiList
            .map(api => `  - operationId: ${api.operationId}, supported chains: [${api.supportedChains.join(',')}], description: ${api.description}`)
            .join("\n");
    
          const content = `Nodit Blockchain Context data api has endpoints with patterns like https://web3.nodit.io/v1/{chain}/{network}/getBlockByHashOrNumber. For example, Ethereum mainnet uses an endpoint like https://web3.nodit.io/v1/ethereum/mainnet/getBlockByHashOrNumber.
    The API list is as follows. You can use the get_nodit_api_spec tool to get more detailed API specifications.
    - baseUrl: ${noditDataApiSpec.servers[0].url}
    - Available Nodit API Operations:
    ${formattedList}
    `
          return { content: [{ type: "text", text: content }] };
        } catch (error) {
          return createErrorResponse(`Failed to list APIs: ${(error as Error).message}`, toolName);
        }
      });
    }
  • Top-level registration call in registerAllTools that invokes registerDataApiTools to register the tool.
    registerDataApiTools(server);
  • Helper function that loads the Nodit Data API OpenAPI specification YAML file, used by the tool handler to access the API paths and details.
    export function loadNoditDataApiSpec(): NoditOpenApiSpecType {
      const specPath = path.resolve(__dirname, '../spec/reference/web3-data-api.yaml');
      return loadOpenapiSpecFile(specPath) as NoditOpenApiSpecType;
    }
  • Helper function to clean and normalize operation descriptions by removing blockquote lines, used in the tool to format descriptions.
    export function normalizeDescription(description: string | undefined): string {
      if (!description) {
        return "No description available."
      }
    
      const lines = description.split('\n');
      const filteredLines = lines.filter(line => !line.trimStart().startsWith('>'));
    
      return filteredLines.join('\n').trim();
    }
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 only states the action ('Lists') without detailing aspects like whether this is a read-only operation, if it requires authentication, what the output format is, or any rate limits. This leaves significant gaps for a tool that interacts with APIs.

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 with no wasted words. It's front-loaded with the core action and resource, making it efficient and easy to parse, which is ideal for a simple 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's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. However, it lacks details on output (e.g., what 'lists' returns) and behavioral context, which could be helpful for an agent. It meets the baseline but doesn't excel in providing a full picture.

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 doesn't add parameter details, which is appropriate here, but it also doesn't provide extra context about inputs, so it slightly falls short of a perfect score for not explicitly noting the lack of parameters.

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 ('Lists') and resource ('available Nodit Data API operations'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_nodit_api_categories' or 'list_nodit_node_apis', which likely list different types of APIs, so it doesn't reach the highest clarity level.

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. With multiple sibling tools that also list APIs (e.g., 'list_nodit_api_categories', 'list_nodit_node_apis'), there's no indication of context, prerequisites, or exclusions, leaving the agent to guess based on names 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/noditlabs/nodit-mcp-server'

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