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

stacklok / toolhive / 19368769071
51%

Build:
DEFAULT BRANCH: main
Ran 14 Nov 2025 03:15PM UTC
Jobs 1
Files 371
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

14 Nov 2025 03:10PM UTC coverage: 48.23% (+0.05%) from 48.179%
19368769071

push

github

web-flow
Apply parameter defaults in composite tool workflows (#2588)

* Apply parameter defaults in composite tool workflows

Composite tool workflows can define parameter schemas with default
values, but these defaults were not being applied when clients called
the tool with missing parameters. This caused template expansion to
fail with "<no value>" when referencing undefined parameters.

This fix applies JSON Schema defaults before workflow execution:
- Extract default values from workflow parameter schema
- Apply defaults only for missing parameters
- Never override explicitly provided parameters

Example workflow with defaults:
```yaml
composite_tools:
  - name: "fetch_spec"
    parameters:
      base_url:
        type: "string"
        default: "https://spec.modelcontextprotocol.io"
    steps:
      - tool: "fetch"
        arguments:
          url: "{{.params.base_url}}/page"  # Now works with empty args
```

Changes:
- Add applyParameterDefaults() function to workflow engine
- Apply defaults before creating workflow context
- Add tests for default application and override behavior

Fixes template expansion failures when clients don't provide optional
parameters that have defaults defined in the workflow schema.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* apply fix for recommendation from review

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>

---------

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
Co-authored-by: Claude <noreply@anthropic.com>

27 of 29 new or added lines in 1 file covered. (93.1%)

4 existing lines in 1 file now uncovered.

23251 of 48209 relevant lines covered (48.23%)

36.59 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
82.07
0.68% pkg/vmcp/composer/workflow_engine.go

Uncovered Existing Lines

Lines Coverage ∆ File
4
65.26
10.53% pkg/secrets/keyring/keyctl_linux.go
Jobs
ID Job ID Ran Files Coverage
1 19368769071.1 14 Nov 2025 03:15PM UTC 371
48.23
GitHub Action Run
Source Files on build 19368769071
  • Tree
  • List 371
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19368769071
  • e6cc263a on github
  • Prev Build on main (#19364766664)
  • Next Build on main (#19370017296)
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

© 2025 Coveralls, Inc