Skip to content

fix(generate-3d): steer the mesh-edit route by template description and get_template_schema - #56

Open
mattmillerai wants to merge 1 commit into
mainfrom
be-26027-generate-3d-mesh-edit
Open

mattmillerai wants to merge 1 commit into
mainfrom
be-26027-generate-3d-mesh-edit

Conversation

@mattmillerai

Copy link
Copy Markdown
Member

ELI5

When someone asks the assistant to change a 3D model it already made, the instructions told it to filter search results on information the search never shows, and pointed it at a retexture option that does not exist. Now it can find the right templates from what the search does show, check them before running, and still build the edit by hand when no template fits.

Summary

Rewrites the mesh-edit sentence of step 11 in both copies of the generate-3d instructions (skills/comfy-generate-3d.md and claude-code/commands/generate-3d.md). The two lines are still byte-identical.

  • Old: search_templates({ q: "3d" }) and "pick one whose nodes include Load3D (the retexture, part-split and retopology ones)".
  • Why it was wrong: search_templates list rows have no nodes field, so the agent can't filter on them. For q: "3d" the mesh-input templates rank well past the default page of 8. And no bundled template retextures a mesh.
  • New: search tag: "3D", limit: 50, then shortlist by a description that says the template takes an uploaded model or mesh as input. Before running, confirm class_type: "Load3D" with get_template_schema and override its model_file via run_template input_overrides with the use_previous_output filename. No template names are hard-coded, which follows the authoring rule.

Judgment call (deviation from the suggested wording)

The suggested replacement ended with "If no such template performs the edit the user asked for (for example retexturing), say so plainly instead of forcing one." That tells the user the capability doesn't exist, so I checked whether it really doesn't. It does exist. The live node catalog has a partner texture-edit node in partner/3d that takes a 3D model file plus a prompt, and Load3D outputs a model_3d (FILE_3D) that can be wired into it. So the final clause now falls back to step 2 instead: search_nodes with category: "partner/3d" or "3d" plus a q for the edit (e.g. "texture"), pick a node that takes a 3D model file, and wire Load3D's model_3d into it. Only if no node performs the edit does it say so plainly.

A typed input_type: "FILE_3D" filter would not work here. The node declares the combined type FILE_3D_FBX,FILE_3D, and search_nodes matches the type string exactly. The category filter is a prefix match, so partner/3d does reach partner/3d/<provider>.

Testing

  • claude plugin validate ./claude-code: passed.
  • Both edited lines diffed against each other: identical.
  • sdk-skill-smoke covers only the comfy-sdk skill, not these files, so it was not run.
  • Checked against the MCP server's current main and its bundled data:
    • search_templates accepts tag and limit (max 100).
    • 47 templates carry the 3D tag, so limit: 50 covers the whole set.
    • Exactly 4 templates contain Load3D. Each description says "Upload a 3D model…" or "Input a dense mesh…", so the description-based shortlist finds them.
    • The Load3D override input is model_file.
    • 0 templates mention "retexture".
  • Doc-drift sweep: 6 references checked, 0 updated. AGENTS.md and README mention search_templates and description only in a general way, and none of it describes the old wording.

Residual

  • The mirrored copy of skills/comfy-generate-3d.md in the hosted MCP server's bundled skills data still has the old wording. Refreshing it is a separate follow-up and is deliberately not part of this PR.
  • Step 1 of the same file still suggests q: "3d" for the broader generator search. That is fine for generating a model and was left alone. Only the mesh-edit route needed the tag and larger page.
  • I did not run any template or node live; checks were read-only against the server source and catalog. In particular, I did not confirm the Load3D → texture-edit node workflow end to end, and that node's tooltip says it expects FBX input under 100k faces. A GLB from use_previous_output may need converting, or may be rejected.

Provenance

  • Authored by: agent-work loop
  • Verified: plugin validator passed; both copies identical; tool params, tag count, Load3D templates, model_file input and texture-edit node reachability checked against the MCP server's main source and bundled catalog (read-only)
  • Deviations: replaced the suggested "say so plainly" dead-end for retexturing with a hand-built-workflow fallback, because a node path for it exists (see Judgment call)

🤖 Generated with Claude Code

…nd get_template_schema

The mesh-edit step told the agent to pick a `search_templates({ q: "3d" })`
result "whose nodes include Load3D". List rows carry no node types, the
mesh-input templates rank past the default page of 8 for that query, and none
of them retextures. Search the 3D tag with a page large enough to cover the
set, shortlist by description (takes an uploaded model as input), confirm
Load3D via get_template_schema, and set its model_file override. When no
template performs the edit, fall back to a hand-built workflow wired from
Load3D's model_3d output before telling the user it cannot be done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmillerai mattmillerai added cursor-review Request the Cursor multi-model review matrix agent-coded Implemented by the agent-work loop labels Nov 11, 2026
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 41 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 84 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: d016b6f3-c63b-490a-8df0-259835b42464
Commits

Reviewing files that changed from the base of the PR and between 88116d7 and 7095a43.

Files selected for processing: 2

  • claude-code/commands/generate-3d.md
  • skills/comfy-generate-3d.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-coded Implemented by the agent-work loop cursor-review Request the Cursor multi-model review matrix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant