Use composite file physical properties endpoint - #257
Open
JordanNoone wants to merge 6 commits into
Open
Conversation
JordanNoone
marked this pull request as ready for review
August 30, 2026 03:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create_file_physical_propertiesrequestrender=truesupport that returns isometric, front, right, and top PNGs from the same analysis operationqueued,uploaded, andin_progressresults poll the same operation ID without resubmitting workproperty_statuses, privacy-safeproperty_errors, render status/artifacts, delivered views, and per-view delivery errorstrimeshbounding-box passDeployment dependency
This PR is intentionally draft. It depends on KittyCAD/api#4491 merging and deploying, followed by a generated
kittycadPython SDK release containingcreate_file_physical_properties,get_file_physical_properties_render, the render models, and theFilePhysicalPropertiesasync result variant.The currently released SDK is 1.5.0 and does not contain those methods. This branch therefore uses guarded generated-method boundaries and does not fall back to raw HTTP or the legacy five-call sequence. Before marking ready, bump the minimum SDK version and lockfile to the release containing API #4491, replace the temporary structural result boundary with generated result types, and run the live composite render test.
Do not merge or release this MCP change before the API endpoint and compatible SDK are available.
Behavior
render=falseremains the default and performs no image downloadsrender=truereturns structured measurements plus labeled inline PNG content in one MCP responseunit_length, matching center of massValidation
ZOO_API_TOKEN=dummy uv run pytest tests/test_server.py -k "calculate_cad_physical_properties or polls_async_operation or surfaces_async_worker_failure or rejects_wrong_async_result_variant or bounds_async_polling" -q- 11 passedZOO_API_TOKEN=dummy uv run pytest -m "not live" --ignore=tests/test_server.py -q- 153 passed, 1 skipped, 6 deselecteduv run ruff check- passeduv run ruff format --check- passedrender=falseinput and preserved structured output schematy checkhas the same 73 unresolvedkclextension attributes on unchangedmain; no new diagnostics point to this changeCloses #254.
Related: KittyCAD/api#4491, KittyCAD/api#4507, #253.