inputSchema property
Input schema (JSON Schema format)
Defines the structure of parameters that this tool accepts. Follows JSON Schema specification (draft-07 or later).
Implementation
@override
Map<String, dynamic> get inputSchema => McpSchema.inputSchema(
type: 'object',
properties: {
'query': McpSchema.string(
description: 'Text or regex pattern to search for',
required: true,
),
'file_pattern': McpSchema.string(
description: 'Glob-style pattern to filter files (e.g., "*.dart", "**/*_endpoint.dart")',
defaultValue: '*.dart',
),
'path': McpSchema.string(description: 'Directory to search in (relative to project root)'),
'case_sensitive': McpSchema.boolean(
description: 'Whether search is case-sensitive',
defaultValue: false,
),
'use_regex': McpSchema.boolean(
description: 'Treat query as regular expression',
defaultValue: false,
),
'max_results': McpSchema.integer(
description: 'Maximum number of results to return',
defaultValue: 50,
),
'context_lines': McpSchema.integer(
description: 'Number of context lines to include',
defaultValue: 0,
),
'exclude_patterns': McpSchema.array(
items: McpSchema.string(description: 'File pattern to exclude'),
description: 'Patterns to exclude (e.g., "*.g.dart", "generated")',
),
},
required: ['query'],
);