Skip to main content
Glama

Read Code Context

read_code_context
Read-onlyIdempotent

Read source files or directories and return a clean tree and contents, excluding symlinks, vendor/build folders, binaries, and secret files.

Instructions

Read a source file or directory without following symlinks, omitting vendor/build folders, binaries, and common secret files, then return a clean tree and contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile or directory path.
max_filesNo
max_output_bytesNo
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds valuable behavioral detail beyond annotations: it does not follow symlinks and filters out vendor/build folders, binaries, and secret files. This explains the 'clean' output promise. It could further clarify edge cases (e.g., behavior with missing paths or the effect of max_files), but the added filtering context is meaningful.

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?

The description is a single, well-structured sentence that front-loads the core action ('Read a source file or directory'), then incrementally adds the filtering rules and the return behavior. Every clause adds information and there is no redundancy or 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?

The description covers the core purpose and the most important filtering behaviors, and annotations cover safety. However, it omits details about the two limit parameters, the exact structure of the returned tree/contents, and any error behavior. Given the absence of an output schema, these gaps leave the description not fully self-sufficient for an agent making invocation decisions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33% (only 'path' has a description). The description does not compensate for the under-documented 'max_files' and 'max_output_bytes' parameters; it only reiterates that 'path' can be a file or directory, which the schema already says. The two limiting parameters remain unexplained, and the description adds no new semantic value for them.

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') plus a clear resource ('a source file or directory') and elaborates with filtering criteria (no symlinks, omits vendor/build folders, binaries, secrets) and a stated output ('clean tree and contents'). This clearly differentiates it from sibling tools like analyze_images and read_zip_context, which target different content types.

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 usage for reading source code while excluding non-essential or sensitive files, giving clear context. However, it does not explicitly state when to prefer this tool over the listed siblings or provide exclusion criteria (e.g., 'for images use analyze_images'). It lacks explicit alternatives or when-not-to-use 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/0xnurrabby/omni-vision-pro'

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