Skip to content

PB 1591 introduce ToolMetdata type#72

Merged
nathan962 merged 10 commits intomainfrom
PB-1591-nathan-commit-tool-metadata-types-to-types-library
Dec 22, 2025
Merged

PB 1591 introduce ToolMetdata type#72
nathan962 merged 10 commits intomainfrom
PB-1591-nathan-commit-tool-metadata-types-to-types-library

Conversation

@nathan962
Copy link
Contributor

@nathan962 nathan962 commented Dec 22, 2025

PR introduces ToolMetadata type, important for use within the SDK, tool node and in future the resource service.

Has helper functions for checking if metadata is empty or incomplete. Useful for before saving a workflow to check the ToolMetadata is complete and valid before saving.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new ToolMetadata type to the uncertainty_engine_types package. The type provides a structured way to store and validate metadata about tools, specifically their inputs and outputs at the node/handle level.

  • Adds a new ToolMetadata Pydantic model with nested dictionaries mapping NodeId -> HandleLabel -> NodeInputInfo/NodeOutputInfo
  • Implements validation methods (is_empty(), has_partial_data(), validate_complete()) to ensure metadata completeness
  • Includes comprehensive test coverage with 9 test cases covering all validation scenarios

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
uncertainty_engine_types/tool_metadata.py New file introducing the ToolMetadata class with inputs/outputs fields and validation methods
uncertainty_engine_types/init.py Added import and export of ToolMetadata type
tests/test_tool_metadata.py Comprehensive test suite covering empty, partial, and complete metadata validation scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nathan962 nathan962 marked this pull request as ready for review December 22, 2025 13:54
@nathan962
Copy link
Contributor Author

Thanks @cariad, agree with those suggestions. I'll go make some changes 🔧

@nathan962 nathan962 requested a review from cariad December 22, 2025 14:42
Copy link
Contributor

@cariad cariad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice use of those new test fixtures! Thanks!

@nathan962 nathan962 merged commit 46277a4 into main Dec 22, 2025
5 checks passed
@nathan962 nathan962 deleted the PB-1591-nathan-commit-tool-metadata-types-to-types-library branch December 22, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants