Skip to main content
Glama

n8n_get_workflow

Retrieve detailed information about a specific workflow including all nodes and connections by providing the workflow ID.

Instructions

Get detailed information about a specific workflow including all nodes and connections.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe workflow ID

Implementation Reference

  • The main execution handler for the 'n8n_get_workflow' tool. It validates the workflow ID, fetches the full workflow data using N8nApiClient.getWorkflow(), and returns a formatted JSON response containing workflow details, nodes, connections, settings, and tags.
    n8n_get_workflow: async (
      client: N8nApiClient,
      args: Record<string, unknown>
    ): Promise<ToolResult> => {
      const id = args.id as string;
      if (!id) {
        throw new Error('Workflow ID is required');
      }
    
      const workflow = await client.getWorkflow(id);
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify({
              id: workflow.id,
              name: workflow.name,
              active: workflow.active,
              createdAt: workflow.createdAt,
              updatedAt: workflow.updatedAt,
              nodes: workflow.nodes,
              connections: workflow.connections,
              settings: workflow.settings,
              tags: workflow.tags,
            }, null, 2),
          },
        ],
      };
    },
  • Tool schema definition specifying the name, description, and input schema (requiring 'id' string parameter) for input validation.
    {
      name: 'n8n_get_workflow',
      description: 'Get detailed information about a specific workflow including all nodes and connections.',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'The workflow ID',
          },
        },
        required: ['id'],
      },
    },
  • Central registration of all tools by spreading workflowTools into the allTools array, which provides the complete tool list to the MCP server.
    export const allTools: ToolDefinition[] = [
      ...documentationTools,  // Documentation first for discoverability
      ...workflowTools,
      ...executionTools,
    ];
  • src/server.ts:60-63 (registration)
    MCP server handler for listing tools, returning the aggregated allTools list which includes the n8n_get_workflow schema.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: allTools,
      };
  • src/server.ts:122-125 (registration)
    Dynamic dispatch to workflowToolHandlers based on tool name, routing 'n8n_get_workflow' calls to its specific handler function.
    if (name in workflowToolHandlers) {
      const handler = workflowToolHandlers[name as keyof typeof workflowToolHandlers];
      return handler(client, args);
    }
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 states the tool retrieves 'detailed information' but doesn't specify what that includes beyond 'nodes and connections' (e.g., metadata, status, permissions), whether it's a read-only operation, potential errors, or response format. For a tool with zero annotation coverage, this is a significant gap in transparency.

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, well-structured sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the main action and resource, making it easy to parse. Every part of the sentence earns its place by specifying what information is retrieved.

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 moderate complexity (retrieving detailed workflow data), lack of annotations, and no output schema, the description is minimally adequate but incomplete. It covers the basic purpose but misses behavioral details like read-only nature, error handling, and output structure. Without annotations or output schema, more context would be helpful for the agent to use it effectively.

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 input schema has 100% description coverage, with the 'id' parameter documented as 'The workflow ID'. The description adds no additional meaning beyond this, such as format examples or sourcing details. According to the rules, with high schema coverage (>80%), the baseline is 3 even without param info in the description.

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 'Get' and resource 'detailed information about a specific workflow including all nodes and connections', which is specific and actionable. It distinguishes from siblings like 'n8n_list_workflows' by focusing on a single workflow's details rather than listing multiple. However, it doesn't explicitly contrast with 'n8n_get_execution' or 'n8n_get_node_info', which slightly reduces clarity.

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. It doesn't mention prerequisites (e.g., needing a workflow ID), exclusions, or comparisons to siblings like 'n8n_list_workflows' for overviews or 'n8n_get_execution' for execution data. This leaves the agent to infer usage from the name 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/alicankiraz1/cursor-n8n-builder'

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