willo_get_function
The current source of a deployed Edge Function, as a window of lines (mirrors willo_read_file's offset/limit), with its source_sha256…
- Read
On this page
Read an Edge Function. The current source of a deployed Edge Function, as a window of lines (mirrors willo_read_file's offset/limit), with its source_sha256 — willo_edit_function, and willo_deploy_function replacing it, take that value. While the business is drafting this is the draft's version; target: live returns the version the live backend runs (Willo's record of it), its verify_jwt and the names of the secrets it reads. Edits always apply to the draft version. version: before_last_publish returns the version live ran before the last Publish that changed the function, to restore one a Publish broke: deploy that code with willo_deploy_function (draft, then Publish). Free, read-only.
Access
- Token: read or read + act.
- Approval: Never. This tool only reads.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | The function's slug. |
target | string (draft or live) | no | Omit for the current version (the draft's while drafting) — read this before an edit. live = the version the live backend runs even mid-draft, from Willo's records; its source_sha256 is not the one willo_edit_function needs while the draft has changed the function. draft errors when the business is not drafting. |
version | string (before_last_publish) | no | before_last_publish = Willo's copy of the version live ran before the most recent Publish that changed this function, with its before_last_publish_sha256. To replace the function with it, read the current version (no version) and pass that read's source_sha256 to willo_deploy_function. Not with target. |
offset | integer ≥ 1 | no | First line to return (1-based). |
limit | integer ≥ 1 | no | How many lines to return. |