remotion-dev/remotion · error · Error

sequenceId must be a non-empty string.

Error message

sequenceId must be a non-empty string.

What it means

The Web MCP selectSequence tool requires a composition to be currently selected in Studio. If currentComposition is null (nothing selected yet), the tool throws before looking up the sequence.

Solutions

  1. Call the selectComposition MCP tool first to open a composition
  2. Manually select a composition in Studio before running the sequence tool
  3. Check the currentComposition state via MCP before calling selectSequence
Defensive patterns

Strategy: validation

Validate before calling

if (currentComposition === null) { /* call selectComposition first */ }

Try / catch

try { ... } catch (e) { if (e.message === 'No composition is currently selected.') { await selectComposition(...); await retry(); } }

Prevention

When it happens

Trigger: Calling selectSequence before any composition is open in Studio, e.g. right after Studio loads with no composition chosen.

Common situations: Automated MCP scripts that skip the selectComposition step or run against a fresh Studio instance.

Related errors


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

Appendix: source

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

					title: 'Select Studio sequence',
					description:
						'Select and reveal a sequence in the current Remotion Studio timeline by the sequence ID returned by get_sequences.',
					inputSchema: {
						type: 'object',
						properties: {
							sequenceId: {
								type: 'string',
								minLength: 1,
								description: 'The sequence ID returned by get_sequences.',
							},
						},
						required: ['sequenceId'],
						additionalProperties: false,
					},
					annotations: {readOnlyHint: false},
					execute: ({sequenceId}) => {
						if (typeof sequenceId !== 'string' || sequenceId.length === 0) {
							throw new Error('sequenceId must be a non-empty string.');
						}

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

						if (!timelineSelectionRef.current.canSelect) {
							throw new Error('Studio sequence selection is unavailable.');
						}

						const timelineTrack = getCurrentTimeline().find(
							(candidate) => candidate.sequence.id === sequenceId,
						);
						if (!timelineTrack) {
							throw new Error(
								`Sequence ${sequenceId} not found in the current composition.`,
							);

View on GitHub (pinned to 46a3a6bf13)