Commit 1555c99
feat: Implement clean variables object for remote URL templating
Replace array-based variables with an object where keys are variable names
and values are Input definitions. This provides a much cleaner API and
enables rich client UIs.
Key improvements:
- Variables as object: {"tenant_id": {"description": "...", "isRequired": true}}
- No duplicate 'name' field - variable name is the object key
- Full Input capabilities: choices, isSecret, default, format, etc.
- Consistent with existing InputWithVariables pattern
- Client-friendly for building rich UIs (dropdowns, validation, etc.)
Example:
{
"url": "https://api.example.github.io/mcp/{tenant_id}",
"variables": {
"tenant_id": {
"description": "Tenant identifier",
"isRequired": true,
"choices": ["us-cell1", "emea-cell1"]
}
}
}
All validation and tests pass. Schema, Go types, validators, and example
have been updated to support the new structure.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 040fbec commit 1555c99
File tree
4 files changed
+21
-22
lines changed- docs/reference/server-json
- internal/validators
- pkg/model
4 files changed
+21
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
687 | | - | |
688 | | - | |
| 686 | + | |
| 687 | + | |
689 | 688 | | |
690 | 689 | | |
691 | 690 | | |
692 | | - | |
| 691 | + | |
693 | 692 | | |
694 | 693 | | |
695 | 694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments