Skip to content

feat(schema): implement structured result wrapper for tool output schemas#304

Merged
Mossaka merged 5 commits into
mainfrom
mossaka/issue263
Sep 30, 2025
Merged

feat(schema): implement structured result wrapper for tool output schemas#304
Mossaka merged 5 commits into
mainfrom
mossaka/issue263

Conversation

@Mossaka

@Mossaka Mossaka commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

Signed-off-by: Jiaxiao Zhou duibao55328@gmail.com

…emas

Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
…ctured output

Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
@Mossaka Mossaka requested a review from Copilot September 30, 2025 03:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 implements a structured result wrapper system for tool output schemas in the Wassette MCP server. The changes establish a consistent {"result": ...} envelope pattern for all component function returns, ensuring predictable schema representation and runtime value alignment between the component2json layer and the wassette schema utilities.

Key Changes

  • Implements structured result wrapper in component2json for all non-empty function returns
  • Adds schema canonicalization utilities in wassette::schema module
  • Updates MCP server components to use the new canonicalization pipeline
  • Adds comprehensive documentation explaining the schema transformation pipeline

Reviewed Changes

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

Show a summary per file
File Description
crates/component2json/src/lib.rs Implements result wrapper in vals_to_json and component_func_to_schema functions
crates/wassette/src/schema.rs New module providing schema canonicalization and result normalization utilities
crates/wassette/src/lib.rs Integrates schema canonicalization in lifecycle manager
crates/mcp-server/src/components.rs Refactors component call handling to use new schema utilities
tests/structured_output_integration_test.rs Updates test to handle new result wrapper pattern
docs/design/component2json-structured-output.md Comprehensive documentation of the schema pipeline
docs/SUMMARY.md Adds new documentation to table of contents
crates/component2json/README.md Updates README with result wrapper information

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread tests/structured_output_integration_test.rs
@Mossaka Mossaka merged commit c5e3cca into main Sep 30, 2025
16 checks passed
@Mossaka Mossaka deleted the mossaka/issue263 branch September 30, 2025 04:37
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.

Support for Output Schema needs to also provide Structured Content

2 participants