Skip to main content
Glama

Serena

by oraios

read_file

Retrieve the full text or specific lines from a file on the MCP server Serena by specifying the relative path, start line, and end line. Use this tool when granular file access is needed for task execution.

Instructions

Reads the given file or a chunk of it. Generally, symbolic operations like find_symbol or find_referencing_symbols should be preferred if you know which symbols you are looking for. Reading the entire file is only recommended if there is no other way to get the content required for the task. Returns the full text of the file at the given relative path.

Input Schema

NameRequiredDescriptionDefault
end_lineNoThe 0-based index of the last line to be retrieved (inclusive). If None, read until the end of the file.
max_answer_charsNoIf the file (chunk) is longer than this number of characters, no content will be returned. Don't adjust unless there is really no other way to get the content required for the task.
relative_pathYesThe relative path to the file to read.
start_lineNoThe 0-based index of the first line to be retrieved.

Input Schema (JSON Schema)

{ "properties": { "end_line": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The 0-based index of the last line to be retrieved (inclusive). If None, read until the end of the file.", "title": "End Line" }, "max_answer_chars": { "default": 200000, "description": "If the file (chunk) is longer than this number of characters,\nno content will be returned. Don't adjust unless there is really no other way to get the content\nrequired for the task.", "title": "Max Answer Chars", "type": "integer" }, "relative_path": { "description": "The relative path to the file to read.", "title": "Relative Path", "type": "string" }, "start_line": { "default": 0, "description": "The 0-based index of the first line to be retrieved.", "title": "Start Line", "type": "integer" } }, "required": [ "relative_path" ], "title": "applyArguments", "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/oraios/serena'

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