Skip to main content
Glama

Read draft file

read_draft_file
Read-onlyIdempotent

Read a file in a Fudge draft: a theme file, a theme folder listing, or a content document under .entities (list with .entities/product?query=…). Each line starts with a gutter ending at its first tab, numbered on the first, last and every tenth line; long files return line_offset. Theme files return a revision. Append #info to see where a theme file is used.

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": {
      "draft": "<draft>",
      "path": "<path>"
    },
    "name": "read_draft_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesA theme file such as sections/main-product.liquid or templates/product.json, or a content document such as .entities/product/123.jsonc or .entities/page/45.body.html.
draftYesThe draft’s fudge://project/… ref.
storeNoThe connected store to use. Omit when only one is connected.
line_limitNoLines to return. Omit to read up to the limit.
char_offsetNoCharacter offset within a very long first line, only when the result says to continue with one.
line_offsetNo0-based line to start from, from a previous read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With annotations already declaring readOnly/idempotent/non-destructive, the description goes further and discloses the actual response shape: a tab-terminated gutter, numbering on first/last/every tenth line, `line_offset` on long files, `revision` for theme files, and the `#info` suffix for usage lookup. These are non-obvious behaviors an agent would otherwise have to discover by trial, though error/not-found behavior is not covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core 'read a file in a draft' statement, then dense but useful detail. Every clause carries information (gutter format, offsets, revision, #info), though the line-numbering sentence is packed enough to require a second read.

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?

Six parameters with no output schema means the description must carry return-shape burden, and it does so unusually well by explaining the gutter and pagination fields. Gaps remain around failure modes and size limits, but for a read-only file accessor an agent has what it needs to call and parse correctly.

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 coverage is 100%, so the description baselines at 3. It does add a bit beyond the schema by explaining the '#info' path convention and the .entities listing path form, but it does not clarify the interaction between line_limit, line_offset, and char_offset, which the schema handles alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource and enumerates exactly what 'file' means here: a theme file, a theme folder listing, or a content document under .entities. The phrase 'in a Fudge draft' implicitly separates it from store-side readers like read_store_document, but no sibling is actually named, so differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

Usage is only implied: the '.entities/product?query=…' parenthetical hints at how to discover paths before reading, and the schema notes when to omit optional offsets. There is no explicit guidance on when to reach for this versus search_draft_files, edit_draft_file, or read_store_document.

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.