feat(mcp): host-neutral assembly joint create/update - #68
Conversation
1cb29a7 to
eaf9f0f
Compare
jackControls
left a comment
There was a problem hiding this comment.
Thanks for expanding the assembly MCP surface. I rechecked the current head (eaf9f0f). One schema/round-trip compatibility issue remains:
The advertised joint tool schemas reject valid joint JSON produced by the server itself. source_surface_frame and the optional joint limit fields are declared as object-only in the create/update schemas, while the Rust DTOs serialize absent Option values as explicit null. A strict MCP client that validates tool input against tools/list therefore cannot pass an unmodified assembly_joint_query result back into create/update. The existing round-trip test calls CadServer::call_tool directly, so it bypasses advertised-schema validation and does not catch this.
Please allow both object and null for these nullable fields (including the advanced joint limit variants) and add a round-trip test that validates the queried payload against the advertised input schema before submitting it.
|
Addressed the schema/round-trip review on Fix: advertised
Test: mcp-server: rustfmt clean; clippy Not merging. |
jackControls#68 adds host-neutral assembly_create_joint / assembly_update_joint. Stack those ToolSpecs on jackControls#60's MUTATES map so cad_submit accepts them while attached. assembly_document / assembly_solution stay read-safe.
jackControls
left a comment
There was a problem hiding this comment.
Thanks for the update. The advertised schemas now accept null for every optional joint field emitted by the DTOs, including connector source frames and primary/advanced limits. The regression test validates a queried joint against the tools/list schema before updating it, and the focused test plus MCP CI pass. Approved.
Assembly joints were deferred on jackControls#62. Host already has stable CreateJointRequestDto / UpdateJointRequestDto; this slice adds matching MCP tools plus a headless two-body revolute create/update/query golden.
Serialized JointDefinitionDto emits null for source_surface_frame and limit objects. Advertised create/update schemas now allow object-or-null so a queried joint can pass protocol-level inputSchema validation.
3a071a6 to
b2d23e6
Compare
|
Rebased onto latest Conflicts were tool-count ( Local: |
|
Closing as superseded by #69 ( Main already has this PR’s surface: Leftover vs this head is only #69 follow-on (stronger replace-all update description + extra adversarial coverage). Rebasing onto current main would re-apply already-landed hunks on files #69 expanded — leftover, not unique work. |
Summary
host::handle), the slice deferred on feat(mcp): host-neutral assembly component tools #62.assembly_create_joint(CreateJointRequestDto) andassembly_update_joint(UpdateJointRequestDto). Query staysassembly_document/assembly_solution(already on main).assembly_joint_create_update_query_roundtrip: two extruded boxes → revolute joint →assembly_documentquery → rename/limits update → solution still non-empty. Nocad_attach.Why
#62 shipped component/occurrence/pose/grounded and left joints for a follow-up once schemas stayed small. Host already has stable
CreateJointRequestDto/UpdateJointRequestDtoandassembly_create_joint/assembly_update_jointengine methods.What is NOT done
Test plan
cargo test --manifest-path mcp-server/Cargo.toml --bin nbcad-mcp -- --test-threads=1assembly_joint_create_update_query_roundtripRefs
Follow-up to #62. Does not touch #60/#63.