page

Call page.read_file

Answer a member's question about what is IN one of a site's files — 'what's in Hero.astro?', 'show me the homepage code', 'let me see that file', 'what does the header say in the code?'. No site id is needed — it works on the site the member has open on screen. It reads one source file in a window of lines, for showing and explaining it; a change the member asks for goes to page.edit, whose coding agent reads the files itself. The result carries the source_ref the file was read at. When has_more is true the file continues; read the next window from end_line + 1 to answer about the rest. A binary file answers kind: binary with no content. Not for finding which file holds something, or for making a change — that is page.list_files or page.edit.

Every result names the workspace it ran in. Say which workspace the answer is about. When the account has more than one workspace and none is selected, this tool refuses with workspace_ambiguous and lists the choices — offer them, never pick one.

post/api/v1/tools/page.read_file

Request

  • Base URL: https://app.goosybear.ai
  • URL: https://app.goosybear.ai/api/v1/tools/page.read_file
  • Auth: HTTP bearer

Headers

x-request-idstring

Your own id for this request, echoed back and recorded on the audit trail. 1–128 characters from A–Z a–z 0–9 . _ : -, starting with a letter or digit; anything else is replaced by a generated id.

Request body

site_idstring uuid

Optional site UUID. You are NOT shown the id of the site open on screen — it never appears in your context, so there is nothing to copy and nothing to look up. OMIT IT ENTIRELY and this call reads from that on-screen site; that is the PRIMARY path, not a fallback, and the turn's own surface resolves it server-side. Pass it only when the member explicitly named a DIFFERENT site and you took its id from page.list. Never pass a board, board-item, thread or any other id that merely happens to be nearby — those name different objects and will be refused.

pathstring required

The file's project-relative path exactly as page.list_files reported it (for example src/pages/index.astro). Never a leading slash, never ...

start_lineinteger

The first line to read (1-based). Leave it out to start at the top; when the result says has_more, call again from end_line + 1.

max_linesinteger

How many lines to read, at most 200. A long file is read in windows; never guess the part you have not read.

workspacestring

Which workspace to run in — its slug. Omit to use your default. With more than one reachable workspace and no default, the call is refused and the choices are listed.

Response

The call was admitted and dispatched. ok says whether the tool succeeded — a refusal the tool itself produced is still a 200, exactly as it is a successful JSON-RPC result over MCP.

OR

Changes

No recorded changes to this operation across all 6 revisions of this API.