Skip to main content
Glama

read

Reads file contents with line numbers, auto-detects encoding, and supports reading specific line ranges or from the end of files.

Instructions

Reads a file and returns its contents with line numbers. Encoding-aware: auto-detects file encoding (UTF-8, EUC-KR, Shift-JIS, etc.). Supports offset/limit for reading specific line ranges. Negative offset reads from end (e.g. offset=-5 reads last 5 lines).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the file to read
offsetNoLine number to start reading from (1-based). Negative = from end (e.g. -5 = last 5 lines). Default: 1
limitNoMaximum number of lines to read. Default: 0 (all)

Latest Blog Posts

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/knewstimek/agent-tool'

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