Composite Tools Support Structured Content#3009
Merged
Conversation
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
This reverts commit 9855d28.
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3009 +/- ##
==========================================
- Coverage 56.43% 56.40% -0.03%
==========================================
Files 333 333
Lines 33001 33019 +18
==========================================
+ Hits 18623 18626 +3
- Misses 12796 12811 +15
Partials 1582 1582 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Base automatically changed from
jerm/composite-tools-default-results
to
main
December 12, 2025 16:26
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
Contributor
Author
|
Tests seems stubbornly flaky on this branch. I'm going to debug on this stacked branch: I'll wait to merge this branch until I'm convinced it's not increasing the flakiness. |
JAORMX
approved these changes
Dec 15, 2025
tgrunnagle
approved these changes
Dec 15, 2025
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.
Stacked on #3006 because of when I discovered this gap.
Summary
StructuredContentbefore falling back toContentarray processing (legacy behavior)structuredContentwould be verbose/clunky. It also does not match much of the existing documentation.Fixes #2994
Changes
Core Fix (
pkg/vmcp/client/client.go):result.StructuredContentbefore processingresult.ContentarrayStructuredContentis an object (map[string]any), use it directly as step outputContentprocessing for text/image contentTest Helpers (
test/integration/vmcp/helpers/backend.go):StructuredHandlerfield toBackendToolfor structured content responsesNewBackendToolWithStructuredResponse()constructorCreateBackendServerto usemcp.NewToolResultStructuredOnly()when appropriateIntegration Tests (
test/integration/vmcp/vmcp_integration_test.go):TestVMCPServer_StructuredContent: Tests nested field access via{{.steps.X.output.field.nested}}TestVMCPServer_DefaultResults_NestedStructure: Tests nested defaultResults fallbackDocumentation:
docs/operator/virtualmcpcompositetooldefinition-guide.md: Added "Step Output Format" and "Numeric Values in Templates" sectionsdocs/operator/advanced-workflow-patterns.md: Added "Step Output Format" and "Numeric Comparisons" sections