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
The `inputSchema` field uses JSON Schema to define the expected properties for a tool. When executing a tool, the MCI adapter processes properties as follows:
623
+
624
+
1. **Required Properties**: Must be provided, or execution will fail with a validation error
625
+
2. **Optional Properties with Defaults**: If not provided, the default value is used
626
+
3. **Optional Properties without Defaults**: If not provided, they are skipped (not included in template context)
627
+
628
+
This behavior prevents template substitution errors for optional properties that aren't needed for a particular execution.
629
+
630
+
#### Example: Properties with Defaults
631
+
632
+
```json
633
+
{
634
+
"name": "search_files",
635
+
"description": "Search for text in files",
636
+
"inputSchema": {
637
+
"type": "object",
638
+
"properties": {
639
+
"pattern": {
640
+
"type": "string",
641
+
"description": "Search pattern"
642
+
},
643
+
"directory": {
644
+
"type": "string",
645
+
"description": "Directory to search in"
646
+
},
647
+
"include_images": {
648
+
"type": "boolean",
649
+
"description": "Include image files in search",
650
+
"default": false
651
+
},
652
+
"case_sensitive": {
653
+
"type": "boolean",
654
+
"description": "Use case-sensitive search",
655
+
"default": true
656
+
},
657
+
"max_results": {
658
+
"type": "number",
659
+
"description": "Maximum number of results",
660
+
"default": 100
661
+
},
662
+
"file_extensions": {
663
+
"type": "string",
664
+
"description": "Optional comma-separated list of file extensions"
665
+
}
666
+
},
667
+
"required": ["pattern", "directory"]
668
+
},
669
+
"execution": {
670
+
"type": "text",
671
+
"text": "Searching '{{props.pattern}}' in {{props.directory}} (images: {{props.include_images}}, max: {{props.max_results}})"
0 commit comments