pub struct SearchCodebaseParams {
pub query: String,
pub is_regex: bool,
pub path_glob: String,
pub filter_mode: FilterMode,
pub max_results: u32,
pub context_lines: u32,
pub known_files: Vec<String>,
pub group_by_file: bool,
pub exclude_glob: String,
pub offset: u32,
}Expand description
Parameters for search_codebase.
Fields§
§query: StringSearch pattern (literal or regex).
is_regex: boolTreat query as regex.
path_glob: StringLimit search scope (e.g., src/**/*.ts).
filter_mode: FilterModeFilter mode: code_only, comments_only, or all.
Uses Tree-sitter node classification to filter matches by context.
Defaults to code_only (exclude comments and string literals).
max_results: u32Maximum matches returned.
context_lines: u32Lines of context above/below each match.
known_files: Vec<String>File paths already in the agent’s context.
For matches in these files, only minimal metadata is returned
(file, line, column, enclosing_semantic_path, version_hash).
The full content and context lines are omitted to save tokens.
group_by_file: boolGroup matches by file in the response.
When true, the response includes file_groups instead of (or in addition to)
the flat matches list. Each group contains all matches for one file with a
single version_hash at group level.
exclude_glob: StringGlob pattern for files to exclude from search (e.g., **/*.test.*).
Applied before search — not as a post-filter — so excluded files are
never read. Can be combined with path_glob include patterns.
offset: u32Number of matches to skip before returning results (for pagination).
Use with max_results to page through large result sets.
Trait Implementations§
Source§impl Debug for SearchCodebaseParams
impl Debug for SearchCodebaseParams
Source§impl Default for SearchCodebaseParams
impl Default for SearchCodebaseParams
Source§fn default() -> SearchCodebaseParams
fn default() -> SearchCodebaseParams
Source§impl<'de> Deserialize<'de> for SearchCodebaseParams
impl<'de> Deserialize<'de> for SearchCodebaseParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SearchCodebaseParams
impl JsonSchema for SearchCodebaseParams
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for SearchCodebaseParams
impl RefUnwindSafe for SearchCodebaseParams
impl Send for SearchCodebaseParams
impl Sync for SearchCodebaseParams
impl Unpin for SearchCodebaseParams
impl UnsafeUnpin for SearchCodebaseParams
impl UnwindSafe for SearchCodebaseParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more