Skip to main content
Glama

read_code

Read one file from a repository connected to a project. A long file arrives cut and says so; generated and binary files are not read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe file's path inside the repository, e.g. 'src/app/main.ts'. Not a URL.
repoNoWhich repository, as 'group/repo'. Omit when only one is open.
referenceNoBranch, tag or commit. Omit for the default branch.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/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 two non-obvious behaviors: long files are cut off and the tool reports that, and generated/binary files are skipped. It doesn't detail return format or error handling, but the key behavioral surprises are covered.

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 short sentences with no filler. The core action is front-loaded, and each additional clause adds meaningful constraints or caveats.

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 simple three-parameter read tool with no output schema, this covers the essential scope, truncation behavior, and file-type exclusions. It doesn't explain the overall return format, but an agent has enough context to invoke it correctly. A small gap is the lack of any error-handling or permissions context.

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 description coverage is 100%, so the parameters are already fully documented in the schema. The description adds general behavior (file can be truncated, certain files excluded) but no parameter-specific semantics beyond what the schema already provides.

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 opens with 'Read one file from a repository connected to a project,' a specific verb and resource. The singular 'one file' distinguishes it from siblings like list_code and search_code, which cover browsing or searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool: when you want one file's contents. It also states exclusions ('generated and binary files are not read'), but it doesn't explicitly name alternative tools or provide explicit when-to-use versus 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources