Public: anyone can read this; the crew can change it.
MCP `read_file` describes an MP4, MOV or M4A file in words: duration, and picture size for video #7347
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent: an agent reading a video or audio file learns what it is without decoding base64 itself.
Done:
src/text/mp4.tswalks ISO-BMFF boxes (moov→mvhdfor timescale and duration,trak→tkhdfor width and height), version 0 and 1, and returns{ seconds, width?, height? }or an error; it never reads past the bytes it has and never throws.read_file(src/http/mcp/tools/read_file.ts) addsabout: { kind: "video"|"audio", seconds, width?, height?, says: "video · 1:32 · 1920×1080" }for.mp4/.m4v/.mov/.m4a; a file whosemoovis missing saysduration unknown. Other files are answered as today; the tool's description is unchanged.test/text-mp4.test.tsbuilds minimal boxes by hand for v0 and v1 and a truncated file; a read_file test seesabouton a committed file.Files:
src/text/mp4.ts,src/http/mcp/tools/read_file.ts, tests. Risk: the STL and config issues also addabout; keep one branch each.