Skip to main content
Glama
nikolausm

n8n MCP Server

by nikolausm

get_workflow_webhooks

Retrieve webhook URLs for a specific n8n workflow. Provide the workflow ID to get its webhook endpoints.

Instructions

Get webhook URLs for a workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe ID of the workflow

Implementation Reference

  • Handler case for 'get_workflow_webhooks': validates args with WorkflowIdSchema and calls client.getWorkflowWebhooks(workflowId)
    case "get_workflow_webhooks": {
      const { workflowId } = WorkflowIdSchema.parse(args);
      return await client.getWorkflowWebhooks(workflowId);
    }
  • WorkflowIdSchema: Zod schema used to validate the workflowId argument for get_workflow_webhooks (and other workflow tools)
    const WorkflowIdSchema = z.object({
      workflowId: z.string(),
    });
  • src/tools.ts:329-342 (registration)
    Tool registration metadata: name 'get_workflow_webhooks', description 'Get webhook URLs for a workflow', inputSchema requiring workflowId string
    {
      name: "get_workflow_webhooks",
      description: "Get webhook URLs for a workflow",
      inputSchema: {
        type: "object",
        properties: {
          workflowId: {
            type: "string",
            description: "The ID of the workflow",
          },
        },
        required: ["workflowId"],
      },
    },
  • Client implementation getWorkflowWebhooks(): fetches the workflow, filters for n8n-nodes-base.webhook nodes, and returns an array of webhook objects with nodeId, nodeName, path, method, and webhookUrl
    async getWorkflowWebhooks(workflowId: string) {
      const workflow = await this.getWorkflow(workflowId);
      const webhookNodes = workflow.nodes.filter(
        (node: any) => node.type === "n8n-nodes-base.webhook"
      );
      
      return webhookNodes.map((node: any) => ({
        nodeId: node.id,
        nodeName: node.name,
        path: node.parameters?.path || node.webhookId,
        method: node.parameters?.httpMethod || "GET",
        webhookUrl: `${process.env.N8N_URL}/webhook/${node.parameters?.path || node.webhookId}`,
      }));
    }
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as whether the operation is read-only, error conditions (e.g., workflow not found), or any side effects. Since the description carries the full burden without annotations, it is insufficient.

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, front-loaded sentence with no unnecessary words. It directly communicates the tool's purpose efficiently.

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 (one parameter, no output schema), the description is minimally adequate but lacks context about the return format (e.g., array of URLs) or behavior (e.g., fails on invalid workflow ID). It is borderline complete for a trivial tool.

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?

Schema description coverage is 100%—the only parameter 'workflowId' has a clear description ('The ID of the workflow'). The tool description adds no extra meaning beyond the schema, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 the resource ('webhook URLs') for a specific workflow. It effectively distinguishes from sibling tools like 'get_workflow' (which retrieves workflow details) and 'list_workflows' (lists workflows).

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 on when to use this tool versus alternatives. For instance, it doesn't mention that this tool is specifically for retrieving webhook URLs, nor does it point to sibling tools for other workflow-related tasks.

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/nikolausm/n8n-mcp-server'

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