{"record":{"id":"933160e3bc7486e5","repo":"remotion-dev/remotion","slug":"orientation-must-be-either-horizontal-or-vertic","errorCode":null,"errorMessage":"orientation must be either \"horizontal\" or \"vertical\".","messagePattern":"orientation must be either \"horizontal\" or \"vertical\"\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":1403,"sourceCode":"\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\torientation: {\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tenum: ['horizontal', 'vertical'],\n\t\t\t\t\t\t\t\tdescription: 'The orientation of the guide.',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tposition: {\n\t\t\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t'The guide position in composition pixels. Vertical guides use an x-coordinate and horizontal guides use a y-coordinate.',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\trequired: ['orientation', 'position'],\n\t\t\t\t\t\tadditionalProperties: false,\n\t\t\t\t\t},\n\t\t\t\t\tannotations: {readOnlyHint: false},\n\t\t\t\t\texecute: ({orientation, position}) => {\n\t\t\t\t\t\tif (orientation !== 'horizontal' && orientation !== 'vertical') {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'orientation must be either \"horizontal\" or \"vertical\".',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof position !== 'number' || !Number.isFinite(position)) {\n\t\t\t\t\t\t\tthrow new Error('position must be a finite number.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst compositionId = currentCompositionRef.current;\n\t\t\t\t\t\tif (compositionId === null) {\n\t\t\t\t\t\t\tthrow new Error('No composition is currently selected.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst guide: Guide = {\n\t\t\t\t\t\t\tid: crypto.randomUUID(),\n\t\t\t\t\t\t\torientation,\n\t\t\t\t\t\t\tposition,\n\t\t\t\t\t\t\tshow: true,","sourceCodeStart":1385,"sourceCodeEnd":1421,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L1385-L1421","documentation":"The add-guide MCP tool only accepts orientation of \"horizontal\" or \"vertical\". Any other string or type is rejected at runtime.","triggerScenarios":"Calling the add-guide tool with orientation like \"h\", \"Horizontal\", or a non-string value.","commonSituations":"MCP clients abbreviating or capitalizing the orientation value.","solutions":["Pass exactly \"horizontal\" or \"vertical\" (lowercase)"],"exampleFix":"// before\n{\"orientation\": \"h\", \"position\": 100}\n// after\n{\"orientation\": \"horizontal\", \"position\": 100}","handlingStrategy":"validation","validationCode":"const orientations = ['horizontal', 'vertical'] as const;\nif (!orientations.includes(orientation)) throw new Error('bad orientation');","typeGuard":"const isOrientation = (v: unknown): v is 'horizontal' | 'vertical' => v === 'horizontal' || v === 'vertical';","tryCatchPattern":null,"preventionTips":["Use literal union values exactly as documented","Build args from a typed const array"],"tags":["mcp","validation","guides"],"backgroundTag":"invalid-enum-value","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-08-28T15:39:09.316Z","contentChangedAt":"2026-08-28T15:39:09.316Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}