Skip to main content
POST
Read a repository file

Authorizations

Authorization
string
header
required

API Key authentication using Bearer token. Example: "Authorization: Bearer {apiKey}"

Body

path
null | string
required

Repository-relative file path returned by get_file_tree, semantic_search, or grep_search.

output_format
null | enum<string>

Optional success projection. Omit to return both obj and rendered; use json for obj only; use agentic for rendered text only. Repairable errors always return both obj.error and rendered.

Available options:
json,
agentic
data_source
null | string

One repository name or id returned by get_data_sources. Required when more than one repository is visible.

start_line
null | integer<int32>

Optional 1-based start line.

end_line
null | integer<int32>

Optional 1-based end line.

Response

Success envelope. obj has found, files[] with line-numbered content (numberedContent, startLine, endLine), same-name candidates when the path did not resolve, and a hint; rendered is the JSON-serialized form of obj. Repairable failures (missing or invalid arguments, ambiguous or unknown data sources) also return HTTP 200 with obj.error = { code, message, retry, try } and a rendered <tool_error> block; repair the arguments and retry.

obj
any

Arbitrary JSON result for the tool. Present for omitted/json success projections and every repairable error.

rendered
null | string

Agent-facing result text. Present for omitted/agentic success projections and every repairable error.