Skip to main content
Glama

read_file

Retrieve source code from any repository file without shelling out. Specify repo-relative path and optional offset/max_lines to paginate large files.

Instructions

Read an arbitrary source file from a repository without shelling out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRepo-relative file path, e.g. src/ir/pass_manager.py or python/pypto/ir/ops.py
repoYesRepository name from list_repositories(), e.g. "pypto"
offsetNoZero-indexed line to start reading from (for pagination)
max_linesNoMaximum lines to return (1–2000)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses a meaningful behavioral trait: the tool reads files directly instead of shelling out, avoiding command execution side effects. It also states 'arbitrary' to indicate broad file access, though it does not discuss pagination or error behavior.

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 well-structured sentence, front-loaded with the action and resource, and no wasted words. Every phrase ('arbitrary', 'without shelling out') adds value.

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 straightforward file-read tool with a detailed input schema and an output schema, the description is sufficient to understand primary use. It could more explicitly differentiate from document-reading and search siblings, but the current wording is not misleading and covers the essential context for correct invocation.

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 descriptions cover 100% of the parameters with examples, defaults, and constraints, so the description adds little beyond the schema. It provides context (source file, repository) but no field-level semantic detail beyond what the schema already offers.

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 uses a specific verb ('Read'), a concrete resource ('arbitrary source file'), and a scope ('from a repository'). The qualifier 'without shelling out' distinguishes it from shell-based tools like run_command, making the purpose immediately clear.

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 appropriate use for direct, non-shell file reads and excludes shell execution as a mechanism. However, it does not explicitly name sibling alternatives (e.g., read_doc for documentation or search_code for searching), so it stops short of full alternative guidance.

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/georgebisbas/mcp-hw-native-sys'

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