Skip to main content
Glama

Get project file

get_file
Read-onlyIdempotent

Read a project file's content, optionally limiting output to a 1-based line range while returning redacted text to protect sensitive data.

Instructions

Read redacted text from one effective project file using an optional 1-based line range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesExisting file path inside the effective project selection.
branchNoOptional Git branch for a remote project URL; invalid for local project paths.
projectNoAbsolute root path returned by list_projects, or a Git URL when the server allows remote sources. Optional only when one local root is configured.
end_lineNoLast 1-based line, inclusive; integer or numeric string.
start_lineNoFirst 1-based line; integer or numeric string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint). The description adds meaningful context: output is 'redacted text' and the file must be in the 'effective project selection', plus line-range scoping. This goes beyond annotated facts and helps set expectations.

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, tightly packed sentence that front-loads the verb and resource. Every phrase adds value: 'redacted text', 'effective project file', and 'optional 1-based line range'. No filler or repetition.

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 the annotations cover safety and the schema covers all parameter semantics, the description completes the picture with the redaction behavior and scope. It does not explain error cases or 'effective project' meaning, but for a simple read tool this is a minor gap. Overall it is sufficiently complete for correct invocation.

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 all five parameters are already documented with types and constraints. The description only summarizes the optional line-range parameters (start_line/end_line) and does not add any new semantic detail beyond what the schema provides. 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?

The description uses a specific verb ('Read'), a clear resource ('one effective project file'), and a scoping detail (optional 1-based line range). It distinguishes itself from sibling tools like get_tree (directory structure) and search_project (search), making it clear this is the tool to read file contents.

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

Usage Guidelines2/5

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

No explicit guidance is given for when to use get_file versus alternatives. The description does not mention any sibling tools or conditions that would favor get_file over get_tree, search_project, or pack_context. Usage is only implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.