{"record":{"id":"153b8c7a1b50dba5","repo":"remotion-dev/remotion","slug":"visible-must-be-a-boolean","errorCode":null,"errorMessage":"visible must be a boolean.","messagePattern":"visible must be a boolean\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":1359,"sourceCode":"\t\t\t\t\tname: 'set_guides_visible',\n\t\t\t\t\ttitle: 'Set Studio guides visibility',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Show or hide all guides for the current Remotion Studio composition.',\n\t\t\t\t\tinputSchema: {\n\t\t\t\t\t\ttype: 'object',\n\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\tvisible: {\n\t\t\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\t\t\tdescription: 'Whether guides should be visible.',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\trequired: ['visible'],\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: ({visible}) => {\n\t\t\t\t\t\tif (typeof visible !== 'boolean') {\n\t\t\t\t\t\t\tthrow new Error('visible must be a boolean.');\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\teditorShowGuidesRef.current = visible;\n\t\t\t\t\t\tsetEditorShowGuides(() => visible);\n\t\t\t\t\t\treturn Promise.resolve({\n\t\t\t\t\t\t\tcurrentContent: currentContentRef.current,\n\t\t\t\t\t\t\tguidesVisible: visible,\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{signal: controller.signal},\n\t\t\t),\n\t\t\tmodelContext.registerTool(","sourceCodeStart":1341,"sourceCodeEnd":1377,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L1341-L1377","documentation":"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.","triggerScenarios":"Calling the set-guides-visible MCP tool with visible as a string (\"true\"), number, or omitting/nulling it despite the schema.","commonSituations":"LLM-driven MCP clients coercing booleans to strings; hand-crafted JSON tool calls that use 1/0 instead of true/false.","solutions":["Pass a literal JSON boolean: true or false"],"exampleFix":"// before\n{\"visible\": \"true\"}\n// after\n{\"visible\": true}","handlingStrategy":"validation","validationCode":"if (typeof visible !== 'boolean') throw new TypeError('visible must be boolean');","typeGuard":"const isBool = (v: unknown): v is boolean => typeof v === 'boolean';","tryCatchPattern":null,"preventionTips":["Serialize tool arguments with JSON.parse to avoid string coercion","Validate args against the tool's JSON schema before invoking"],"tags":["mcp","validation","studio"],"backgroundTag":"invalid-argument-value","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-08-28T15:39:09.316Z","contentChangedAt":"2026-08-28T15:39:09.316Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}