n8n-io/n8n · error · NodeOperationError

${error.message}. This is most likely because some of you

Error message

${error.message}.
			This is most likely because some of your tools are configured to require a specific schema. This is not supported by Conversational Agent. Remove the schema from the tool configuration or use Tools agent instead.

What it means

Thrown by throwIfToolSchema when a tool used with the Conversational Agent rejects its input because the tool was configured with a strict JSON input schema. The Conversational Agent (unlike the Tools Agent) does not validate or shape its LLM-generated arguments against a tool schema, so any tool that enforces one fails at invocation. The wrapper re-throws the original schema-mismatch text with guidance to remove the schema or switch agents.

Source

Thrown at packages/@n8n/nodes-langchain/utils/schemaParsing.ts:57

): JSONSchema7 {
	const parsedExample = jsonParse<SchemaObject>(exampleJsonString);

	const schema = generateJsonSchema(parsedExample) as JSONSchema7;

	if (allFieldsRequired) {
		return makeAllPropertiesRequired(schema);
	}

	return schema;
}

export function convertJsonSchemaToZod<T extends z.ZodTypeAny = z.ZodTypeAny>(schema: JSONSchema7) {
	return jsonSchemaToZod<T>(schema);
}

export function throwIfToolSchema(ctx: IExecuteFunctions, error: Error) {
	if (error?.message?.includes('tool input did not match expected schema')) {
		throw new NodeOperationError(
			ctx.getNode(),
			`${error.message}.
			This is most likely because some of your tools are configured to require a specific schema. This is not supported by Conversational Agent. Remove the schema from the tool configuration or use Tools agent instead.`,
		);
	}
}

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Open the failing tool node's configuration and remove or loosen its input schema (delete the `schema`/`inputSchema` property so the tool accepts a free-form object).
  2. Switch the parent agent node from 'Conversational Agent' to 'Tools Agent', which honors tool schemas.
  3. Replace the structured tool with an equivalent tool that parses its own arguments from a single string or generic object.

Example fix

// before - tool descriptor with a strict schema
const tool = new DynamicTool({
  name: 'calculate',
  description: 'calculate',
  func: (input) => calc(JSON.parse(input)),
  schema: z.object({ a: z.number(), b: z.number(), op: z.string() }), // triggers 920 under Conversational Agent
});

// after - drop the schema, parse arguments manually
const tool = new DynamicTool({
  name: 'calculate',
  description: 'Pass JSON like {"a":1,"b":2,"op":"+"}',
  func: (input) => calc(JSON.parse(input)),
});
Defensive patterns

Strategy: type-guard

Validate before calling

function isSchemalessTool(tool: { schema?: unknown }): boolean {
  return tool.schema === undefined || tool.schema === null;
}

const toolsForConversationalAgent = allTools.filter(isSchemalessTool);
if (toolsForConversationalAgent.length !== allTools.length) {
  throw new Error('Some tools carry a schema; use the Tools Agent instead.');
}

Type guard

import type { StructuredTool } from '@langchain/core/tools';

function isSchemaless(tool: StructuredTool | { schema?: unknown }): boolean {
  // DynamicTool has no schema; StructuredTool has a non-undefined `schema`
  return (tool as { schema?: unknown }).schema === undefined;
}

Prevention

When it happens

Trigger: An LLM call in a Conversational Agent node invokes a tool whose descriptor carries an `inputSchema` (e.g. a Function tool with `schema: z.object({...})` or a custom tool with `description` + structured input). The tool's runtime rejects the agent's free-form arguments with a message containing the substring 'tool input did not match expected schema', which throwIfToolSchema matches and re-wraps.

Common situations: Importing a tool built for the Tools Agent into a Conversational Agent workflow; upgrading n8n where a tool newly added a required schema; community tools that always declare structured input; mixing a structured-output tool (e.g. a calculator with typed operands) with the Conversational Agent.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/eb5d0cb0460e335a. Report an issue: GitHub.