Skip to main content
Glama

search

Find where string literals or constants are used and defined across a project. Locate error messages, keys, or constant references by substring; use find_callers for function call sites.

Instructions

Where a string literal (error message, key) or a constant is used/defined (substring match). Example: {"kind": "strings", "pattern": "Order not found"} or {"kind": "constants", "pattern": "STATUS_ACTIVE"}. For calls of a function use find_callers.

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": {
      "kind": "<kind>",
      "pattern": "<pattern>"
    },
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
fullNoDisable the 400-line output cap.
kindYesstrings: string literals (messages, keys); constants: constant references and definitions.
pathNoSearch scope relative to the project root; default: the whole root.
layerNoOnly files of this layer, e.g. `service`.
patternYesText to look for (substring).
projectNoRegistered project alias; default: the server's working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.3

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral load. It usefully discloses the match semantics (substring, not regex) and that a default output cap truncates results, but it never states that the operation is read-only, how results are shaped, or what happens when no project/layer resolves.

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 sentences and two examples, front-loaded with the core definition and the sibling exclusion, with zero filler. The fragmentary opening ('Where a string literal...') is slightly less scannable than an explicit verb-first statement would be.

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?

For a six-parameter read tool with a fully documented schema and no output schema, the definition covers purpose, match semantics, and sibling routing adequately. The main remaining gap is the absence of any description of the returned results or of the truncation behavior beyond the schema's `full` note.

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 schema already documents all six parameters. The description reinforces `kind` semantics by example (`strings` = error messages/keys, `constants` = STATUS_ACTIVE) and clarifies `pattern` is a substring, but adds nothing about `path`, `layer`, `project`, or `full` beyond what the schema says.

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 scopes a generically named `search` tool to one concrete job: finding where string literals or constants are used or defined via substring match, and it names `find_callers` as the tool for the different job of function calls. The verb is implied by a sentence fragment rather than stated outright, but the resource and boundary are unambiguous.

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?

It gives one explicit routing rule (function calls → `find_callers`) and two concrete example invocations showing when to use each `kind`. It stops short of explaining when to narrow with `path`/`layer`/`project` or when to set `full`, so alternative-selection guidance is present but incomplete.

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