Skip to main content
Glama

read_html_file

Read HTML files from a workspace's resources/html/ folder, using startLine/endLine to page through large files. Results include totalLines to help navigate the document.

Instructions

Read one file inside an HTML tool folder (paths under resources/html/ only). For large files, pass startLine/endLine to read a range — the result always includes totalLines. The injected design-system baseline appears as a one-line placeholder comment; never edit it.

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": {
      "workspacePath": "<workspacePath>",
      "filePath": "<filePath>"
    },
    "name": "read_html_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
endLineNoLast line to return (1-based, inclusive). Omit to read to the end.
filePathYesFile path relative to the workspace root (e.g. "resources/html/my-tool/index.html")
startLineNoFirst line to return (1-based, inclusive). Omit to start from the beginning.
workspacePathYesAbsolute path to the workspace directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.19.0
    • addedInput schema / properties / endLine
      Added value: +{
      +  "description": "Last line to return (1-based, inclusive). Omit to read to the end.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / startLine
      Added value: +{
      +  "description": "First line to return (1-based, inclusive). Omit to start from the beginning.",
      +  "type": "integer"
      +}
  2. First observedv0.6.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses that the result always includes totalLines and that the injected design-system baseline appears as a one-line placeholder comment, but it never states read-only safety, permission requirements, or error behavior for invalid or out-of-scope paths.

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?

Three tight sentences with the path constraint front-loaded, then the range guidance, then the baseline caveat. Little waste, though the 'never edit it' clause is slightly tangential for a read tool.

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 four-parameter read tool with no output schema, the description covers scope, range paging, and the key return field plus a notable caveat. Remaining gaps are minor: no note on read-only semantics or failure modes for invalid paths.

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 all four parameters are already documented. The description reinforces the range parameters and adds the totalLines return context, but adds no syntax or format detail beyond the schema — baseline 3 applies.

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?

States a specific verb (read) and resource (a file in an HTML tool folder) and scopes it with 'paths under resources/html/ only', which implicitly separates it from the broader read_document/read_sheet siblings. It stops short of naming an alternative outright, so it is clear but not maximally differentiated.

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?

Gives one concrete usage cue — pass startLine/endLine for large files — but offers no when-not guidance and does not route the agent to replace_in_html_file or write_html_file for edits. Usage is implied by the read-only framing rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.