Skip to main content
Glama

Read a site or preview file

read_site_file
Read-only

Read a text file (≤1 MB) from a site (siteId) or a preview (previewId) — pass exactly one. Useful before editing with update_site / update_preview.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
siteIdNo
previewIdNoPreview id, to read from a preview instead of a site

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / previewId
      Added value: +{
      +  "description": "Preview id, to read from a preview instead of a site",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "siteId",
      -  "path"
      -]New value: +[
      +  "path"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds the ≤1 MB size limit and the exclusivity requirement ('pass exactly one'), which are behavioral constraints beyond the schema. It does not mention what happens if the file is missing or exceeds the limit, but the core behavior is transparent.

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?

Two sentences with no filler. The core action, size limit, parameter choice, and usage context are all front-loaded and each sentence earns its place.

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 a simple read tool with readOnlyHint=true and no output schema, the description covers the essential selection criteria and constraints. It could mention what happens on error or whether the file must be text, but the ≤1 MB and 'text file' qualifiers already provide adequate context for an agent to invoke it 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?

Schema description coverage is only 33% (only previewId has a description). The description compensates by explaining the roles of siteId and previewId ('from a site (siteId) or a preview (previewId)') and the exclusivity rule. The path parameter is still undocumented, but its meaning is self-evident from the tool name and description.

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 states a specific verb ('Read'), a resource ('a text file from a site or preview'), and a size constraint (≤1 MB). It also distinguishes itself from siblings by naming update_site / update_preview as the follow-up tools, and the 'pass exactly one' instruction clarifies the siteId/previewId choice.

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 explicitly says to pass exactly one of siteId or previewId, and notes it is useful before editing with update_site / update_preview. It does not explicitly list when NOT to use it or name alternative read tools like get_site_files, but the context is clear enough for an agent to select it for reading a single 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.

Resources