Skip to main content
Glama
Claude File Manager MCP

Claude File Manager MCP

by wafuv

Search text inside files

search_content

Searches for a string or regular expression inside text files and returns file:line: text. Binary and large files are skipped.

Instructions

Searches for a string or regular expression inside text files and returns file:line: text. Binary and large files are skipped.

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_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoWhere to search.
typeNoFile type shortcut, e.g. `js`, `ts`, `python`, `go`, `rust`, `md`
queryYesString or regular expression
ignoreNoAdditional names/globs to skip
offsetNoSkip this many first matches (content) or files (files/count) for pagination
outputNocontent — matching lines with context; files — matching files with counts; count — one line per filecontent
includeNoFile glob, e.g. `*.js` or `src/**/*.ts`
is_regexNoTreat query as a regular expression
files_onlyNoDeprecated: use output="files". Only list matching files with their match counts
max_resultsNoMaximum number of matches
context_linesNoShow this many lines before and after each match
max_file_sizeNoSkip files larger than this size (bytes)
case_sensitiveNoMatch case

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.5.1
    • changedInput schema / properties / files_only / description
      Previous value: -"Only list matching files with their match counts"New value: +"Deprecated: use output=\"files\". Only list matching files with their match counts"
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Skip this many first matches (content) or files (files/count) for pagination",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / output
      Added value: +{
      +  "default": "content",
      +  "description": "content — matching lines with context; files — matching files with counts; count — one line per file",
      +  "enum": [
      +    "content",
      +    "files",
      +    "count"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / type
      Added value: +{
      +  "description": "File type shortcut, e.g. `js`, `ts`, `python`, `go`, `rust`, `md`",
      +  "type": "string"
      +}
  2. First observedv1.3.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose two real behaviors: binary and oversized files are skipped, and results are formatted as `file:line: text`. It omits ordering of results, whether ignore files like .gitignore are honored, read-only safety, and how offset/max_results interact for pagination — significant gaps for a 13-parameter tool.

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 sentences, front-loaded with the core action and followed by the two behavioral caveats that matter most. Nothing is wasted and nothing is buried.

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?

The return format partially compensates for the missing output schema, but a 13-parameter search tool with no annotations needs more: the interaction between output modes, max_results and offset, and default scope (path defaults to '.') go unmentioned. Adequate to invoke, thin for invoking correctly across modes.

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 100%, so every parameter is already documented in the schema, including the output enum and pagination semantics for offset. The description only echoes the regex and large-file concepts already covered by is_regex and max_file_size, adding no new parameter meaning.

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 ('searches for a string or regular expression inside text files') and pins down the return shape as `file:line: text`, so an agent knows exactly what it gets back. It does not distinguish itself from siblings such as find_files or replace_in_files, which is the only reason it falls 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description never says when to choose this over filename-based tools or its replace_in_files sibling; an agent must infer that from the tool name alone. No prerequisites, no exclusions, and no guidance about the three output modes are given.

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