remotion-dev/remotion · error · Error

visible must be a boolean.

Error message

visible must be a boolean.

What it means

The MCP tool that toggles guide visibility requires a boolean `visible` argument. The tool schema declares it, but the runtime check rejects any non-boolean value passed by an MCP client.

Source

Thrown at packages/studio/src/components/WebMcp.tsx:1359

					name: 'set_guides_visible',
					title: 'Set Studio guides visibility',
					description:
						'Show or hide all guides for the current Remotion Studio composition.',
					inputSchema: {
						type: 'object',
						properties: {
							visible: {
								type: 'boolean',
								description: 'Whether guides should be visible.',
							},
						},
						required: ['visible'],
						additionalProperties: false,
					},
					annotations: {readOnlyHint: false},
					execute: ({visible}) => {
						if (typeof visible !== 'boolean') {
							throw new Error('visible must be a boolean.');
						}

						const compositionId = currentCompositionRef.current;
						if (compositionId === null) {
							throw new Error('No composition is currently selected.');
						}

						editorShowGuidesRef.current = visible;
						setEditorShowGuides(() => visible);
						return Promise.resolve({
							currentContent: currentContentRef.current,
							guidesVisible: visible,
						});
					},
				},
				{signal: controller.signal},
			),
			modelContext.registerTool(

View on GitHub (pinned to b2f4e34732)

Solutions

  1. Pass a literal JSON boolean: true or false

Example fix

// before
{"visible": "true"}
// after
{"visible": true}
Defensive patterns

Strategy: validation

Validate before calling

if (typeof visible !== 'boolean') throw new TypeError('visible must be boolean');

Type guard

const isBool = (v: unknown): v is boolean => typeof v === 'boolean';

Prevention

When it happens

Trigger: Calling the set-guides-visible MCP tool with visible as a string ("true"), number, or omitting/nulling it despite the schema.

Common situations: LLM-driven MCP clients coercing booleans to strings; hand-crafted JSON tool calls that use 1/0 instead of true/false.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-08-28). Data as JSON: /api/errors/153b8c7a1b50dba5. Report an issue: GitHub.