Skip to main content
Glama

host_file_read

Read a file or list a directory on a remote Linux host, optionally as root via sudo, while secrets like tokens, passwords, and private keys are masked.

Instructions

Read a file on a host (as root when sudo is configured) or list a directory. Secrets (SECRET_KEY, private keys, tokens, passwords) are masked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYeshost name from the inventory (fleet_hosts)
pathYesabsolute path
maxBytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/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 disclose two meaningful, non-obvious traits: root elevation under sudo and automatic masking of secrets (keys, tokens, passwords). It stops short of describing truncation via maxBytes or binary-file/error behavior, but the safety-relevant disclosures are strong.

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?

Two tight sentences, front-loaded with the core action and the mode variation, then the safety note. Every clause carries information and there is no filler.

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 tool with no annotations and no output schema, the description should ideally explain return shape and the effect of maxBytes (truncation), which it omits. The purpose, elevation, and masking details are present, so it is adequate but has clear gaps for a read tool whose output format is undefined.

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 67%: host and path are documented in-schema, while maxBytes has no description anywhere. The description does add meaning by clarifying that path may point to either a file or a directory, but it does not explain maxBytes truncation semantics, leaving the coverage gap unaddressed.

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+resource ('Read a file on a host') and adds a second mode ('or list a directory'), so an agent knows both file and directory paths are valid. It implicitly contrasts with the write-oriented sibling host_file_edit, but never names an alternative explicitly.

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 a conditional execution context ('as root when sudo is configured'), which is useful for predicting behavior. However, it offers no guidance on when to choose this over host_exec, host_copy, or host_file_edit, so the usage boundary is left implied.

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