Skip to main content
Glama

search_files

Read-onlyIdempotent

Search Nextcloud files by name or MIME type recursively, returning results sorted by last modified date.

Instructions

Search for files in Nextcloud by name and/or MIME type.

Searches recursively through all subdirectories of the given path. Results are sorted by last modified date (newest first).

At least one of query or mimetype must be provided.

Args: query: Text to find anywhere in the file name, case-insensitive, taken literally (% and _ are not wildcards). Example: "report" matches "quarterly-report.pdf", "report-2026.docx". path: Directory to search in (default: "/" for entire user folder). Example: "Documents" to only search in Documents. mimetype: Filter by MIME type prefix. Example: "image" for all images, "application/pdf" for PDFs, "text" for all text files. limit: Maximum number of results (1-100, default: 20). offset: Number of results to skip for pagination (default: 0).

Returns: JSON object with "data" (list of matching files) and "pagination" (count, offset, limit, has_more).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo/
limitNo
queryNo
offsetNo
mimetypeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered. The description adds genuinely useful behavior beyond that: recursive subdirectory traversal, newest-first sorting, and the pagination envelope (count/offset/limit/has_more) with defaults for limit/offset.

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-loaded with purpose then the two key operating facts (recursion, sort) before an Args/Returns breakdown. Dense but disciplined; every line adds information, though the Args block repeats parameter names already visible in the schema.

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?

Covers purpose, precondition, recursion, sorting, per-parameter semantics, and the return shape even though an output schema exists. Complete for an agent to invoke correctly; only the lack of explicit sibling routing keeps it from being fully exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does so: it explains query is a literal, case-insensitive substring (with the important note that % and _ are NOT wildcards), path defaults to the user root, mimetype is a prefix match, and limit/offset define pagination. Concrete examples disambiguate the prefix and substring semantics.

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 (Search) and resource (files) plus scope (by name and/or MIME type), and the sibling set contains related-but-distinct tools like list_directory, get_file, and unified_search. An agent can immediately identify this as the name/MIME file finder.

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 operating context: recursive traversal, sort order, and the hard precondition 'At least one of query or mimetype must be provided.' It does not, however, explicitly name alternatives such as unified_search or list_directory, leaving the agent to infer when this tool beats them.

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

Deploy Server

Other Tools