Skip to main content
Glama

gluecron_read_file

Read-only

Read a file from a repo at a given ref. Mirrors GET /api/v2/repos/:owner/:repo/contents/:path. Returns {path, size, content, encoding, totalLines}. Pass start_line / end_line (1-based, inclusive) to read only part of a text file. A text file over ~60 KB read with no range returns its first ~60 KB of whole lines with truncated: true, startLine/endLine and a hint — ask for the next range to read on.

Input Schema

NameRequiredDescriptionDefault
refNoBranch / tag / sha (default HEAD)
pathYes
repoYes
ownerYes
encodingNo'utf8' (default) or 'base64'
end_lineNoLast line to return (1-based, inclusive; clamped to the file's length). Text files only.
start_lineNoFirst line to return (1-based, inclusive). Text files only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / end_line
      Added value: +{
      +  "description": "Last line to return (1-based, inclusive; clamped to the file's length). Text files only.",
      +  "type": "number"
      +}
    • addedInput schema / properties / start_line
      Added value: +{
      +  "description": "First line to return (1-based, inclusive). Text files only.",
      +  "type": "number"
      +}
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish the read-only, non-destructive safety profile, and the description adds real behavioral context: the exact return shape, the ~60 KB truncation threshold, the truncated/startLine/endLine flags, and a hint to request the next range. It does not cover auth/permission requirements or binary-file handling, but it goes well beyond the annotations.

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?

Front-loaded with the core action and scope before the parameter and truncation details, and nearly every sentence carries information. The endpoint-mirroring clause and the truncation explanation are slightly dense but not wasteful.

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?

With no output schema, the description compensates by enumerating returned fields and explaining the truncation contract, which is the main failure mode for this tool. Remaining gaps (permissions, binary/base64 handling) are minor for a read operation covered by readOnly annotations.

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 coverage is moderate (57%); owner/repo/path are undocumented but self-evident, while the description usefully reinforces the 1-based inclusive semantics of start_line/end_line and the text-file-only restriction. It adds only marginal detail beyond the schema and says nothing new about ref or encoding.

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 a file from a repo at a given ref') and even maps it to the underlying REST endpoint, so the operation is unambiguous. However, it never distinguishes itself from the near-identical sibling gluecron_repo_read_file, which an agent could easily confuse it with.

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?

It explains the range-reading mode well (pass start_line/end_line to read part of a text file) and describes the ~60 KB truncation fallback, so usage of the parameters is implied. But it gives no guidance on when to choose this tool over gluecron_repo_read_file, list_tree, search_code, or get_diff.

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