Skip to main content
Glama
duynghien

n8n-custom-mcp

by duynghien

validate_workflow_expressions

Detect syntax errors and invalid variable references in n8n workflow expressions, and get warnings when complex logic should use a Code node.

Instructions

Validate n8n expressions {{ }} in workflow. Checks: syntax errors in expressions, valid variable references ($json, $node, $vars), and warns about complex logic that should use Code node.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowYesWorkflow object to validate

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does reveal that the tool checks syntax, validates variable references, and warns about complex logic, indicating a non-mutating analysis. However, it does not state whether the tool modifies the workflow, what a response looks like, or whether any permissions are required.

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 two sentences with no filler: the first states purpose and target, the second lists checks in a scannable format. The most important information is front-loaded.

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?

The description explains what the tool validates and hints at output through 'warns', but there is no output schema and no explicit description of the return value. It also omits any reference to sibling validation tools, leaving tool-selection partially to inference. For a single-parameter validation tool this is a noticeable but not severe gap.

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% coverage with a description for the only parameter ('Workflow object to validate'), and the tool description adds no parameter-level detail beyond the schema. The baseline of 3 applies because the schema already documents the parameter adequately.

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 uses a specific verb ('Validate') and a precise target ('n8n expressions {{ }} in workflow'), then lists three concrete checks: syntax errors, variable references, and complex-logic warnings. This clearly distinguishes it from sibling validators like validate_workflow_structure and validate_workflow_credentials even without naming them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool should be used when workflow expressions need validation, but it never explicitly states when to use it over validate_workflow_structure or validate_workflow_credentials, nor does it mention any exclusions. The usage context is inferable from the checks listed, but no direct guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.