Skip to main content
Glama

Search files

fs_search
Read-onlyIdempotent

Use this when the user wants to find text in the files of an approved project. Returns matching files and lines. Read-only. Needs the sessionId from execution_session_open and a new operationId; each call is metered as one execution. A short result is returned inline within about two seconds; otherwise keep the returned IDs for operation_status and operation_output and do not resend the call.

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": {
      "sessionId": "<sessionId>",
      "operationId": "<operationId>",
      "query": "<query>"
    },
    "name": "fs_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoPath relative to the selected project root (or the workspace root without a project target); omit for the root.
queryYesText to search for
sessionIdYesexecutionSessionId returned by execution_session_open
deadlineAtNoOptional UTC admission deadline at most 60 seconds ahead (queue start timeout, NOT process execution lifetime)
maxResultsNoMaximum matches returned, 1-300 (default 100)
operationIdYesA new random UUID v4 for this call; reuse it only to retry this same call
caseSensitiveNoMatch letter case (default false)
idempotencyKeyNoOptional retry key, 8-128 chars of [A-Za-z0-9._:-]; defaults to operationId
efficiencyProfileNoOptional, unverified label of the client's model, recorded as display metadata in the device owner's local activity statistics. Omit when unknown. Never send credentials or conversation content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / deadlineAt / pattern
      Previous value: -"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"New value: +"Z$"
    • removedInput schema / properties / operationId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / sessionId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (which already cover readOnly, idempotent, non-destructive), the description discloses cost metering (one execution per call), a latency contract (inline result in about two seconds), and the asynchronous fallback with returned IDs plus a warning not to resend. These are exactly the operational traits an agent cannot infer from structured fields.

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?

Five short sentences, front-loaded with the use case, with no filler. "Read-only" slightly duplicates the readOnlyHint annotation, but the remaining sentences each carry distinct information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nine-parameter read tool with no output schema, the description covers prerequisites, cost, return shape, timing, and the async continuation path. An agent has everything needed to call it correctly and handle both the inline and deferred outcomes.

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 including path, query, deadlineAt, maxResults, and efficiencyProfile is already documented in the schema. The description only highlights sessionId provenance and the operationId requirement, both of which the schema already states, so it adds little meaning beyond the structured data.

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?

"Find text in the files of an approved project" gives a specific verb (find text) and resource (project files), and "Returns matching files and lines" clarifies it is a content search rather than a file listing or full read. It does not name fs_read or fs_list as the alternatives it is not, so the differentiation is implied rather than explicit.

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 states a clear triggering condition (user wants to find text in project files) and adds operational guidance: obtain sessionId from execution_session_open, generate a new operationId, and poll operation_status/operation_output instead of resending. It does not contrast with any sibling tool for the case where the agent has a path and just wants contents.

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.