Skip to main content
Glama

list_nodit_webhook_apis

Discover available webhook API operations for accessing normalized, multi-chain blockchain data through the Nodit MCP Server.

Instructions

Lists available Nodit Webhook API operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler logic: loads the OpenAPI spec, extracts all HTTP methods' operations across paths, determines supported chains, formats a markdown-like list of operationIds with descriptions and chains, returns structured text response. Precomputes the list at registration time.
        const noditWebhookApiSpec: NoditOpenApiSpecType = loadNoditWebhookApiSpec()
    
        const apis = Object.values(noditWebhookApiSpec.paths).flatMap((pathItem) => {
            return [pathItem.get, pathItem.post, pathItem.put, pathItem.patch, pathItem.delete].filter((item) => item !== undefined).map((item) => {
                if (item && item.operationId) {
                    const operationId = item.operationId;
                    const description = item.description;
                    const chains = item.parameters?.find((param) => param.name === "chain")?.schema?.enum ?? ["aptos"];
    
                    return {
                        operationId,
                        description,
                        chains
                    }
                }
            })
        }).filter((api) => api !== undefined);
        
        server.tool(toolName, "Lists available Nodit Webhook API operations.", {}, () => {
            try {
                const formattedList = apis
                    .map(api => `  - operationId: ${api.operationId}, supported chains: [${api.chains.join(',')}], description: ${api.description}`)
                    .join("\n");
    
                const content = `Nodit Blockchain Context Webhook api has endpoints with patterns like https://web3.nodit.io/v1/{chain}/{network}/webhooks. For example, Ethereum mainnet uses an endpoint like https://web3.nodit.io/v1/ethereum/mainnet/webhooks.
    The API list is as follows. You can use the get_nodit_api_spec tool to get more detailed API specifications. However, the API cannot be invoked using the call_nodit_api tool.
    - baseUrl: ${noditWebhookApiSpec.servers[0].url}
    - Available Nodit API Operations:
    ${formattedList}
    `
                return {content: [{type: "text", text: content}]};
            } catch(error) {
                return createErrorResponse(`Failed to list webhook APIs: ${(error as Error).message}`, toolName)
            }
        });
  • Registers the 'list_nodit_webhook_apis' tool on the MCP server with description, empty input schema, and inline handler function.
    export function registerWebhookApiTools(server: McpServer) {
        const toolName = "list_nodit_webhook_apis";
        const noditWebhookApiSpec: NoditOpenApiSpecType = loadNoditWebhookApiSpec()
    
        const apis = Object.values(noditWebhookApiSpec.paths).flatMap((pathItem) => {
            return [pathItem.get, pathItem.post, pathItem.put, pathItem.patch, pathItem.delete].filter((item) => item !== undefined).map((item) => {
                if (item && item.operationId) {
                    const operationId = item.operationId;
                    const description = item.description;
                    const chains = item.parameters?.find((param) => param.name === "chain")?.schema?.enum ?? ["aptos"];
    
                    return {
                        operationId,
                        description,
                        chains
                    }
                }
            })
        }).filter((api) => api !== undefined);
        
        server.tool(toolName, "Lists available Nodit Webhook API operations.", {}, () => {
            try {
                const formattedList = apis
                    .map(api => `  - operationId: ${api.operationId}, supported chains: [${api.chains.join(',')}], description: ${api.description}`)
                    .join("\n");
    
                const content = `Nodit Blockchain Context Webhook api has endpoints with patterns like https://web3.nodit.io/v1/{chain}/{network}/webhooks. For example, Ethereum mainnet uses an endpoint like https://web3.nodit.io/v1/ethereum/mainnet/webhooks.
    The API list is as follows. You can use the get_nodit_api_spec tool to get more detailed API specifications. However, the API cannot be invoked using the call_nodit_api tool.
    - baseUrl: ${noditWebhookApiSpec.servers[0].url}
    - Available Nodit API Operations:
    ${formattedList}
    `
                return {content: [{type: "text", text: content}]};
            } catch(error) {
                return createErrorResponse(`Failed to list webhook APIs: ${(error as Error).message}`, toolName)
            }
        });
    }
  • Central registration function that calls registerWebhookApiTools among others.
    export function registerAllTools(server: McpServer) {
      registerApiCategoriesTools(server);
      registerNodeApiTools(server);
      registerDataApiTools(server);
      registerWebhookApiTools(server);
      registerAptosIndexerTools(server);
      registerGetNoditApiSpecTool(server);
      registerCallNoditApiTool(server);
    }
  • Helper to load the Nodit webhook OpenAPI YAML spec file into typed object used by the tool.
    export function loadNoditWebhookApiSpec(): NoditOpenApiSpecType {
      const specPath = path.resolve(__dirname, '../spec/reference/webhook.yaml');
      return loadOpenapiSpecFile(specPath) as NoditOpenApiSpecType;
    }
  • TypeScript interface defining the structure of the Nodit OpenAPI spec used for parsing paths and operations.
    export interface NoditOpenApiSpecType {
      openapi: string;
      info: { title: string; version: string };
      servers: [{ url: string; variables?: Record<string, { default: string }> }];
      paths: Record<string, OpenApiPathItem>;
      components: any;
      security: any[];
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without behavioral details. It doesn't disclose if this is a read-only operation, potential side effects, rate limits, authentication needs, or what the output format might be (e.g., list structure, pagination). This leaves significant gaps for a tool that likely returns data.

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 directly states the tool's purpose without any fluff or redundancy. It's appropriately sized for a simple listing tool and front-loaded with the key action, making it easy 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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'available' means (e.g., all operations, filtered ones), the return format, or any behavioral context. For a tool that likely returns a list of API operations, more details on output structure or usage constraints would be beneficial.

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, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately avoids mentioning any. A baseline of 4 is applied as it correctly handles the absence of parameters without unnecessary elaboration.

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 Webhook API operations'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_nodit_data_apis' or 'list_nodit_node_apis' beyond specifying 'Webhook' type, which is somewhat implied but not strongly contrasted.

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. It doesn't mention prerequisites, context, or compare to siblings like 'get_nodit_api_spec' or 'call_nodit_api', leaving the agent to infer usage based on tool 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