Skip to main content
Glama

search_content

Read-only

Find text inside files: query is literal, or a JavaScript regular expression matched per line with regex true, searched recursively under path (a folder or one file), skipping hidden files unless includeHidden; .git and node_modules are always skipped. filePattern limits it to matching files, a glob like *.js. Returns JSON matches with file, line number and line text; contextLines adds lines around each. Stops after limits.timeoutMs (default 10 seconds) or limits.maxEntries folder entries read, or when cancelled, and then returns the matches found so far with truncated true, limitReached and a note.

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

Input Schema

NameRequiredDescriptionDefault
pathYes
queryYes
regexNo
limitsNo
deviceIdNoComputer name or id
filePatternNo
contextLinesNo
caseSensitiveNo
includeHiddenNo
workSessionIdNoFrom create_work_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / limits / default / maxEntries
      Added value: +50000
    • addedInput schema / properties / limits / default / timeoutMs
      Added value: +10000
    • addedInput schema / properties / limits / properties / maxEntries
      Added value: +{
      +  "default": 50000,
      +  "maximum": 500000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / limits / properties / timeoutMs
      Added value: +{
      +  "default": 10000,
      +  "maximum": 30000,
      +  "minimum": 100,
      +  "type": "integer"
      +}
  2. Changed4 schema fields changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id; optional with one computer or a default"New value: +"Computer name or id"
    • removedInput schema / properties / filePattern / maxLength
      Removed value: -512
    • removedInput schema / properties / filePattern / minLength
      Removed value: -1
    • removedInput schema / properties / query / minLength
      Removed value: -1
  3. Changed2 schema fields changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id from list_devices. Optional with one computer online or a default set."New value: +"Computer name or id; optional with one computer or a default"
    • changedInput schema / properties / workSessionId / description
      Previous value: -"Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work."New value: +"From create_work_session"
  4. Changed1 schema field changed
    • addedInput schema / properties / workSessionId
      Added value: +{
      +  "description": "Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/destructive flags, and the description adds substantial behavior beyond them: hidden files are skipped unless includeHidden, .git and node_modules are always excluded, and results come back with truncated=true, limitReached and a note when a timeout or entry cap fires. It also documents the default 10-second timeout and that partial matches are still returned, which is exactly the kind of operational trait an agent needs.

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?

Front-loads the core operation, then layers matching mode, filtering, exclusions, return shape and truncation in a logical order with no filler. Sentences are long and clause-heavy, which slightly hurts scanability but every clause conveys distinct information.

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 10 parameters, a nested limits object and no output schema, the description does the heavy lifting by describing the returned fields and truncation markers. The remaining shortfall is the unmentioned caseSensitive flag and the undocumented machine/session selectors, which matter for a remote-search tool.

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 only 20%, so the description carries most of the burden and does explain query, regex, path, filePattern, contextLines, includeHidden and two limits fields with defaults. However, it never mentions caseSensitive (default true, a behaviorally significant default), maxBytes, maxFiles, maxResults, or how deviceId/workSessionId select the target machine, leaving real gaps.

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?

Opens with a specific verb and resource ("Find text inside files") and immediately scopes it to content search with literal or regex matching, which is distinct from a filename-oriented sibling like search_files. It does not explicitly name that sibling or state the contrast, so it falls short of the top tier.

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?

Gives clear operative conditions: use regex=true for per-line JavaScript regex, otherwise the query is literal; pass a folder or a single file as path; use filePattern to narrow to a glob such as *.js. It stops short of explicit when-not guidance, such as directing filename lookups to search_files, so there is no exclusion rule.

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.

Resources