Skip to main content
Glama

Read code

read_code
Read-only

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

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

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds genuinely new behavior: long files arrive truncated with a notice, and generated/binary files are refused — exactly the kind of edge-case disclosure that prevents surprise failures.

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 tight sentences with no filler; the primary purpose is front-loaded and the behavioral caveats follow in a single clause. Nothing could be removed without losing information.

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?

No output schema exists, yet the description covers the main return-value risk (truncation) and excludes unreadable file types. It leaves error behavior (missing path, bad reference) unaddressed, which keeps it from a 5.

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%, with path, repo and reference each documented including defaults and format examples. The description adds no parameter-level semantics beyond what the schema already provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Read one file from a repository") and scopes it to a single file, which implicitly separates it from bulk siblings like search_code and list_code. It doesn't explicitly name those siblings, so it stops short of 5.

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?

Usage is implied by "one file" and the repo/reference parameters, but there is no explicit when-to-use or when-to-use-something-else guidance, and no alternative is named despite many code-related siblings (search_code, list_code, code_symbols).

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