Skip to main content
Glama

get_file

Retrieve complete or partial file contents from your codebase to view implementations, examine configurations, or read specific line ranges within files.

Instructions

Retrieve complete or partial contents of a file from the codebase.

Use this tool when you need to:

  • View the full implementation of a specific file

  • Examine files found via semantic_search

  • Read configuration, documentation, or data files

  • View specific line ranges within large files

For searching across multiple files, use semantic_search or get_context_for_prompt instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to workspace root (e.g., "src/index.ts", "package.json")
start_lineNoOptional: First line to include (1-based). Omit for start of file.
end_lineNoOptional: Last line to include (1-based). Omit for end of file.

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/Kirachon/context-engine'

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