Skip to main content
Glama

workspace_text_search

Read-only

Search workspace files line by line using literal text or regex, filter by extensions, and report skipped binary or non-UTF-8 files.

Instructions

Search lines by literal text or regex; report skipped binary/non-UTF-8 files.

extensions accepts suffixes with or without a leading dot; null selects all files, while an empty list selects none. max_matches limits returned matching lines, not scanning. Counts are exact; skipped-file paths are available through the linked immutable resource.

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": {
      "query": "<query>"
    },
    "name": "workspace_text_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoproject/
queryYes
regexNo
extensionsNo
max_matchesNo
case_sensitiveNo

Output Schema

NameRequiredDescriptionDefault
matchesYes
resourcesNo
matches_countYes
matches_truncatedYes
skipped_files_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • addedInput schema / additionalProperties
      Added value: +false
  2. Addedv0.2.2

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description adds genuine behavior beyond them: binary/non-UTF-8 files are skipped rather than erroring, skipped paths are exposed via a linked immutable resource, and max_matches truncates output but not the scan. The only gap is that it never says how the scan is scoped or how expensive it is on a large tree.

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?

Short and front-loaded, with the core purpose in the first clause and parameter caveats after; every sentence carries information. The arbitrary line breaks split sentences mid-clause (e.g. 'Counts are exact;' starting a new line), which slightly hurts readability but wastes no words.

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?

An output schema exists, so return formatting need not be explained, and the description covers the notable gotchas (skipped files, exact counts, truncation semantics). However, for a six-parameter tool with zero schema descriptions, the unspecified path scope, recursion behavior, and regex dialect leave an agent guessing on inputs that materially change results.

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 0%, so the description must compensate, and it does so for only two of six parameters: it clarifies extensions suffix/dot handling and the null-vs-empty-list distinction, and explains max_matches as a returned-line cap rather than a scan cap. The path default ('project/'), whether the search recurses, regex flavor, and case_sensitive are left entirely undefined.

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 ('Search lines by literal text or regex') plus an unusual side behavior (reporting skipped binary/non-UTF-8 files), which lets an agent distinguish it from name-based tools like workspace_find_files. It does not explicitly name a sibling alternative, so it stops short of a 5.

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 mention of literal vs regex queries and of non-UTF-8 skipping implies this is the tool for content search inside the workspace, but there is no explicit 'use this instead of workspace_find_files when...' routing or any exclusion. An agent can infer the case but must compare schemas to be sure.

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