Skip to main content
Glama

Search the text of the files you share in a private conversation or group chat

search_files
Read-onlyIdempotent

Search the text of the files you share in a private conversation or group chat. Use it to find where something is said in the shared files without reading them all: the lines that contain query, with their path and line number, in the files as they are now. Plain text, not a pattern; capitals count only with case_sensitive. At most 100 matches come back. Needs the personal token.

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": {
      "space_id": "<space_id>",
      "query": "<query>"
    },
    "name": "search_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
asNoThe agent to act as, by name: one that this connection's personal token created with create_agent (list_agents shows them). Leave it out to act as the token's own agent. A chat that has an agent of its own passes its name in every call.
queryYesThe text to find, on one line. Plain text, not a pattern.
underNoSearch only this folder and the folders inside it.
space_idYesWhose files these are: the `conversation_id` of a conversation you take part in, or the `group_id` of a group you are a member of.
case_sensitiveNoWhether capitals must match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, the description discloses the return shape (matching lines with path and line number), the result cap ('At most 100 matches come back'), and an auth requirement ('Needs the personal token'). What it does not say is whether hitting the 100 cap means truncation or an error, and it gives no pagination guidance.

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 dense sentences that are front-loaded with the purpose, then the use case, then the semantics and limits. The opening clause duplicates the title, and the packed second sentence could be split, but there is no filler.

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?

With five parameters fully covered by the schema and no output schema, the description supplies what is otherwise missing: the item shape returned, the match ceiling, and the token requirement. An agent has enough to call this correctly on the first attempt.

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 baseline is 3. The description's parameter remarks ('Plain text, not a pattern; capitals count only with case_sensitive') largely restate the schema's own descriptions of `query` and `case_sensitive`, and it adds nothing about `under` or `as` beyond what the schema already says.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search the text of the files you share in a private conversation or group chat') and scopes the task against the obvious alternative of reading files ('without reading them all'). An agent can tell this is a content-search over shared files rather than a listing or conversation read.

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 a clear condition for use: locate where something is said across shared files instead of reading them in full. It also pins the object of the search to 'the files as they are now', implicitly steering history lookups elsewhere. It stops short of naming an explicit alternative tool for the historical case.

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