{"record":{"id":"d588af6ebb68813f","repo":"remotion-dev/remotion","slug":"asset-resolvedassetpath-was-not-found-in-public","errorCode":null,"errorMessage":"Asset ${resolvedAssetPath} was not found in public/.","messagePattern":"Asset (.+?) was not found in public/\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":182,"sourceCode":"\t\treadonly asset?: string;\n\t\treadonly type: string;\n\t} | null;\n\treadonly staticFiles: readonly {readonly name: string}[];\n}) => {\n\tconst resolvedAssetPath =\n\t\tassetPath === undefined\n\t\t\t? currentContent?.type === 'asset'\n\t\t\t\t? (currentContent.asset ?? null)\n\t\t\t\t: null\n\t\t\t: assetPath;\n\tif (typeof resolvedAssetPath !== 'string' || resolvedAssetPath.length === 0) {\n\t\tthrow new Error(\n\t\t\t'assetPath must be a non-empty public-folder path, or an asset must be selected in Studio.',\n\t\t);\n\t}\n\n\tif (!staticFiles.some((file) => file.name === resolvedAssetPath)) {\n\t\tthrow new Error(`Asset ${resolvedAssetPath} was not found in public/.`);\n\t}\n\n\treturn resolvedAssetPath;\n};\n\nexport const WebMcp: FC = () => {\n\tconst {addCaptionJob, addVideoMattingJob} = useContext(RenderQueueContext);\n\tconst staticFiles = useStaticFiles();\n\tconst {canSelect, clearSelection, selectedItems, selectItems} =\n\t\tuseTimelineSelection();\n\tconst {canvasContent, compositions, currentCompositionMetadata, folders} =\n\t\tuseContext(Internals.CompositionManager);\n\tconst {playbackRate: currentPlaybackRate, setPlaybackRate} =\n\t\tInternals.usePlaybackRate();\n\tconst {isPlaying} = Internals.Timeline.useTimelineContext();\n\tconst {mediaVolume, playerMuted} = useContext(Internals.MediaVolumeContext);\n\tconst {setPlayerMuted} = useContext(Internals.SetMediaVolumeContext);\n\tconst {setZoom: setTimelineZoom, zoom: timelineZoomMap} =","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L164-L200","documentation":"After resolving the asset path, the tool verifies the path exists among Studio's known static files (public/ folder). If no static file matches the name, it throws so the caller does not reference a nonexistent asset.","triggerScenarios":"Calling the WebMcp asset tool with assetPath that does not match any file name in the Studio static file list — wrong path, typo, missing extension, or file not present in public/.","commonSituations":"Agents hallucinating file names; assets added to public/ after Studio indexed static files (needs refresh); referencing files outside public/; missing folder prefix like 'audio/'.","solutions":["Correct assetPath to an exact public/ file path as listed in Studio's static files.","Add the asset to the public/ folder (or upload it) before referencing it.","Refresh/reopen Studio so staticFiles includes newly added assets.","Check for typos, missing extensions, and correct subfolder prefixes."],"exampleFix":"// before\nawait tool.execute({assetPath: 'voice.mp3'}); // actually at audio/voice.mp3\n// after\nawait tool.execute({assetPath: 'audio/voice.mp3'});","handlingStrategy":"validation","validationCode":"if (!staticFiles.some((f) => f.name === assetPath)) {\n  throw new Error(`Asset ${assetPath} is not in public/.`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await transcribeTool({assetPath});\n} catch (e) {\n  if (e.message.includes('was not found in public/')) {\n    listStaticFilesAndRetry();\n  }\n}","preventionTips":["Copy assets into public/ before referencing them.","List static files first and pick names from that list.","Refresh Studio after adding files so staticFiles is current.","Use exact names including folders and extensions."],"tags":["mcp","file-not-found","studio"],"backgroundTag":"file-not-found","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}