Skip to main content
Glama

search_project

Read-only

Searches plain-text patterns across Godot project files and returns matching lines with file paths and line numbers. Use it to locate where a string, scene reference, or shader code appears in your project.

Instructions

Plain-text (substring, not regex) search across project files; the text goes in pattern. Default fileTypes ["gd","tscn","cs","gdshader"]; caseSensitive false; maxResults integer >= 1, default 100. Skips hidden entries and .mcp. Returns: matches[] (project-relative file, 1-indexed lineNumber, line), truncated, filesSearched, fileTypes. warnings leads when no file had a searched extension or a path was unreadable. Errors if pattern holds a line break or a parameter is undeclared.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectPath": "<projectPath>",
      "pattern": "<pattern>"
    },
    "name": "search_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
patternYesPlain-text string to search for (required; there is no query or regex parameter)
fileTypesNoFile extensions to search (default: ["gd", "tscn", "cs", "gdshader"])
maxResultsNoMaximum matches to return, an integer of 1 or more (default: 100)
projectPathYesPath to the Godot project directory
caseSensitiveNoCase-sensitive search (default: false)

Output Schema

NameRequiredDescriptionDefault
matchesYes
warningsNo
fileTypesYesThe extensions that were searched.
truncatedYes
filesSearchedYesFiles read and searched.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv4.0.1
    • changedInput schema / properties / maxResults / description
      Previous value: -"Maximum matches to return (default: 100)"New value: +"Maximum matches to return, an integer of 1 or more (default: 100)"
    • addedInput schema / properties / maxResults / minimum
      Added value: +1
    • changedInput schema / properties / maxResults / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / pattern / description
      Previous value: -"Plain-text string to search for"New value: +"Plain-text string to search for (required; there is no query or regex parameter)"
    • addedOutput schema / properties / fileTypes
      Added value: +{
      +  "description": "The extensions that were searched.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / filesSearched
      Added value: +{
      +  "description": "Files read and searched.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / required
      Added value: +[
      +  "matches",
      +  "truncated",
      +  "filesSearched",
      +  "fileTypes"
      +]
  2. Addedv3.1.1
  3. Removedv3.0.0
  4. Addedv1.0.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses scoping behavior (skips hidden entries and .mcp), default search parameters, truncation reporting, a warnings-first result shape, and two specific error conditions. That is far more behavioral context than the single annotation supplies, and it does not conflict with readOnlyHint.

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?

Information is front-loaded: search mode first, then defaults, then result shape, then warnings and errors. It is dense and telegraphic ('warnings leads when...') and repeats some schema defaults, so it is not flawless, but nearly every clause carries signal.

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?

For a five-parameter read tool with an output schema, the description covers mode, defaults, exclusions, truncation, warnings, and error cases — more than enough for an agent to call it correctly. Nothing material is missing.

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

Parameters4/5

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

Schema coverage is 100%, so a baseline of 3 is warranted, but the description genuinely adds value by stating that the search string goes in `pattern` and that no `query` or regex parameter exists, plus restating the effective defaults and the maxResults minimum. This reduces the chance of an agent inventing a wrong field name.

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

Purpose4/5

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

The description names a specific verb and resource ('plain-text ... search across project files') and immediately eliminates the most likely confusion by stating 'substring, not regex'. It does not route the agent against any sibling tool (e.g. get_project_files), but the purpose itself is unambiguous.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the defaults (fileTypes, caseSensitive, maxResults) and the skip rules tell the agent how the search behaves, but there is no explicit 'use this when...' guidance or comparison to an alternative. The error conditions (line break in pattern, undeclared parameter) are the closest thing to constraints on use.

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