inputSchema property
JSON Schema for the tool's input parameters.
Implementation
@override
Map<String, dynamic> get inputSchema => {
'type': 'object',
'properties': {
'pattern': {
'type': 'string',
'description':
'The regular expression pattern to search for in file contents',
},
'path': {
'type': 'string',
'description':
'File or directory to search in (rg PATH). Defaults to '
'current working directory.',
},
'glob': {
'type': 'string',
'description':
'Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}") '
'- maps to rg --glob',
},
'output_mode': {
'type': 'string',
'enum': ['content', 'files_with_matches', 'count'],
'description':
'Output mode: "content" shows matching lines, '
'"files_with_matches" shows file paths (default), '
'"count" shows match counts.',
},
'-B': {
'type': 'number',
'description':
'Number of lines to show before each match (rg -B). '
'Requires output_mode: "content".',
},
'-A': {
'type': 'number',
'description':
'Number of lines to show after each match (rg -A). '
'Requires output_mode: "content".',
},
'-C': {'type': 'number', 'description': 'Alias for context.'},
'context': {
'type': 'number',
'description':
'Number of lines to show before and after each match (rg -C). '
'Requires output_mode: "content".',
},
'-n': {
'type': 'boolean',
'description':
'Show line numbers in output (rg -n). Requires output_mode: '
'"content". Defaults to true.',
},
'-i': {
'type': 'boolean',
'description': 'Case insensitive search (rg -i)',
},
'type': {
'type': 'string',
'description':
'File type to search (rg --type). Common types: js, py, '
'rust, go, java, etc.',
},
'head_limit': {
'type': 'number',
'description':
'Limit output to first N lines/entries. Defaults to 250. '
'Pass 0 for unlimited.',
},
'offset': {
'type': 'number',
'description':
'Skip first N lines/entries before applying head_limit. '
'Defaults to 0.',
},
'multiline': {
'type': 'boolean',
'description':
'Enable multiline mode where . matches newlines and '
'patterns can span lines (rg -U --multiline-dotall). '
'Default: false.',
},
},
'required': ['pattern'],
};