Skip to main content
Glama

read_file

Reads a file and marks it as active while automatically summarizing inactive files to their public interfaces, reducing context size for supported programming languages.

Instructions

Read a file and mark it as the active file. When you switch to a different file, the previous file is automatically summarized to just its public interface, reducing context size.

Supported languages for summarization: .rs, .py, .ts, .tsx, .js, .jsx, .php, .cs, .gd

For unsupported file types, returns full contents without tracking (same as standard file read).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file to read (absolute or relative)

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/UBTCodeNinja/mcp-file-compaction'

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