Skip to main content
Glama

Read Site File

read_site_file
Read-onlyIdempotent

Read the content of a single file on a site. Use mode: 'inline' to get the file content directly (text as UTF-8, binary as base64). Use mode: 'link' to get a short-lived authenticated download URL instead — useful for large files or when passing the URL to another tool. Use mode: 'auto' (default) to inline files under 100 KB and return a link for larger ones. Inline reads are capped at 1 MB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoinline: return file content directly (UTF-8 or base64; files over 1 MB are refused). link: return a presigned download URL valid for 1 hour. auto: inline if the file is ≤ 100 KB, otherwise return a link. Default is 'auto'.auto
pathYesFile path relative to site root, e.g. 'index.html' or 'assets/logo.png'.
site_idYesThe site's public identifier returned by list_sites or create_site.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentNo
encodingNo
expires_atNo
size_bytesYes
content_typeYes
download_urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the read-only and non-destructive annotations by disclosing encoding behavior (UTF-8 vs base64), a hard 1 MB inline cap, the short-lived authenticated link semantics, and size-based mode switching. This gives an agent a complete behavioral model for invoking the tool.

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?

One-purpose sentence followed by compact, imperative mode instructions. Every sentence carries information about behavior or thresholds, and there is no filler or unnecessary repetition of schema fields.

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?

Covers all caller-relevant behaviors: modes, size thresholds, link lifetime, and binary/text encoding. With an output schema present and annotations indicating a safe read-only, idempotent operation, nothing critical is missing for an agent to select and invoke this tool correctly.

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

Parameters4/5

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

The input schema already has 100% parameter coverage, including full descriptions of the mode enum, so the baseline is high. The description adds useful context such as the large-file rationale and the 'passing the URL to another tool' use case, which helps an agent pick the right mode.

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 the operation precisely: 'Read the content of a single file on a site.' The verb, resource, and single-file scope clearly differentiate it from sibling tools like list_site_files, write_site_files, and delete_site_files. The mode options also make its behavior distinct.

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?

Provides explicit guidance for choosing among 'inline', 'link', and 'auto', including the 100 KB auto threshold and the large-file/pass-to-another-tool rationale for link. It does not explicitly name sibling tools as alternatives, but the single-file read scope and detailed mode guidance make the intended context clear.

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