Skip to main content
Glama

grep_codebase

Search repository files using a regex pattern to locate code matches and inspect relevant source within a specified app.

Instructions

Search a regex pattern across repository files.

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": {
      "appId": "<appId>",
      "pattern": "<pattern>"
    },
    "name": "grep_codebase"
  }
}

Input Schema

NameRequiredDescriptionDefault
appIdYes
patternYes
fileGlobNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it says nothing about read-only safety, result caps, pagination, binary-file exclusion, or case sensitivity. 'Regex' implies a read operation but reversibility, limits, and failure modes are undisclosed.

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?

A single sentence with no filler, and the core verb-plus-resource is front-loaded. Its brevity is clean, though it edges toward under-specification rather than true economy.

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

Completeness2/5

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

For a tool with zero annotation coverage, zero schema descriptions, and no output schema, one sentence is not enough. Nothing is said about result shape, ordering, or what identifiers the agent gets back to act on.

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

Parameters2/5

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

With 0% schema description coverage, the description must explain all three parameters, but it only loosely covers 'pattern'. The required 'appId' and the 'fileGlob' filter are never mentioned, so the agent cannot know how to scope the search to an app or restrict file types.

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?

States a specific verb and resource: searching a regex pattern across repository files. An agent can tell this is a code-search tool rather than a file-retrieval or graph-query tool. It stops short of naming how it differs from grep-like siblings such as find_patterns.

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

Usage Guidelines2/5

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

There is no guidance on when to reach for this tool versus get_file, get_file_tree, or find_patterns, and no prerequisites or exclusions are stated. The agent must infer the use case from the one-line purpose alone.

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