Skip to main content
Glama

Read a file from a deployed site

read_file
Read-onlyIdempotent

Return the bytes of one file currently served by the site. Use this to inspect or edit existing content (call read_file → modify → update_site mode:'patch') so a new chat can iterate on a site without re-uploading. Files larger than 5242880 bytes can't be read in one call. Use list of paths from get_site.filePaths to discover what's available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoSite name (subdomain) or custom domain. Same lookup rules as get_site.
pathYesSite-relative path of the file to read (e.g. 'index.html', 'assets/main.css'). No leading slash, no '..'.
siteIdNoAlternative to name. One of name|siteId is required.
maxBytesNoPer-file size cap. Default 1048576, hard max 5242880. If the file is larger, the call fails with FILE_TOO_LARGE rather than returning truncated bytes — splitting source mid-token would corrupt downstream edits.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
pathYesEchoes the input path, normalized (leading slash stripped, backslashes converted).
sizeYesSize in bytes of the file on the pod.
siteIdYes
contentYes
encodingYesHow to interpret `content`. utf8 means the file is text and `content` is the raw text. base64 means the file is binary (image/font/etc.) and `content` is base64 — decode before use.
request_idNoServer-assigned request correlation id. Quote it when contacting support.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Server-assigned request correlation id. Quote it when contacting support.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The description adds significant behavioral context beyond annotations: it specifies the file size cap (5242880 bytes), the failure mode (FILE_TOO_LARGE rather than truncation to avoid corruption), and the workflow dependency on get_site.filePaths. Annotations already indicate readOnlyHint=true, idempotentHint=true, destructiveHint=false, and the description aligns with these, adding useful constraints.

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 description is four sentences with a clear front-loaded purpose: 'Return the bytes of one file currently served by the site.' Each sentence adds value: usage workflow, size limit, and discovery method. No unnecessary words or redundancy.

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?

Given the tool has 4 parameters (1 required), 100% schema coverage, and an output schema (not shown but present), the description covers the essential context: return type (bytes), usage pattern, size limitations, and path discovery. It is complete enough for an agent to select and invoke correctly without additional clarification.

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 baseline is 3. The description does not detail individual parameters beyond what the schema provides, but it adds workflow context (e.g., 'use list of paths from get_site.filePaths' for the path param) and clarifies the maxBytes behavior. This is adequate but not exceptional.

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?

The description clearly states 'Return the bytes of one file currently served by the site.', identifying the verb 'return' and resource 'bytes of one file'. It distinguishes from sibling tools like read_files (plural) and read_source_file by emphasizing 'one file' and the deployment context, and it references get_site.filePaths for discovery.

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?

The description provides a concrete use case: 'inspect or edit existing content (call read_file → modify → update_site mode:''patch'')' and explains the iterative workflow benefit. It also notes when not to use (for files larger than 5242880 bytes) and recommends using get_site.filePaths for discovery. However, it does not explicitly contrast with other read-related siblings like read_source_file.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools target a distinct resource and action—deploy, file, domain, snapshot, form, analytics—and the descriptions carefully clarify overlap (e.g., deploy_site vs update_site vs begin_deploy). A few pairs like read_file/read_source_file or list_file_hashes/list_source_files could be confused, but the pattern is clear enough to avoid misselection.

Naming Consistency5/5

Every tool follows a consistent verb_noun snake_case pattern (add_, list_, get_, read_, update_, delete_, verify_, etc.), with singular verbs for single resources and plural verbs for batches. This makes the surface highly predictable.

Tool Count2/5

39 tools is well beyond the typical well-scoped surface and many could be consolidated (e.g., read_file/read_files/read_source_file/read_source_files, or the multiple deploy entry points). The broad domain explains some of the count, but the set feels bloated and will slow tool selection.

Completeness3/5

The core deploy lifecycle is well covered: create/read/update/delete sites, patch files, manage custom domains, and configure forms. However, there are notable gaps—snapshots can be created and listed but not restored or deleted, and there is no explicit rollback-to-previous-deploy mechanism, which are common expectations for a deployment platform.