Skip to main content
Glama

Get File

get_file

Read files from an OpenCart VPS over SSH or DDEV, returning the head or tail of a file with an optional substring filter for inspecting logs and source code.

Instructions

Read a file from the VPS. Path is relative to OpenCart root unless absolute.

By default returns the first max_lines lines (head). Set from_end=True for the last max_lines (tail) — preferred for large logs such as error.log. Optional grep is a fixed substring filter (not a regex). With from_end=True, grep only searches the last ~50k lines so huge logs stay fast; with from_end=False, grep scans the whole file then takes the first max_lines matches (can be slow on very large files). max_lines is capped at 2000. Requires SSH or DDEV.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
grepNo
pathYes
from_endNo
max_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the head/tail default, the 2000-line cap, grep's 50k-line scan window with from_end, and the SSH/DDEV prerequisite. It omits error behavior for missing/unreadable paths and does not explicitly confirm the operation is non-mutating.

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?

Purpose is front-loaded in sentence one, followed by compact behavior rules ordered by parameter relevance. Every sentence conveys a non-obvious constraint; none is filler.

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?

An output schema exists, so return-value shape need not be described. Given a 4-param read tool with no annotations, the description covers scoping, defaults, caps, performance trade-offs, and prerequisites — everything needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does for all four parameters: path resolution rules, grep as fixed substring (not regex) with its scan semantics, from_end's tail behavior, and max_lines' hard cap. This is meaning well beyond the bare types in the schema.

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?

Opening sentence states a specific verb (Read) plus resource (file) plus the scope constraint (VPS, path relative to OpenCart root unless absolute). It is clearly distinguishable from the write_file sibling, which mutates, whereas this reads.

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 a concrete recommendation on when to use from_end=True ('preferred for large logs such as error.log') and warns when grep will be slow. It does not, however, name an alternative tool for reading large logs or state exclusions, so it stops short of full when/when-not routing.

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