Skip to main content
Glama

read_code

Fetch the current file content from an allow-listed project to ensure you use the actual on-disk version instead of a stale copy.

Instructions

Reads the current content of one source file in a project.

Use this to see the up-to-date version of a file instead of relying on a pasted copy. Only files inside an allow-listed project, of an allowed type, and outside the excluded directories/patterns can be read.

Args: project: Project name, e.g. "conftransform". path: Project-relative path, e.g. "src/conftransform/levels.py". max_chars: Maximum number of characters to return.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
projectYes
max_charsNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses access restrictions (allow-listed project, allowed type, excluded directories) and implies truncation via max_chars, but does not detail error behavior for missing files or unauthorized paths. This is moderate coverage.

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 well-structured with a concise summary, usage guidance, constraints, and an Args list. Every sentence provides value without redundancy, making it easy to scan and understand.

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 no output schema or annotations, the description covers the core aspects: what it does, when to use, constraints, and parameter meanings. It could explicitly mention the return value type (file content) and error handling, but the purpose is clear enough for an agent to invoke it correctly.

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

Parameters4/5

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

Schema description coverage is 0%, but the description compensates with an Args section explaining project and path with concrete examples, and defines max_chars as 'Maximum number of characters to return.' This adds meaningful semantics beyond the schema's basic parameter names.

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 'Reads the current content of one source file in a project,' using a specific verb and resource. It distinguishes itself from siblings like list_files (listing files) and search_code (searching within code) by focusing on direct file content retrieval.

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?

Provides clear usage context: 'Use this to see the up-to-date version of a file instead of relying on a pasted copy.' It also describes constraints (allow-listed project, allowed type, excluded directories), but does not explicitly mention alternatives or when not to use this tool.

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/lduda79/projects-mcp'

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