Skip to main content
Glama
Codepage Bridge MCP

Codepage Bridge MCP

by skyispainted

Read a file from the local filesystem.

Read

Retrieves local file contents by absolute path for text, images, PDFs, and Jupyter notebooks; supports offset/limit and page ranges to handle large files.

Instructions

Reads a file from the local filesystem. You can access any file directly by using this tool. Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.

Usage:

  • The file_path parameter must be an absolute path, not a relative path

  • By default, it reads up to 2000 lines starting from the beginning of the file. Files larger than 256KB will return an error; use offset and limit for larger files

  • When you already know which part of the file you need, only read that part. This can be important for larger files.

  • Results are returned using cat -n format, with line numbers starting at 1

  • This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.

  • This tool can read PDF files (.pdf). For large PDFs (more than 10 pages), you MUST provide the pages parameter to read specific page ranges (e.g., pages: "1-5"). Reading a large PDF without the pages parameter will fail. Maximum 20 pages per request.

  • This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.

  • This tool can only read files, not directories. To read a directory, use an ls command via the Bash tool.

  • You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.

  • If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.

  • The first result line reports the file path, the line range you received, the encoding, and the file's line-ending style (CRLF, LF, or CR). Trust it; do not probe with Bash, od, file, or a second Read to learn any of those.

  • Content is always returned with LF line endings. A trailing newline is not shown as an extra empty line, so a 3-line file reports 3 lines.

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": {
      "file_path": "<file_path>"
    },
    "name": "Read"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoThe number of lines to read. Only provide if the file is too large to read at once.
pagesNoPage range for PDF files (e.g., "1-5", "3", "10-20"). Only applicable to PDF files. Maximum 20 pages per request.
offsetNoThe line number to start reading from. Only provide if the file is too large to read at once
file_pathYesThe absolute path to the file to read

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the 2000-line default, the 256KB error threshold, the 20-page PDF cap, the cat -n output format with 1-based numbering, the empty-file system reminder, and the LF-normalization behavior. What it omits is the safety profile — nothing states the operation is read-only and non-mutating — though that is strongly implied throughout.

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 one-sentence purpose, then organized as a scannable bullet list where each bullet maps to a real failure mode an agent would otherwise hit. A few lines are lower value, e.g. 'Assume this tool is able to read all files on the machine' and the reassurance that non-existent paths are safe to attempt, but nothing is filler in the harmful sense.

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?

No output schema exists, and the description compensates by describing the return shape in detail — the header line reporting path, line range, encoding and line-ending style, plus the LF normalization and trailing-newline convention. It also explicitly tells the agent not to re-probe those fields with Bash, closing the most likely downstream confusion.

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 baseline is 3, but the description adds meaning beyond it: 'only read that part' justifies offset/limit in terms of cost on large files, and the PDF pages rule is stated as a hard requirement ('you MUST provide the pages parameter') that the schema only hints at with 'Only applicable to PDF files.' It does not explain offset semantics against the 1-based numbering it reports, leaving a small ambiguity.

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?

Opens with a precise verb+resource ('Reads a file from the local filesystem') and immediately bounds the domain: files, not directories, with explicit support for images, PDFs, and notebooks. An agent can distinguish it from Grep (content search) and Edit/Write (mutation) without inspecting any 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?

Gives explicit when-to-use rules (absolute paths only, read only the part you need, always use this tool for user-supplied screenshots) and routes out-of-scope cases to alternatives, e.g. 'To read a directory, use an ls command via the Bash tool.' It also enumerates hard preconditions for PDFs (pages required above 10 pages), which is real decision guidance rather than restated schema.

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

Deploy Server

Other Tools