Skip to main content
Glama

Read site files

files_read
Read-onlyIdempotent

Lists files and folders of the site file manager, returns file info and quota, reads text files. Do not read files with secrets (.env, files with passwords or keys) and do not ask the user for their content.

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": {
      "action": "<action>"
    },
    "name": "files_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoList page, from 1.
pathNoClean path without edge slashes, passed as a parameter (never as a URL suffix). Empty string is the site root; content_get, content_put and mkdir need a non-empty path. Allowed bytes are A-Z a-z 0-9 . _ / -; segments cannot be empty, ".", "..", or start with a dot. Folder for list, info, upload, upload_url and move; file for content_get and content_put; new folder for mkdir; source for rename, move and delete.
sortNolist: name (default), size, or mtime. Anything else is treated as name.
limitNolist: the earlier name of per_page; per_page wins when both are set, and 0 counts as not set.
orderNolist: asc (default). Only desc changes direction.
actionYesOperation to run. Each oneOf entry describes one action and lists its parameters.
detailNoRecord form of a paged list. brief (default): name, path, type, size, objects in a folder and modification time (UTC, ISO 8601). Titles and excerpts are plain text; names, logins, paths, URLs and other identifiers are as the source gives them. full: complete records. A list reply is at most 30 KB and holds every record of its page: a record that does not fit in full comes in brief form, marked detail brief, the reply counts such records in brief_records, and get by id returns the complete record; brief records shorten their excerpts, then keep only their ids and titles. Only a page that does not fit even so is cut: truncated is true and next names the offset to go on from.
filterNolist: a quota.limits.filters name, or a comma-separated extension list (png,jpg). Unknown names are ignored.
offsetNoRecords to skip from the start of a list; overrides page. A list reply cut at its size limit names the offset that follows in next.
site_idNoSite to read: site_id from list_sites. Without it the call reads the site chosen with select_site; pass it when several sites or chats are in use.
per_pageNoRecords per page: 1-50, 20 by default, larger values count as 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / site_id
      Added value: +{
      +  "description": "Site to read: site_id from list_sites. Without it the call reads the site chosen with select_site; pass it when several sites or chats are in use.",
      +  "type": "integer"
      +}
  2. Changed6 schema fields changed
    • changedInput schema / properties / action / oneOf
      Previous value: -[
      -  {
      -    "const": "list",
      -    "description": "Lists a folder of the site file manager (default: site root, sorted by name, no filter). Optional: path, filter, sort, order, offset, limit."
      -  },
      -  {
      -    "const": "info",
      -    "description": "Returns information about a file or folder. Optional: path."
      -  },
      -  {
      -    "const": "quota",
      -    "description": "Returns the disk quota and the upload limits (size, allowed filters)."
      -  },
      -  {
      -    "const": "content_get",
      -    "description": "Reads a text file. Other files come back as FM_NOT_TEXT or FM_TOO_LARGE_TO_READ. Required: path."
      -  }
      -]New value: +[
      +  {
      +    "const": "list",
      +    "description": "Lists a folder of the site file manager (default: site root, sorted by name, no filter) a page at a time. Brief entries by default; detail=full gives complete entries. The reply has page, per_page, total, has_more, truncated and next. Optional: path, filter, sort, order, page, per_page, offset, detail, limit."
      +  },
      +  {
      +    "const": "info",
      +    "description": "Returns information about a file or folder. Optional: path."
      +  },
      +  {
      +    "const": "quota",
      +    "description": "Returns the disk quota and the upload limits (size, allowed filters)."
      +  },
      +  {
      +    "const": "content_get",
      +    "description": "Reads a text file. Other files come back as FM_NOT_TEXT or FM_TOO_LARGE_TO_READ. Required: path."
      +  }
      +]
    • addedInput schema / properties / detail
      Added value: +{
      +  "description": "Record form of a paged list. brief (default): name, path, type, size, objects in a folder and modification time (UTC, ISO 8601). Titles and excerpts are plain text; names, logins, paths, URLs and other identifiers are as the source gives them. full: complete records. A list reply is at most 30 KB and holds every record of its page: a record that does not fit in full comes in brief form, marked detail brief, the reply counts such records in brief_records, and get by id returns the complete record; brief records shorten their excerpts, then keep only their ids and titles. Only a page that does not fit even so is cut: truncated is true and next names the offset to go on from.",
      +  "enum": [
      +    "brief",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"list: slice length. 0 (default) means the rest of the listing."New value: +"list: the earlier name of per_page; per_page wins when both are set, and 0 counts as not set."
    • changedInput schema / properties / offset / description
      Previous value: -"list: slice start after sorting. Default 0."New value: +"Records to skip from the start of a list; overrides page. A list reply cut at its size limit names the offset that follows in next."
    • addedInput schema / properties / page
      Added value: +{
      +  "description": "List page, from 1.",
      +  "type": "number"
      +}
    • addedInput schema / properties / per_page
      Added value: +{
      +  "description": "Records per page: 1-50, 20 by default, larger values count as 50.",
      +  "type": "number"
      +}
  3. Added

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already establish read-only, idempotent, non-destructive, closed-world behavior, so the description adds value mainly through the security constraint against reading secret-bearing files and requesting their contents from the user. It does not add auth, rate-limit, or truncation details, but the central safety behavior is disclosed.

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?

The definition is two compact sentences: the first front-loads the three main read behaviors, and the second adds a clear security restriction. There is no filler or repetition.

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?

For an 11-parameter, action-based tool with no output schema, the description covers the high-level capabilities and an important safety policy, while the schema supplies detailed action, parameter, pagination, and return-value semantics. It is largely complete, though it does not explicitly route among sibling read tools.

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 the action enum and each parameter are already richly documented in the schema. The description does not add syntax or constraints beyond what the schema provides, making the baseline of 3 appropriate.

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?

The description names concrete read capabilities: listing files/folders, returning file info and quota, and reading text files in the site file manager. It is clearly a read tool and distinguishes itself from write/delete siblings by scope, though it does not explicitly contrast itself with content_read or other read siblings.

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?

It gives one explicit when-not rule: do not read files containing secrets such as .env, passwords, or keys, and do not ask the user for their content. Use is otherwise implied by the listed capabilities, with no explicit routing guidance to or away from sibling tools.

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.