Skip to main content
Glama

get_site_files

Read-only

Read the files of a site you already published, so you can make a targeted edit instead of rebuilding the whole site from memory. Returns a complete manifest (every file's path, size, content-type, sha256) plus the contents of the text files (HTML/CSS/JS/etc). Also returns the site's current version - pass it back to update_site_file so you don't overwrite a newer change. Pass paths to fetch only specific files; omit it to get all text files. Requires site_id + edit_token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsNoOptional. Specific file paths to return contents for (e.g. ['index.html','style.css']). Omit to get all text files. The manifest always lists every file regardless.
site_idYesThe site id returned at publish time.
edit_tokenYesThe edit token returned at publish time.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe live URL of the site.
filesYesInlined contents of the requested text files (default: all text files, capped for size).
site_idYesThe site's slug / id.
versionYesThe site's current version - pass as expected_version to update_site_file to avoid clobbering.
manifestYesEvery file on the site (always complete, regardless of which contents were inlined).
truncatedYestrue if some requested file contents were omitted for size - request specific paths to read them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / files / items / properties / encoding / description
      Previous value: -"Always 'utf-8' — only text files are inlined."New value: +"Always 'utf-8' - only text files are inlined."
    • changedOutput schema / properties / truncated / description
      Previous value: -"true if some requested file contents were omitted for size — request specific paths to read them."New value: +"true if some requested file contents were omitted for size - request specific paths to read them."
    • changedOutput schema / properties / version / description
      Previous value: -"The site's current version — pass as expected_version to update_site_file to avoid clobbering."New value: +"The site's current version - pass as expected_version to update_site_file to avoid clobbering."
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "files": {
      +      "description": "Inlined contents of the requested text files (default: all text files, capped for size).",
      +      "items": {
      +        "properties": {
      +          "content": {
      +            "description": "Full text content of the file.",
      +            "type": "string"
      +          },
      +          "encoding": {
      +            "description": "Always 'utf-8' — only text files are inlined.",
      +            "enum": [
      +              "utf-8"
      +            ],
      +            "type": "string"
      +          },
      +          "path": {
      +            "description": "Path of this file under the site root.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "path",
      +          "content",
      +          "encoding"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "manifest": {
      +      "description": "Every file on the site (always complete, regardless of which contents were inlined).",
      +      "items": {
      +        "properties": {
      +          "content_type": {
      +            "description": "Stored content-type, e.g. 'text/html'.",
      +            "type": "string"
      +          },
      +          "is_text": {
      +            "description": "Whether the file is a text type eligible to have its content inlined.",
      +            "type": "boolean"
      +          },
      +          "path": {
      +            "description": "Path under the site root, e.g. 'index.html'.",
      +            "type": "string"
      +          },
      +          "sha256": {
      +            "description": "Hex sha256 of the file bytes; null if not recorded for this file.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "size_bytes": {
      +            "description": "File size in bytes.",
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "path",
      +          "size_bytes",
      +          "content_type",
      +          "sha256",
      +          "is_text"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "site_id": {
      +      "description": "The site's slug / id.",
      +      "type": "string"
      +    },
      +    "truncated": {
      +      "description": "true if some requested file contents were omitted for size — request specific paths to read them.",
      +      "type": "boolean"
      +    },
      +    "url": {
      +      "description": "The live URL of the site.",
      +      "type": "string"
      +    },
      +    "version": {
      +      "description": "The site's current version — pass as expected_version to update_site_file to avoid clobbering.",
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "site_id",
      +    "version",
      +    "url",
      +    "manifest",
      +    "files",
      +    "truncated"
      +  ],
      +  "type": "object"
      +}
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark this read-only and non-destructive, yet the description adds real value beyond them: it discloses auth requirements (site_id + edit_token), the optimistic-concurrency contract (pass version back so you don't overwrite a newer change), and the sha256 manifest for change detection.

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?

Four tight sentences, front-loaded with purpose followed by return shape, the paths toggle, and prerequisites. No filler; every sentence carries decision-relevant information.

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?

For a three-parameter read tool with full schema coverage, an output schema, and read-only annotations, the description plus structured fields leave nothing an agent needs missing: it covers auth, return contents, filtering semantics, and the version handoff.

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 coverage is 100% so the baseline is 3, but the description clarifies behavior the schema only states in passing: paths selects contents only while the manifest always lists every file, and edit_token/site_id are mandatory. It adds the semantic link to update_site_file's version parameter.

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 and resource ('Read the files of a site you already published') and immediately frames the goal (make a targeted edit instead of rebuilding). It is clearly distinguishable from sibling update_site_file, which is the write counterpart referenced by name.

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 when-to-use context (read before editing) and explains the paths-optional behavior versus omitting it. It references update_site_file and the version handoff, but never states explicit exclusions or when another sibling like deploy would be preferred.

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.