Skip to main content
Glama

Get project file

get_file
Read-onlyIdempotent

Read redacted project text after mandatory secret and private-data replacement; use a single path or batched requests for up to eight files with range or symbol selections.

Instructions

Reads selected text after mandatory secret and configured private-data replacement. Use it after get_tree or search_project; use pack_context for broad multi-file context. Use path for one page or requests for up to eight files and sixteen file/range/symbol selections; forms are exclusive. Send one batched call whenever you want more than one file, range, or known symbol: requests=[{"path":"src/a.ts","symbol":"Router.load"}]. Items report ok, partial, not-returned, or unavailable; overlapping ranges share a 1,000-line/50,000-character cap. Coordinates use returned text; start_column continues a page. Project: unique listed name, absolute path returned by list_projects, or #index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoSingle-file form. Exactly one of path or requests is required. Names an existing selected file; Markdown escapes from the default get_tree format are accepted, while format=text supplies literal names.
branchNoRemote Git branch; invalid for local projects.
symbolNoReads a qualified, or file-unique simple, declaration with path instead of a range; search_project supplies names. Cannot combine with line or column fields; missing, unavailable, or non-unique declarations return DPX-MCP-INVALID-ARGUMENTS.
profileNoSelection profile: standard uses all eight exclusion toggles plus gitignore; local uses the desktop profile listed by list_projects.profiles; otherwise give a portable profile path inside the project.
projectNounique listed name, absolute path returned by list_projects, or #index.
end_lineNoLast inclusive 1-based returned-text line; accepts integer or numeric string.
requestsNoBatch form. Exactly one of requests or path is required. Reads up to eight files and sixteen selections; a path reads the whole file, while ranges or symbol narrow it. Single-file ranges cannot accompany requests.
start_lineNoFirst 1-based returned-text line; accepts integer or numeric string.
start_columnNoFirst 1-based Unicode character on start_line; use a returned continuation value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv5.2.0
    • changedInput schema / properties / branch / description
      Previous value: -"Optional Git branch for a remote project URL; invalid for local project paths."New value: +"Remote Git branch; invalid for local projects."
    • changedInput schema / properties / end_line / description
      Previous value: -"Last 1-based line, inclusive; integer or numeric string."New value: +"Last inclusive 1-based returned-text line; accepts integer or numeric string."
    • changedInput schema / properties / path / description
      Previous value: -"Existing file path inside the effective project selection."New value: +"Single-file form. Exactly one of path or requests is required. Names an existing selected file; Markdown escapes from the default get_tree format are accepted, while format=text supplies literal names."
    • addedInput schema / properties / profile
      Added value: +{
      +  "description": "Selection profile: standard uses all eight exclusion toggles plus gitignore; local uses the desktop profile listed by list_projects.profiles; otherwise give a portable profile path inside the project.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / project / description
      Previous value: -"Absolute root path returned by list_projects, or a Git URL when the server allows remote sources. Optional only when one local root is configured."New value: +"unique listed name, absolute path returned by list_projects, or #index."
    • addedInput schema / properties / requests
      Added value: +{
      +  "description": "Batch form. Exactly one of requests or path is required. Reads up to eight files and sixteen selections; a path reads the whole file, while ranges or symbol narrow it. Single-file ranges cannot accompany requests.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "path": {
      +        "description": "Existing selected project file.",
      +        "maxLength": 4096,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "ranges": {
      +        "description": "Inclusive transformed-text line ranges for this file.",
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "end_line": {
      +              "description": "Last inclusive 1-based transformed-text line.",
      +              "oneOf": [
      +                {
      +                  "minimum": 1,
      +                  "type": "integer"
      +                },
      +                {
      +                  "pattern": "^0*[1-9][0-9]*$",
      +                  "type": "string"
      +                }
      +              ]
      +            },
      +            "start_line": {
      +              "description": "First 1-based transformed-text line.",
      +              "oneOf": [
      +                {
      +                  "minimum": 1,
      +                  "type": "integer"
      +                },
      +                {
      +                  "pattern": "^0*[1-9][0-9]*$",
      +                  "type": "string"
      +                }
      +              ]
      +            }
      +          },
      +          "required": [
      +            "start_line",
      +            "end_line"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 16,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "symbol": {
      +        "description": "Reads this named declaration instead of ranges; the two forms cannot combine.",
      +        "maxLength": 512,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "path"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 8,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / start_column
      Added value: +{
      +  "description": "First 1-based Unicode character on start_line; use a returned continuation value.",
      +  "oneOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "pattern": "^0*[1-9][0-9]*$",
      +      "type": "string"
      +    }
      +  ]
      +}
    • changedInput schema / properties / start_line / description
      Previous value: -"First 1-based line; integer or numeric string."New value: +"First 1-based returned-text line; accepts integer or numeric string."
    • addedInput schema / properties / symbol
      Added value: +{
      +  "description": "Reads a qualified, or file-unique simple, declaration with path instead of a range; search_project supplies names. Cannot combine with line or column fields; missing, unavailable, or non-unique declarations return DPX-MCP-INVALID-ARGUMENTS.",
      +  "maxLength": 512,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "path"
      -]
  2. First observedv5.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish a safe read-only, idempotent profile, but the description adds substantial context beyond them: mandatory secret/private-data replacement, per-item statuses (ok, partial, not-returned, unavailable), a shared 1,000-line/50,000-character cap on overlapping ranges, and the exclusivity of the path vs requests forms.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense for a nine-parameter tool but front-loaded with the core read behavior before any detail, and every sentence (redaction, routing, batching, caps, projects) carries actionable information. It is long, but the length is justified by the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description still conveys return semantics via the per-item status vocabulary and the cap behavior, and it covers the mandatory redaction pipeline and form exclusivity. Nothing an agent needs to invoke it correctly appears to be missing.

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 coverage is 100%, so the schema documents all nine parameters and a baseline of 3 would apply. The description still adds meaning on top of the schema: the exclusivity of path and requests, the batching model (up to eight files and sixteen selections), and the project-name resolution forms (#index, absolute path, listed name).

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?

States a specific verb and resource with scope: 'Reads selected text after mandatory secret and configured private-data replacement.' It also names the siblings it is not (get_tree, search_project, pack_context), so an agent can distinguish it without opening a schema.

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

Usage Guidelines5/5

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

Explicit routing guidance: 'Use it after get_tree or search_project; use pack_context for broad multi-file context.' It further instructs batching ('Send one batched call whenever you want more than one file, range, or known symbol'), covering when-to-use and the alternative.

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