read_file — read a file by path
read_file returns the full contents of a file. It also records that the file has been read in the current session so the read-before-write guard on edit_file can succeed.
Schema
Section titled “Schema”| Arg | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative path (resolved against the environment’s workdir) or absolute. |
Example invocation
Section titled “Example invocation”{"path": "chimera/core/agent.py"}from chimera.tools.read import ReadFileTool
tool = ReadFileTool()result = tool.execute({"path": "README.md"}, env=local_env)print(result.output[:200])Output sample
Section titled “Output sample”# Chimera
Compose coding agents from modular primitives....On a missing file, output is empty and error reads File not found: <path>.
See also
Section titled “See also”edit_file— requires the target to have beenread_file-d first when the read-before-write guard is on.write_file— the create-only counterpart.apply_patch— multi-file atomic edits.