Skip to main content
Glama

search_compact

Read-onlyIdempotent

Searches project files and returns grouped, line-clipped grep hits so you can inspect matches without reading full file contents.

Instructions

Grep the project; hits grouped per file, lines clipped. Literal, case-insensitive by default.

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": "search_compact"
  }
}

Input Schema

NameRequiredDescriptionDefault
globNoe.g. *.ts or src/**/*.cpp
pathNoDir or file
queryYes
regexNo
contextNo
maxResultsNoHit lines
caseSensitiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), so the description's job is to add behavior — and it does: results are grouped per file, line content is clipped, and matching is literal and case-insensitive unless told otherwise. What's missing is any mention that maxResults caps the hit lines (default 30), which matters for interpreting a truncated result set.

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?

Two telegraphic clauses, front-loaded with the action and then the output shape — no filler. The phrase "lines clipped" is slightly opaque about what gets truncated, and the brevity is part of why parameter coverage is thin.

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?

For a 7-parameter search tool with no output schema, the definition covers the essentials of a grep (default case behavior, result grouping) but leaves context lines, result capping, and glob/path scoping unexplained. Adequate to invoke, incomplete for predicting what comes back.

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 7 parameters and only 43% schema description coverage, the description needs to carry weight, but it only clarifies matching semantics (literal, case-insensitive) — which duplicates the caseSensitive and regex defaults already in the schema. glob, path, context, and maxResults get no meaning from the description, leaving four parameters effectively undocumented.

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?

"Grep the project" gives a specific verb plus resource, and adds the result shape (hits grouped per file, lines clipped) so the agent knows this is a search, not a read. It does not distinguish itself from siblings like read_slice or file_outline, but the verb/resource pairing is unambiguous on its own.

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: reach for this when you need to find text across the project rather than open a known file. There is no explicit when-not guidance or pointer to an alternative for structured/outline-style lookups, so the agent must infer the boundary from sibling names.

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