Skip to main content
Glama

ws_grep

Read-onlyIdempotent

Search a workspace file (or a per-clip / per-link directory such as job//words) with a regex; returns path:line:text for each hit. context = lines shown around each hit (max 5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contextNo
patternYes
ignore_caseNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish that the tool is read-only, idempotent, and non-destructive, so the safety profile is covered. The description adds useful behavioral details beyond annotations: it returns path:line:text and explains that context controls the number of surrounding lines shown, capped at 5.

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?

Two dense sentences deliver the core operation, target, output format, and context parameter semantics without wasted words. The essential information is front-loaded.

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?

With an output schema present and read-only/idempotent annotations, the description covers enough to invoke the tool correctly: required path and pattern, output format, and context semantics. The only meaningful gap is the undocumented ignore_case parameter, whose default is visible in the schema.

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 description coverage is 0%, so the description carries the burden for parameter meaning. It explains path (file or directory), pattern (regex), and context (lines around each hit, max 5), but omits ignore_case behavior. This is strong compensation, though incomplete.

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 states a specific verb ('Search'), a clear resource ('a workspace file or ... directory'), and the output format ('path:line:text'). This clearly distinguishes ws_grep from sibling tools like ws_read and ws_ls, which read or list rather than search.

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 gives clear context for when to use the tool: searching files or directories such as job/<job_id>/words with a regex. It does not explicitly name alternatives or exclusion conditions, but the intended usage is unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.