Skip to main content
Glama

file_read

Read files under configured allowed paths, optionally from a target host or only the last N lines, to inspect server data through opsgate's policy gate.

Instructions

Read a file under one of the configured allowed paths (see files.allow_paths).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNotarget host name from the opsgate config; omit for the default host
pathYesabsolute path of the file to read
linesNoread only the last N lines instead of the whole file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose a meaningful trait — reads are sandboxed to configured allowed paths — which is genuine context beyond the schema. It says nothing about large-file behavior, encoding, truncation, or error cases, so gaps remain for a tool with zero annotation coverage.

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?

A single front-loaded sentence that names the action and the key constraint with zero filler. Nothing in it is redundant with the title or schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple three-parameter read with full schema coverage and no output schema, the core is covered. The absence of any behavioral notes on file size, encoding, or failure modes leaves the definition merely adequate given there are no annotations to fill those gaps.

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 host, path, and lines are all documented in the schema itself; the description adds no format or syntax detail beyond that. Baseline 3 is appropriate when the schema does the heavy lifting.

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 and resource ('Read a file') and adds the scoping constraint of configured allowed paths. It does not explicitly contrast with siblings like file_grep or dir_list, but the verb/resource is unambiguous enough that an agent can distinguish a plain read from a content search or a directory listing.

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?

The description implies when the tool is applicable via the 'allowed paths' constraint (see files.allow_paths), which is a real precondition. However, it gives no guidance on when to prefer file_read over file_grep for content lookups, nor any exclusion conditions, so usage is only implied.

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