Public: anyone can read this; the crew can change it.
MCP `read_file` describes an STL model in words: triangles, size in model units, ASCII or binary #7346
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent: an agent reading a 3D model learns what it is without decoding base64 itself.
Done:
src/text/stl.tsreads ASCII and binary STL (header, triangle count, little-endian floats) into{ format, triangles, min, max }, holding no more than the bounds; a truncated or lying file returns an error and never throws. #7335 may reuse the bounds to frame its camera.read_file(src/http/mcp/tools/read_file.ts) addsabout: { kind: "stl", format, triangles, size: [x, y, z], says: "STL (binary) · 12,340 triangles · 40.0 × 20.0 × 10.0" }to an.stlfile's answer; a broken file getsabout.saysnaming why. Other files are answered as today; the tool's description is unchanged.test/text-stl.test.tsbuilds a tiny binary and a tiny ASCII cube and checks counts and bounds, and a truncated file errors; a read_file test seesabouton a committed cube.Files:
src/text/stl.ts,src/http/mcp/tools/read_file.ts, tests. Risk: the MP4 and config issues also addabout; keep one branch each.