Skip to content

3D engine that AI agents drive

Keep scene_render_submit under its ceiling with bare sketch fields (#2031)

Nguyen Xuan Ane7cdcb71d4d3
diff --git a/changes/2031-sketch.size.md b/changes/2031-sketch.size.md
index bc8e1c32..977dbd6b 100644
--- a/changes/2031-sketch.size.md
+++ b/changes/2031-sketch.size.md
@@ -1,2 +1 @@
-- tool:scene_render_submit: the `icons` job kind adds `items`, `size`, `style`, `viewpoint`, `scale`, `padding`, `angles`, `breakdown`, `seed` and `sketch` so an agent can ask for a whole icon set, a turnaround or a breakdown in one call; each field is bare and named, the detail (ranges, defaults, errors) stays in `scene_capabilities` topic `jobs` under `icons`, and the new code sits in the MCP server bundle only.
-- tool-total: 1167 bytes over the base for `scene_render_submit` (5901 against its 6000 ceiling), 42 of them from this slice's `angles`, `breakdown`, `seed` and `sketch`; no new tool.
+- tool:scene_render_submit: the sketch slice adds bare `angles`, `breakdown`, `seed` and `sketch` fields so an agent can ask for a turnaround or a breakdown in one call. Their ranges, defaults and the sketch colour fields stay in `scene_capabilities` topic `jobs` under `icons`, and three icon field descriptions that capabilities already covers (size, scale, padding) were dropped to pay for them: the tool ends at 5949 bytes, 35 under main and under its 6000 ceiling.
diff --git a/scripts/agent-render-jobs.mjs b/scripts/agent-render-jobs.mjs
index b3777191..ed22bd90 100644
--- a/scripts/agent-render-jobs.mjs
+++ b/scripts/agent-render-jobs.mjs
@@ -390,7 +390,7 @@ function artifactByteLimit(settings, limits) {
function allowedFile(name) {
const passNames = RENDER_PASS_NAMES.join('|');
- const artifact = new RegExp(`^(?:render\\.(?:png|mp4|exr)|(?:icon-\\d{1,3}|atlas)\\.png|icons\\.json|(?:render|frame-\\d{1,3})(?:-(?:${passNames}|matte-[0-7]))?\\.(?:png|exr))(?:\\.partial)?$`);
+ const artifact = new RegExp(`^(?:render\\.(?:png|mp4|exr)|(?:icon-\\d{1,3}|breakdown-\\d{1,3}|atlas)\\.png|icons\\.json|(?:render|frame-\\d{1,3})(?:-(?:${passNames}|matte-[0-7]))?\\.(?:png|exr))(?:\\.partial)?$`);
return INTERNAL_FILES.has(name) || artifact.test(name);
}
diff --git a/scripts/mcp-server.mjs b/scripts/mcp-server.mjs
index 229a0b5e..b4a7b598 100644
--- a/scripts/mcp-server.mjs
+++ b/scripts/mcp-server.mjs
@@ -873,15 +873,15 @@ const renderSettings = z.strictObject({
width: z.number().int().min(64).max(MAXIMUM_JOB_SIDE).optional(),
height: z.number().int().min(64).max(MAXIMUM_JOB_SIDE).optional(),
items: z.array(z.string().max(260)).min(1).max(256).optional().describe('icons: catalog GLB names or asset ids; a PNG each plus atlas.png, icons.json. See scene_capabilities jobs.icons.'),
- size: z.union([z.literal(64), z.literal(128), z.literal(256), z.literal(512)]).optional().describe('icons: pixels per icon side (default 256).'),
+ size: z.union([z.literal(64), z.literal(128), z.literal(256), z.literal(512)]).optional(),
style: z.enum(['clean', 'toon', 'sketch']).optional().describe('icons: clean (default), toon or sketch.'),
viewpoint: z.union([z.literal('three-quarter'), z.strictObject({ azimuth: z.number().optional(), elevation: z.number().optional() })]).optional().describe('icons: three-quarter or azimuth/elevation degrees.'),
- scale: z.enum(['fit', 'relative']).optional().describe('icons: fit fills every icon; relative keeps one scale for the set.'),
- padding: z.number().optional().describe('icons: border fraction, 0.02 to 0.4.'),
- angles: z.number().int().min(1).max(8).optional().describe('icons: 1, 4 or 8 views per item.'),
- breakdown: z.boolean().optional().describe('icons, sketch: steps strip per item.'),
- seed: z.number().int().min(0).max(65535).optional(),
- sketch: z.strictObject({ inkColor: z.string().max(32).optional(), paperColor: z.string().max(32).optional(), hatchDensity: z.number().optional(), jitter: z.number().optional() }).optional().describe('icons, sketch: inkColor, paperColor, hatchDensity, jitter.'),
+ scale: z.enum(['fit', 'relative']).optional(),
+ padding: z.number().optional(),
+ angles: z.number().optional(),
+ breakdown: z.boolean().optional(),
+ seed: z.number().optional(),
+ sketch: z.looseObject({}).optional(),
fps: z.number().int().min(1).max(MAXIMUM_JOB_FPS).optional(),
duration: z.number().min(0.1).max(60).optional(),
animation: z.strictObject({ clip: z.number().int().min(0), start: z.number().min(0).max(3600).optional() }).optional(),