Add agent-friendly tool validation and execution contracts#37
Add agent-friendly tool validation and execution contracts#37dannon wants to merge 1 commit intogalaxyproject:mainfrom
Conversation
|
Thanks for this, @paulocilasjr — the contract/validation approach is solid and the test coverage is great. One thing worth thinking about for the next iteration: Galaxy now has formal JSON Schema endpoints for tool inputs. The Tool Shed already serves these live: For example, FastQC's schema: These return proper JSON Schema (draft 2020-12) generated from Pydantic models. They handle the hard stuff natively:
The same endpoints also exist on the Galaxy server API ( What this means for The validation layer ( I'm sketching out a plan to build on this work using the formal schemas. The rough shape:
No need to block this PR on any of that — your work here gives us the validation infrastructure and dataset preflight layer that we'd build on regardless of schema source. Merging this and iterating on top makes the most sense. |
|
Awesome. |
Summary
Adds a tool contract system for agent-friendly tool validation and execution:
tool_contract.py— builds structured contracts describing tool inputs/outputs with validation, and providesvalidate_payload_against_contractfor pre-flight parameter checkingbuild_agent_hints— generates agent-oriented guidance for tool usagetest_tool_validation.pyAuthored by @paulocilasjr.
Test plan
make lintpassesmake testpasses