Workspace read file
workspace_read_fileRead a single file from a source repository via an ephemeral AI workspace on the organisation's staging cluster. Shallow-clones the repo and returns the file contents (bounded). Safe in ask mode: the sandbox job is throwaway and cannot modify existing infrastructure. Requires a configured staging cluster plus either application_id or repository ('owner/name' - an Application-linked repository or one of the cluster's tagged context repositories).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "workspace_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | No | Optional branch to clone. Defaults to the context tag's branch, the Application's configured branch, or the repository's default branch. | |
| file_path | Yes | Path to the file, relative to the repository root. | |
| repository | No | Repository to clone in 'owner/name' form. Must be an Application-linked repository or one of the cluster's tagged context repositories; anything else is rejected with the allowed list. | |
| application_id | No | The Application whose linked repository to clone and read from. Provide this or 'repository'. |