• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 19638645768
51%

Build:
DEFAULT BRANCH: main
Ran 24 Nov 2025 02:57PM UTC
Jobs 1
Files 381
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Nov 2025 02:55PM UTC coverage: 49.132% (+0.1%) from 49.03%
19638645768

push

github

web-flow
Add output configuration support for composite tools (#2677)

# Add Output Configuration Support for Composite Tools

**Implements:** https://github.com/stacklok/stacklok-epics/issues/176

## Summary

This PR adds structured output schema support for composite tool workflows in the Virtual MCP Server. Workflows can now define explicit output schemas with type information, descriptions, default values, and template-based value construction. This enables type-safe, predictable outputs from composite tools that are properly advertised to MCP clients.

## Key Features

### 🎯 Core Functionality
- **Structured Output Schemas**: Define explicit output schemas using JSON Schema types (string, integer, number, boolean, object, array)
- **Template-Based Construction**: Use Go templates to extract and transform values from workflow step outputs and parameters
- **Type Coercion**: Automatic type conversion from string values to target types (integers, booleans, numbers)
- **Default Values**: Fallback values when template expansion or type coercion fails
- **Nested Objects**: Full support for deeply nested object structures with recursive schema definitions
- **JSON Deserialization**: Automatic deserialization of JSON strings into objects and arrays

### 🔒 Security & Validation
- **Maximum Nesting Depth**: Prevents resource exhaustion with configurable depth limit (default: 10 levels)
- **Schema Validation**: Comprehensive validation at workflow definition time
- **Type Safety**: Validates all property types and enforces required fields
- **Template Syntax Validation**: Basic validation to catch malformed templates early

### 🔄 Backward Compatibility
- **Zero Breaking Changes**: Workflows without `output` configuration continue to return the last step's output
- **Incremental Adoption**: Teams can adopt structured outputs gradually

321 of 476 new or added lines in 5 files covered. (67.44%)

38 existing lines in 2 files now uncovered.

24802 of 50480 relevant lines covered (49.13%)

61.48 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
9
81.11
-0.66% pkg/vmcp/composer/workflow_engine.go
68
62.01
pkg/vmcp/composer/output_validator.go
78
65.64
pkg/vmcp/composer/output_constructor.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
94.67
-1.33% pkg/vmcp/composer/dag_executor.go
36
47.5
-3.4% pkg/workloads/manager.go
Jobs
ID Job ID Ran Files Coverage
1 19638645768.1 24 Nov 2025 02:57PM UTC 381
49.13
GitHub Action Run
Source Files on build 19638645768
  • Tree
  • List 381
  • Changed 7
  • Source Changed 5
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19638645768
  • 51ac7d80 on github
  • Prev Build on main (#19621822030)
  • Next Build on main (#19638991121)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc