-
Notifications
You must be signed in to change notification settings - Fork 160
Composite Tools Support Structured Content #3009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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>
Signed-off-by: Jeremy Drouillard <jeremy@stacklok.com>
|
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. |
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