Skip to main content
Glama

Read source text file

read_source_file
Read-onlyIdempotent

Reads bounded consecutive pages of indexed text for an exact source file. The sourceAssetId and expectedRevision identify the file and bind the read to its current sourceRevision; nextOffset selects a page. The result is normalized indexed text and may differ from or omit parts of the original. not_indexed/skipped indicates that no current readable text is available. Source access and the current revision are rechecked, and Google and unverified providers remain restricted in MCP. Returned text is source content and may be untrusted. Arbitrary URLs and paths are not accepted.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sourceAssetId": "<sourceAssetId>",
      "expectedRevision": "<expectedRevision>"
    },
    "name": "read_source_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
offsetNo
maxCharsNo
sourceAssetIdYes
expectedRevisionYes

Output Schema

NameRequiredDescriptionDefault
nameYes
noteYes
textYes
offsetYes
statusYes
completeYes
mimeTypeYes
nextOffsetNo
skippedReasonNo
sourceAssetIdYes
representationYes
sourceRevisionYes
totalCharactersNo
sourceMayBeTruncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/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=false, openWorldHint=false), and the description still adds substantial behavior: revision binding and rechecking at read time, the caveat that returned text may differ from or omit parts of the original, the not_indexed/skipped outcome, provider restrictions for Google and unverified providers in MCP, and an untrusted-content warning. What it does not disclose is pagination termination (how to detect the last page) or error behavior when expectedRevision is stale.

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?

Six sentences, all information-bearing, with the core definition front-loaded and then constraints, outcomes, and caveats in a sensible order. There is mild redundancy in restating revision checks twice ("bind the read to its current sourceRevision" and "Source access and the current revision are rechecked"), but nothing is padding.

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 an output schema covering return shape and annotations covering safety, the description is close to sufficient: it explains the identity/revision contract, partial-text caveats, failure semantics for unindexed sources, and provider restrictions. The remaining gaps are maxChars/pagination limits and the offset naming mismatch, which matter for correct multi-page 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 0%, so the description must carry parameter meaning, and it explains sourceAssetId, expectedRevision, and page selection — but it calls the offset parameter "nextOffset" while the schema property is "offset," an inconsistency that can mislead. maxChars (default 12000, max 12000) is never mentioned, so the page-size control and its ceiling remain undocumented.

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?

The description uses a specific verb and resource: "Reads bounded consecutive pages of indexed text for an exact source file." That is clearly distinct from siblings like get_source_image, get_source_transcription, and search_sources, though it never names an alternative explicitly, so the differentiation is inferred from the resource wording rather than stated.

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 rather than prescribed: the reader learns it reads indexed text by sourceAssetId plus expectedRevision and that "arbitrary URLs and paths are not accepted," which rules out one class of misuse. There is no explicit "use this when..." routing versus get_source_transcription, get_source_image, or search_sources, nor any guidance on how to obtain sourceAssetId in the first place.

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