-
Notifications
You must be signed in to change notification settings - Fork 145
Description
Problem
Virtual MCP Server composite tool definitions currently use a non-standard simplified parameter format in YAML configuration, which diverges from the MCP specification and creates confusion.
Current Behavior
The YAML configuration expects a simplified format:
composite_tools:
- name: "my_tool"
parameters:
param1:
type: "string"
default: "value"
param2:
type: "integer"
default: 42This is then transformed by pkg/vmcp/config/yaml_loader.go:516-531 into full JSON Schema format before being passed to the workflow engine.
Expected Behavior (MCP Standard)
According to the MCP specification, tool inputSchema should be standard JSON Schema:
{
"type": "object",
"properties": {
"param1": {"type": "string", "default": "value"},
"param2": {"type": "integer", "default": 42}
},
"required": ["param2"]
}The YAML equivalent should be:
composite_tools:
- name: "my_tool"
parameters:
type: object
properties:
param1:
type: string
default: "value"
param2:
type: integer
default: 42
required: ["param2"]Why This Matters
- Non-standard: The simplified format is not documented in any standard (MCP spec, JSON Schema spec, etc.)
- Confusion: Users familiar with JSON Schema will be surprised by the format
- Limited expressiveness: Cannot specify
requiredfields,additionalProperties, validation constraints, etc. - Inconsistency: The proposal doc
THV-2106-virtual-mcp-server.md:442-443shows JSON Schema format, but the implementation doesn't support it - Transformation overhead: Unnecessary conversion layer in
yaml_loader.go
Evidence
Proposal doc (THV-2106-virtual-mcp-server.md:442-443):
parameters:
pr_number: {type: "integer"}WorkflowDefinition (pkg/vmcp/composer/composer.go:49):
Parameters map[string]any // Expects full JSON SchemaYAML Loader (pkg/vmcp/config/yaml_loader.go:161):
Parameters map[string]map[string]any // Forces simplified formatTransformer (pkg/vmcp/server/workflow_converter.go:50-68):
// Manually builds JSON Schema from simplified format
params = map[string]any{
"type": "object",
"properties": properties,
}Proposed Solution
-
Change
yaml_loader.go:161to accept full JSON Schema:Parameters map[string]any `yaml:"parameters"` // Accept full JSON Schema
-
Remove transformation code in
workflow_converter.go:50-68- just pass through -
Add validation that parameters is valid JSON Schema (has
type: object,properties, etc.) -
Update demo configs and docs to show standard JSON Schema format
Workaround
For now, use the simplified format as shown in demo-vmcp-composite-minimal.yaml:28-32:
parameters:
base_url:
type: "string"
description: "Base URL"
default: "https://example.com"References
- MCP Spec: https://modelcontextprotocol.io/specification/2025-06-18/server/tools
- Code:
pkg/vmcp/config/yaml_loader.go:516-531 - Code:
pkg/vmcp/server/workflow_converter.go:50-68 - Proposal:
docs/proposals/THV-2106-virtual-mcp-server.md:442-443