read_file
Use read_file to inspect an existing model, run.py, README, or data seed before making changes
read-only · idempotent
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | Annotated[str, Field(description='Name of the Bridge Town project.')] | Yes | — | |
path | Annotated[str, Field(description="Project-relative file path to read (e.g. 'run.py', 'model/revenue.py').")] | Yes | — | |
encoding | Annotated[Literal['auto', 'text', 'base64'], Field(description="How to decode the file: 'auto' (default) sniffs binary vs text; 'text' returns UTF-8 string; 'base64' returns base64-encoded bytes.")] | No | 'auto' | |
branch | `Annotated[str | None, Field(description=“Branch to operate on. Defaults to the project’s default branch when omitted or null.”)]` | No | None |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
path(string)project(string)content(string)encoding(string)sha(string)size_bytes(integer)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "read_file", "arguments": { "project_name": "forecasts", "path": "model/revenue.py" }}Response
Section titled “Response”{ "path": "model/revenue.py", "project": "forecasts", "content": "import pandas as pd\n\ndef run(inputs):\n ...\n", "encoding": "text", "sha": "abc1234def5678901234567890abcdef12345678", "size_bytes": 482}- Module:
Models - Requires authentication via API token or Auth0 JWT.