Skip to main content
Glama

sage_read_file

Reads files using compression: small files returned exactly, large files as outline with head and line references. Saves context by reducing output size.

Instructions

Read a file with SAGE compression: small files exact, large files as outline + head with line references. Prefer this over cat/type/Get-Content to save context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNoReturn exact full content
pathYesFile path to read
linesNoOptional exact range START:END, e.g. 120:220
symbolsNoReturn only the symbol outline
max_tokensNoToken budget for large files
Behavior3/5

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

Describes compression strategy but omits details like what 'outline + head with line references' means exactly. No annotation support, so description carries full burden; lacks clarity on return format and side-effect-free read 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?

Two concise, front-loaded sentences with no redundancy. Every sentence adds value: first explains core function, second gives usage guidance.

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?

Given no output schema and no annotations, description should explain return format and behavior more thoroughly. Mentions compression but lacks specifics on what 'exact' and 'outline + head' means for large files. Adequate but not comprehensive.

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 covers 100% of parameters with descriptions. Description adds context on overall behavior but does not enhance meaning of individual parameters beyond schema. Baseline 3 is appropriate.

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?

Description clearly states it reads files with SAGE compression, specifying behavior for small vs large files. Distinguishes from generic file readers like cat/type/Get-Content, implying it's the preferred tool for reading files in this context.

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?

Explicitly advises preferring this over cat/type/Get-Content to save context, giving a clear use case. Does not explicitly exclude alternatives like sage_show_raw, but context implies it's for compression benefits.

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/PsYcGoD/sage'

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