Skip to main content
Glama

MCP Claude Code

by SDGLBL

read

Access and retrieve file contents from the local filesystem using absolute paths. Specify line offsets and limits for large files or read entire files directly. Supports up to 2000 lines and truncates overly long lines for efficient file handling.

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
  • You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters
  • Any lines longer than 2000 characters will be truncated
  • Results are returned using cat -n format, with line numbers starting at 1
  • For Jupyter notebooks (.ipynb files), use the notebook_read instead
  • When reading multiple files, you MUST use the batch tool to read them all at once

Input Schema

NameRequiredDescriptionDefault
file_pathYesThe absolute path to the file to read
limitNoThe number of lines to read. Only provide if the file is too large to read at once
offsetNoThe line number to start reading from. Only provide if the file is too large to read at once

Input Schema (JSON Schema)

{ "properties": { "file_path": { "description": "The absolute path to the file to read", "title": "File Path", "type": "string" }, "limit": { "default": 2000, "description": "The number of lines to read. Only provide if the file is too large to read at once", "title": "Limit", "type": "integer" }, "offset": { "default": 0, "description": "The line number to start reading from. Only provide if the file is too large to read at once", "title": "Offset", "type": "integer" } }, "required": [ "file_path" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SDGLBL/mcp-claude-code'

If you have feedback or need assistance with the MCP directory API, please join our Discord server