Skip to main content
Glama
PatrickSekey

MCP Filesystem Server

by PatrickSekey

search_in_file

Find a query inside a file and return matches with surrounding context. Use it to locate specific content, with case-sensitive and max result options.

Instructions

Search for a query inside a file, returning matches with context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
file_pathYesFile to search
max_resultsNoMaximum matches to return
context_linesNoLines of context around each match
case_sensitiveNoCase-sensitive search

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that matches are returned with context, which is behavioral value, but says nothing about read-only nature, behavior on no matches, large/binary file handling, or whether the query is literal versus a regex/pattern.

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?

A single front-loaded sentence with no filler: verb, resource, and output shape. Every clause earns its place.

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?

With no annotations and no output schema, the description covers the essentials but leaves gaps an agent would want: matching semantics (literal vs regex), what happens when nothing matches, and how very large files are handled. Adequate, not complete.

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% and all five parameters (query, file_path, max_results, context_lines, case_sensitive) carry their own descriptions with defaults. The description adds no syntax, matching-mode, or default information beyond the schema, so the baseline of 3 is correct.

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 (search), resource (a file), and the key input (a query), plus the shape of the result. An agent can tell it apart from read_file and list_files by the search semantics, though no sibling is named explicitly.

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 by the name and description — find text within one file — but there is no explicit when-to-use guidance, no mention of when read_file (fetch the whole file) or batch_process (multi-file scanning) would be preferable, and no preconditions such as the file needing to exist.

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