|
87 | 87 | ] |
88 | 88 | }, |
89 | 89 | "transport": { |
90 | | - "anyOf": [ |
91 | | - { |
92 | | - "$ref": "#/definitions/StdioTransport" |
93 | | - }, |
94 | | - { |
95 | | - "$ref": "#/definitions/StreamableHttpTransport" |
96 | | - }, |
97 | | - { |
98 | | - "$ref": "#/definitions/SseTransport" |
| 90 | + "type": "object", |
| 91 | + "properties": { |
| 92 | + "type": { |
| 93 | + "type": "string", |
| 94 | + "enum": ["stdio", "streamable-http", "sse"] |
99 | 95 | } |
100 | | - ], |
| 96 | + }, |
| 97 | + "required": ["type"], |
| 98 | + "if": {"properties": {"type": {"const": "stdio"}}}, |
| 99 | + "then": {"$ref": "#/definitions/StdioTransport"}, |
| 100 | + "else": { |
| 101 | + "if": {"properties": {"type": {"const": "streamable-http"}}}, |
| 102 | + "then": {"$ref": "#/definitions/StreamableHttpTransport"}, |
| 103 | + "else": {"$ref": "#/definitions/SseTransport"} |
| 104 | + }, |
101 | 105 | "description": "Transport protocol configuration for the package" |
102 | 106 | }, |
103 | 107 | "runtimeArguments": { |
|
292 | 296 | }, |
293 | 297 | "Argument": { |
294 | 298 | "description": "Warning: Arguments construct command-line parameters that may contain user-provided input. This creates potential command injection risks if clients execute commands in a shell environment. For example, a malicious argument value like ';rm -rf ~/Development' could execute dangerous commands. Clients should prefer non-shell execution methods (e.g., posix_spawn) when possible to eliminate injection risks entirely. Where not possible, clients should obtain consent from users or agents to run the resolved command before execution.", |
295 | | - "anyOf": [ |
296 | | - { |
297 | | - "$ref": "#/definitions/PositionalArgument" |
298 | | - }, |
299 | | - { |
300 | | - "$ref": "#/definitions/NamedArgument" |
| 299 | + "type": "object", |
| 300 | + "properties": { |
| 301 | + "type": { |
| 302 | + "type": "string", |
| 303 | + "enum": ["positional", "named"] |
301 | 304 | } |
302 | | - ] |
| 305 | + }, |
| 306 | + "required": ["type"], |
| 307 | + "if": {"properties": {"type": {"const": "positional"}}}, |
| 308 | + "then": {"$ref": "#/definitions/PositionalArgument"}, |
| 309 | + "else": {"$ref": "#/definitions/NamedArgument"} |
303 | 310 | }, |
304 | 311 | "StdioTransport": { |
305 | 312 | "type": "object", |
|
334 | 341 | }, |
335 | 342 | "url": { |
336 | 343 | "type": "string", |
| 344 | + "pattern": "^https?://[^\\s]+$", |
337 | 345 | "description": "URL template for the streamable-http transport. Variables in {curly_braces} reference argument valueHints, argument names, or environment variable names. After variable substitution, this should produce a valid URI.", |
338 | 346 | "example": "https://api.example.com/mcp" |
339 | 347 | }, |
|
363 | 371 | }, |
364 | 372 | "url": { |
365 | 373 | "type": "string", |
366 | | - "format": "uri", |
367 | | - "description": "Server-Sent Events endpoint URL", |
| 374 | + "pattern": "^https?://[^\\s]+$", |
| 375 | + "description": "URL template for the sse transport. Variables in {curly_braces} reference argument valueHints, argument names, or environment variable names. After variable substitution, this should produce a valid URI.", |
368 | 376 | "example": "https://mcp-fs.example.com/sse" |
369 | 377 | }, |
370 | 378 | "headers": { |
|
490 | 498 | "remotes": { |
491 | 499 | "type": "array", |
492 | 500 | "items": { |
493 | | - "anyOf": [ |
494 | | - { |
495 | | - "$ref": "#/definitions/StreamableHttpTransport" |
496 | | - }, |
497 | | - { |
498 | | - "$ref": "#/definitions/SseTransport" |
| 501 | + "type": "object", |
| 502 | + "properties": { |
| 503 | + "type": { |
| 504 | + "type": "string", |
| 505 | + "enum": ["streamable-http", "sse"] |
499 | 506 | } |
500 | | - ] |
| 507 | + }, |
| 508 | + "required": ["type"], |
| 509 | + "if": {"properties": {"type": {"const": "streamable-http"}}}, |
| 510 | + "then": {"$ref": "#/definitions/StreamableHttpTransport"}, |
| 511 | + "else": {"$ref": "#/definitions/SseTransport"} |
501 | 512 | } |
502 | 513 | }, |
503 | 514 | "_meta": { |
|
0 commit comments