Skip to main content
Glama

project_file_read

Read-onlyIdempotent

Read the raw source of a single deployed file. Returns the actual bytes that were uploaded — not DOM-rendered HTML, not a screenshot. Static files come back as UTF-8 text; binary files (images, fonts, etc.) come back base64-encoded; server functions return their source code.

project_files_list lists available paths; project_export returns the full project.

Example:

{ "project_id": "my-saas", "path": "styles.css" }
// Returns: { project_id, env: "prod", path: "styles.css", type: "static", content: "body { ... }", encoding: "utf-8" }

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": {
      "project_id": "<project_id>",
      "path": "<path>"
    },
    "name": "project_file_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNoWhich environment to read from. Defaults to "prod" (live). Explicit "dev" requires hosted preview access for signed-in accounts on every plan.
pathYesFile path relative to the project root (e.g. "index.html", "api/checkout.mjs", "assets/hero.jpg").
versionNoRead this retained production version by number. Omit env or use env:prod.
preview_idNoExact current candidate of preview_session_id. Both fields are required together.
project_idYesProject ID, slug, subdomain, or 'default'.
preview_session_idNoExact open preview session paired with preview_id and env:"dev". It does not fall back to another source.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / version
      Added value: +{
      +  "description": "Read this retained production version by number. Omit env or use env:prod.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
  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 and idempotentHint, so the safety profile is covered; the description adds genuinely new behavioral context by explaining that output encoding varies by file type and that server functions yield source code. It stops short of covering failure modes (missing path, unauthorized env) or the effect of the env/preview selectors, which is why it isn't a 5.

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 core behavior is front-loaded in the first sentence, the sibling routing follows, and the example earns its space by showing the return shape that no output schema provides. Minor nit: the example uses a `//` comment, making it non-strict JSON, but no sentence is wasted.

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 six-parameter read tool with no output schema, the description adequately covers what comes back and how to route around it. The complex selectors (version vs env vs preview pair) are left entirely to the schema, which is acceptable at 100% coverage but leaves the description silent on mutually exclusive source selection.

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 every parameter including the preview_id/preview_session_id pairing is already documented structurally; this is the baseline case. The worked example reinforces correct usage of project_id and path but adds no semantics about version, env, or the preview pair that the schema doesn't already state.

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?

"Read the raw source of a single deployed file" gives a specific verb plus resource, and the following sentence sharpens it by excluding what the tool is not (DOM-rendered HTML, screenshots), which separates it from project_screenshots-style siblings. The return-type breakdown (UTF-8 text / base64 / function source) makes the tool's identity unmistakable without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly routes the agent: `project_files_list` for available paths, `project_export` for the full project. Those are concrete alternatives with the condition that selects them, so an agent knows when not to use this tool as well as when to.

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