Skip to main content
Glama

code_search

Search codebase content rapidly using ripgrep with regex patterns, file type filters, and context lines for precise code analysis.

Instructions

Search codebase content using ripgrep. Much faster and smarter than fs_search — supports regex, file type filters, context lines, and higher result limits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
globNoGlob pattern to filter files. E.g. "*.test.ts", "src/**/*.tsx"
pathNoDirectory to search in/workspace
wordNoMatch whole words only
contextNoLines of context before and after each match (0-5)
patternYesSearch pattern (regex supported).
file_typeNoFile type filter: ts, tsx, js, py, rust, go, css, html, json, yaml, etc.
files_onlyNoOnly list matching file paths, not content
ignore_caseNoCase-insensitive search
max_resultsNoMax result lines (default 50, max 200)
Behavior4/5

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

No annotations provided, so description carries full burden. It mentions ripgrep and features, indicating a read-only search operation. It does not disclose potential performance impacts or concurrency limits, but for a search tool this is acceptable.

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

Conciseness5/5

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

The description is very concise: only two sentences, front-loaded with the main purpose, and no unnecessary words.

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

Completeness4/5

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

Given high schema coverage and the simplicity of a search tool, the description covers the essential aspects. It could mention the output format (file paths and lines), but overall it is sufficiently complete for an agent to understand.

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 90%, so baseline is 3. The description adds general context but does not elaborate on individual parameters beyond what the schema already provides.

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?

The description clearly states the tool searches codebase content using ripgrep, and distinguishes it from the sibling fs_search by highlighting speed, regex support, and additional features.

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

Usage Guidelines4/5

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

The description explicitly compares to fs_search and highlights advantages, implying when to use this tool. However, it does not explicitly state when not to use it or provide alternatives beyond the comparison.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tawgroup/taw-computer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server