-
Notifications
You must be signed in to change notification settings - Fork 239
Documentation: Feature Spec for mcp-config-set Has Incorrect JSON Schema Definition #430
Copy link
Copy link
Open
Description
The current feature specification for mcp-config-set does not match the actual tool implementation in the MCP server code.
mcp-gateway/docs/feature-specs/dynamic_servers.md
Lines 123 to 142 in c577d49
| ### 5. mcp-config-set | |
| **Purpose**: Set configuration values for MCP servers. | |
| **Parameters**: | |
| - `server` (required): Name of the MCP server to configure | |
| - `key` (required): Configuration key to set | |
| - `value` (required): Configuration value to set (can be string, number, boolean, or object) | |
| **Example Usage**: | |
| ```json | |
| { | |
| "name": "mcp-config-set", | |
| "arguments": { | |
| "server": "filesystem", | |
| "key": "allowed_paths", | |
| "value": ["/home/user/documents", "/tmp"] | |
| } | |
| } | |
| ``` |
This implies a key/value-style configuration update.
The MCP server implementation expects the following schema:
mcp-gateway/pkg/gateway/dynamic_mcps.go
Lines 78 to 104 in c577d49
| func (g *Gateway) createMcpConfigSetTool(_ *clientConfig) *ToolRegistration { | |
| tool := &mcp.Tool{ | |
| Name: "mcp-config-set", | |
| Description: `Set configuration for an MCP server. | |
| The config object will be validated against the server's config schema. If validation fails, the error message will include the correct schema.`, | |
| InputSchema: &jsonschema.Schema{ | |
| Type: "object", | |
| Properties: map[string]*jsonschema.Schema{ | |
| "server": { | |
| Type: "string", | |
| Description: "Name of the MCP server to configure", | |
| }, | |
| "config": { | |
| Type: "object", | |
| Description: "Configuration object for the server. This will be validated against the server's config schema.", | |
| }, | |
| }, | |
| Required: []string{"server", "config"}, | |
| }, | |
| } | |
| return &ToolRegistration{ | |
| Tool: tool, | |
| Handler: withToolTelemetry("mcp-config-set", configSetHandler(g)), | |
| } | |
| } | |
The tool expects:
server (required)
config (required, object validated against the server's config schema)
There is no support for key and value parameters.
Example input:
{
"server": "filesystem",
"config": {
"allowed_paths": ["/home/user/documents", "/tmp"]
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels