Skip to main content
Glama

Search project

search_project
Read-onlyIdempotent

Search redacted project file contents with a timed .NET regex to find symbols or phrases. Returns grouped matches with context, not path matches.

Instructions

Searches transformed text with a timed .NET regex. It matches file content, never paths; find names with get_tree include_patterns. Use it for symbols or phrases; symbols=true finds declarations, not uses; use related_files for dependency links. Returns grouped numbered matches, merged context, complete|partial status, inspected/retained/written counts, and continuation. Line numbers use returned text; generated redaction replacements never match. Key parameters: pattern, paths, context_lines, ignore_case, max_results=1..200, git_scope, include_patterns, exclude_patterns, and max_file_bytes. The best unique declaration includes up to 1,800 protected body characters within the same cap. Project: unique listed name, absolute path returned by list_projects, or #index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsNoNarrows selection to literal paths for existing project-relative files or directories; glob characters are ordinary.
branchNoRemote Git branch; invalid for local projects.
patternYesRequired .NET regex with a 2-second timeout over redacted file content, never paths; use get_tree include_patterns for names. Text inserted by redaction never matches.
projectNounique listed name, absolute path returned by list_projects, or #index.
symbolsNoMatch declarations of the name in pattern (Foo, class Foo, Foo|Bar), not uses.
git_scopeNoNarrows to staged, changed (including untracked files), or diff:<ref>..<ref> paths; content stays from the current working tree.
ignore_caseNoEnables case-insensitive matching; accepts a boolean or its string form.
max_resultsNoLimits displayed match lines while scanning continues; the boundary reports encountered, retained, and written counts.
tracked_onlyNoRestricts results to Git-tracked files; accepts a boolean or its string form.
context_linesNoContext lines per match; overlapping windows merge.
max_file_bytesNoExcludes selected files larger than this byte count; accepts an integer or numeric string.
exclude_patternsNoRemoves paths with the same project-relative glob syntax as include_patterns.
include_patternsNoNarrows with project-relative '/' globs: '*' and '?' stay in one segment, '**/' spans depths, and '{a,b}' alternates; matching is case-sensitive, while '!' and '[...]' are rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed21 schema fields changedv5.2.0
    • changedInput schema / properties / branch / description
      Previous value: -"Optional Git branch for a remote project URL; invalid for local project paths."New value: +"Remote Git branch; invalid for local projects."
    • changedInput schema / properties / context_lines / description
      Previous value: -"Context lines from 0 to 20; default 2; integer or numeric string."New value: +"Context lines per match; overlapping windows merge."
    • changedInput schema / properties / exclude_patterns / description
      Previous value: -"Project-relative glob patterns using '/' to exclude additional paths."New value: +"Removes paths with the same project-relative glob syntax as include_patterns."
    • removedInput schema / properties / exclude_patterns / items
      Removed value: -{
      -  "maxLength": 512,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • removedInput schema / properties / exclude_patterns / maxItems
      Removed value: -256
    • addedInput schema / properties / exclude_patterns / oneOf
      Added value: +[
      +  {
      +    "maxLength": 512,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "maxLength": 512,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "maxItems": 256,
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / exclude_patterns / type
      Removed value: -"array"
    • changedInput schema / properties / git_scope / description
      Previous value: -"Further restrict results to staged files, all current changes, or files changed between two Git refs."New value: +"Narrows to staged, changed (including untracked files), or diff:<ref>..<ref> paths; content stays from the current working tree."
    • changedInput schema / properties / ignore_case / description
      Previous value: -"Case-insensitive matching; accepts a boolean or the string 'true' or 'false'."New value: +"Enables case-insensitive matching; accepts a boolean or its string form."
    • changedInput schema / properties / include_patterns / description
      Previous value: -"Project-relative glob patterns using '/'. They only narrow built-in and gitignore filtering."New value: +"Narrows with project-relative '/' globs: '*' and '?' stay in one segment, '**/' spans depths, and '{a,b}' alternates; matching is case-sensitive, while '!' and '[...]' are rejected."
    • removedInput schema / properties / include_patterns / items
      Removed value: -{
      -  "maxLength": 512,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • removedInput schema / properties / include_patterns / maxItems
      Removed value: -256
    • addedInput schema / properties / include_patterns / oneOf
      Added value: +[
      +  {
      +    "maxLength": 512,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "maxLength": 512,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "maxItems": 256,
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / include_patterns / type
      Removed value: -"array"
    • changedInput schema / properties / max_file_bytes / description
      Previous value: -"Exclude otherwise selected files strictly larger than this byte count; integer or numeric string."New value: +"Excludes selected files larger than this byte count; accepts an integer or numeric string."
    • changedInput schema / properties / max_results / description
      Previous value: -"Maximum matches from 1 to 200; default 50; integer or numeric string."New value: +"Limits displayed match lines while scanning continues; the boundary reports encountered, retained, and written counts."
    • addedInput schema / properties / paths
      Added value: +{
      +  "description": "Narrows selection to literal paths for existing project-relative files or directories; glob characters are ordinary.",
      +  "oneOf": [
      +    {
      +      "maxLength": 4096,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "maxLength": 4096,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "maxItems": 256,
      +      "type": "array"
      +    }
      +  ]
      +}
    • changedInput schema / properties / pattern / description
      Previous value: -"A .NET regular expression evaluated against redacted text with a 2-second timeout."New value: +"Required .NET regex with a 2-second timeout over redacted file content, never paths; use get_tree include_patterns for names. Text inserted by redaction never matches."
    • changedInput schema / properties / project / description
      Previous value: -"Absolute root path returned by list_projects, or a Git URL when the server allows remote sources. Optional only when one local root is configured."New value: +"unique listed name, absolute path returned by list_projects, or #index."
    • addedInput schema / properties / symbols
      Added value: +{
      +  "default": false,
      +  "description": "Match declarations of the name in pattern (Foo, class Foo, Foo|Bar), not uses.",
      +  "oneOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "enum": [
      +        "true",
      +        "false"
      +      ],
      +      "type": "string"
      +    }
      +  ]
      +}
    • changedInput schema / properties / tracked_only / description
      Previous value: -"Restrict results to files tracked by Git; accepts a boolean or the string 'true' or 'false'."New value: +"Restricts results to Git-tracked files; accepts a boolean or its string form."
  2. First observedv5.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real behavior on top: a 2-second regex timeout, operation over redacted content where redaction-inserted text never matches, line numbers keyed to returned text, and a cap of 1,800 protected body characters on the best unique declaration. None of that is inferable from the annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and routing come first, then return shape, then parameters — a sensible front-loaded order for a 13-parameter tool with no output schema. The trailing 'Project: unique listed name, absolute path returned by list_projects, or #index.' is a verbatim copy of the schema text and the parameter enumeration is somewhat redundant, but overall it is dense rather than padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return contract itself: grouped numbered matches, merged context, complete|partial status, inspected/retained/written counts, and continuation. Combined with annotations covering safety and a fully documented schema, an agent has everything needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema documents each parameter in more detail than the description does (e.g. include_patterns glob rules, git_scope semantics). The description's parameter list ('pattern, paths, context_lines, ignore_case, max_results=1..200...') largely restates what the schema already states, so it lands at the baseline rather than adding meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Searches transformed text with a timed .NET regex') and immediately bounds the scope: it matches file content, never paths. It also names the sibling to use for the adjacent need ('find names with get_tree include_patterns'), so an agent can distinguish it from get_tree, related_files, and get_file without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing: use get_tree include_patterns for names, use this for symbols or phrases, use symbols=true for declarations rather than uses, and use related_files for dependency links. That is when-to-use, when-not-to-use, and named alternatives in a few lines.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.