{"record":{"id":"b33a31f3a8953a07","repo":"remotion-dev/remotion","slug":"compositionname-must-be-a-string","errorCode":null,"errorMessage":"compositionName must be a string.","messagePattern":"compositionName must be a string\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":899,"sourceCode":"\t\t\t\t\tname: 'select_composition',\n\t\t\t\t\ttitle: 'Select Studio composition',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Open a registered composition in Remotion Studio by name.',\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\tcompositionName: {\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tdescription: 'The name of the composition to open.',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\trequired: ['compositionName'],\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: ({compositionName}) => {\n\t\t\t\t\t\tif (typeof compositionName !== 'string') {\n\t\t\t\t\t\t\tthrow new Error('compositionName must be a string.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst composition = compositionsRef.current.find(\n\t\t\t\t\t\t\t(candidate) => candidate.id === compositionName,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (!composition) {\n\t\t\t\t\t\t\tthrow new Error(`Composition ${compositionName} not found.`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tselectComposition(composition, true);\n\t\t\t\t\t\treturn Promise.resolve({\n\t\t\t\t\t\t\tcurrentContent: {\n\t\t\t\t\t\t\t\ttype: 'composition',\n\t\t\t\t\t\t\t\tcompositionId: composition.id,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t},","sourceCodeStart":881,"sourceCodeEnd":917,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L881-L917","documentation":"The Studio Web MCP selectComposition tool could not find a composition whose id equals the provided compositionName in the currently loaded compositions.","triggerScenarios":"Calling the MCP tool with an id that does not exist (typo, stale id after a composition was renamed/removed, or compositions not yet loaded).","commonSituations":"Renaming or deleting a composition while an MCP session holds the old id, or asking the model to select a composition before Studio finished registering compositions.","solutions":["List available compositions first via the MCP listing tool and use an exact id","Ensure the target composition exists in src/Root.tsx and Studio has reloaded","Retry after compositions finish loading in Studio"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const ids = compositionsRef.current.map((c) => c.id);\nif (!ids.includes(compositionName)) { /* list valid ids to the caller */ }","typeGuard":null,"tryCatchPattern":"try { await tool.execute({compositionName}); } catch (e) { if (e.message.includes('not found')) { /* re-list compositions and retry */ } }","preventionTips":["Always list compositions before selecting by id","Refresh ids after renaming or removing compositions"],"tags":["studio","mcp","composition","not-found"],"backgroundTag":"resource-not-found","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"}