You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance Virtual MCP proposal with elicitation and composite tool patterns
Add MCP elicitation support to composite tools, enabling interactive
workflows with human-in-the-loop confirmations. Include state persistence
strategy for long-running workflows and demonstrate reusing single tools
with different parameters through incident investigation example.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
#### Example: Incident Investigation Using Multiple Fetch Calls
141
+
142
+
This composite tool demonstrates calling the same backend tool (`fetch`) multiple times with different static URLs to gather incident data from various monitoring sources:
143
+
144
+
```yaml
145
+
composite_tools:
146
+
- name: "investigate_incident"
147
+
description: "Gather logs and metrics from multiple sources for incident analysis"
This pattern allows a single generic `fetch` tool to be reused with different static endpoints, creating a purpose-built incident investigation workflow without needing separate tools for each data source.
Composite tools can include elicitation steps to request additional information from users during workflow execution, following the [MCP elicitation specification](https://modelcontextprotocol.io/specification/2025-06-18/client/elicitation). This enables:
248
+
249
+
- **Interactive workflows**: Request user input between steps
250
+
- **Safety confirmations**: Require approval before destructive operations
251
+
- **Dynamic parameters**: Gather context-dependent information
252
+
- **Conditional execution**: Branch workflow based on user responses
253
+
254
+
Elicitation steps use JSON Schema to define the structure of requested data (limited to flat objects with primitive properties). The Virtual MCP server forwards elicitation requests to the client and captures responses in three forms:
255
+
256
+
- **accept**: User provided data (accessible via `{{.steps.step_id.content}}`)
257
+
- **decline**: User explicitly rejected the request
258
+
- **cancel**: User dismissed without choosing
259
+
260
+
Subsequent steps can reference elicitation results through template expansion and use the `condition` field to execute conditionally based on user responses. The `on_decline` and `on_cancel` handlers control workflow behavior for non-acceptance scenarios.
6. **Elicitation**: Implement MCP elicitation protocol for composite tool user interaction
223
322
224
323
### Authentication Complexity
225
324
@@ -231,6 +330,10 @@ Different MCP servers may have vastly different authentication requirements:
231
330
232
331
The Virtual MCP must handle this complexity transparently, maintaining separate authentication contexts per backend while presenting a unified interface to clients.
233
332
333
+
### Composite Tool State Persistence
334
+
335
+
Composite tools with elicitation require state persistence to handle long-running workflows that span multiple user interactions. The Virtual MCP will maintain workflow execution state (current step, completed steps, elicitation responses, and template variables) in memory with a clean storage interface to enable future migration to persistent backends. Each composite tool invocation receives a unique workflow ID, and the server checkpoints state after each step completion and elicitation interaction. Workflows have a default timeout of 30 minutes, after which they are automatically cleaned up and any pending elicitations are treated as cancelled. This approach keeps the implementation simple for Phase 2 while establishing patterns that can scale to distributed persistence later.
336
+
234
337
## Alternative Approaches Considered
235
338
236
339
1. **Kubernetes CRD**: More complex, requires operator changes
0 commit comments