Reference

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
Generated from Willo's codeOpen in ClaudeOpen in ChatGPT
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

ParameterTypeRequiredDescription
namestringyesThe function's slug.
targetstring (draft or live)noOmit 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.
versionstring (before_last_publish)nobefore_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.
offsetinteger ≥ 1noFirst line to return (1-based).
limitinteger ≥ 1noHow many lines to return.