Skip to main content
Glama

search_workspace

Search file contents within a session's repository using grep-like queries, excluding common directories and sensitive files. Specify session, query, and optional filters.

Instructions

Search file contents (grep-like) within a Direct session's repo_path. Skips .git, node_modules, dist, release, and sensitive files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query string
session_idYesSession ID from create_direct_session
max_resultsNoMax results (default 20)
include_globsNoOptional file name glob patterns to include (e.g., ['*.ts', '*.js'])
case_sensitiveNoCase sensitive search (default false)
max_preview_charsNoMax preview chars per match (default 200)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that certain directories and sensitive files are skipped, which is a key behavioral trait. However, it does not mention authentication needs, rate limits, or behavior when the session is invalid. The 'grep-like' analogy is helpful but not fully comprehensive.

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 extremely concise: a single sentence that conveys the core purpose and a critical behavioral note. Every word earns its place, and the most important info comes first. No redundancy or filler.

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

Completeness3/5

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

Given the tool has 6 parameters and no output schema, the description adequately covers the main purpose and key behavioral constraint (skipped directories). However, it omits details about the return format (likely match previews), error handling, or when the session must be active. This leaves the agent partially uninformed about what to expect.

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 coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond the schema for any parameter; the parameter descriptions in the schema are already adequate. The tool description's mention of 'grep-like' and skipped directories does not directly enhance parameter understanding.

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 clearly states the action ('Search file contents') and the specific context ('within a Direct session's repo_path'), using 'grep-like' to indicate content searching. However, it does not explicitly differentiate from sibling tools like 'read_workspace_file' or 'list_workspace', which could also involve file access.

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?

The description mentions that it skips certain directories (e.g., .git, node_modules), giving implicit guidance on what is searched. However, it lacks explicit when-to-use or when-not-to-use information relative to alternatives like 'get_result' or 'read_workspace_file', and no expected prerequisites are stated.

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/jiezeng2004-design/PatchWarden'

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