Skip to main content
Glama

read_file

Read files from disk during penetration testing, auto-detecting type via magic bytes and offering text, hex, or base64 output for binary analysis.

Instructions

Read a file from disk (artifacts, /tmp, /var/tmp, wordlists). Auto-detects file type via magic bytes. path: absolute file path max_bytes: max bytes to read (default 50KB) offset: byte offset to start from as_hex: return content as hex dump as_base64: return content as base64 (for binaries) Returns: file metadata, type detection, content (text/hex/base64)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
as_hexNo
offsetNo
as_base64No
max_bytesNo
Behavior4/5

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

With no annotations, the description carries the burden. It discloses auto-detection of file types via magic bytes, supports multiple output formats (text/hex/base64), and says it returns file metadata. These details go beyond the schema. It does not cover error cases or permission nuances, but for a read operation this is reasonable.

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?

The description is compact, front-loads the primary action, and includes a brief parameter list and return summary. A more structured layout could improve readability, but every sentence adds useful information without fluff.

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?

Given there is no output schema, the description compensates by specifying what is returned (metadata, type detection, content). It covers all parameters and core behavior, making it sufficiently complete for an agent to invoke the tool correctly. Minor omissions like error handling do not detract significantly.

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 explain parameters. It does so for all five params: path, max_bytes (with default 50KB), offset, as_hex, and as_base64, adding clear meaning about their purpose beyond the bare schema types and defaults.

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?

The description clearly states 'Read a file from disk' with a specific resource type and location scope (artifacts, /tmp, /var/tmp, wordlists). It also mentions auto-detection via magic bytes, distinguishing it from other file-related tools like check_binary or list_artifacts.

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?

The description implies when to use it by listing common directories (artifacts, /tmp, /var/tmp, wordlists) and mentions file type auto-detection. It does not explicitly exclude alternatives or mention when not to use, but the context is sufficient given the unique role of reading file content.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Neeraj829784/kali-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server