Docs
Menu

DocsYour AI and Leaf

Leaf's tools

Every tool your AI sees on Leaf, what it does, and whether it reads or changes something.

Your AI picks these tools itself; you never call them by name. This list is for the curious, and for checking what an AI can do on your behalf.

Each tool tells your AI what kind it is:

  • Reads: changes nothing.
  • Adds: makes something new (a site, a preview, a link to drop files) and changes nothing that exists.
  • Changes: changes, replaces or removes something. Code changes stay in the history and can be undone.
  • Reads the web: reads a public page or searches the web for your AI; it changes nothing on Leaf, and the pages read are billed as usage.

Every tool acts as you, with your role: a tool reserved to owners and admins refuses for a member.

Your sites

Tool What it does Kind
project_list List sites Reads
project_create Create a site Adds
project_read Read a site Reads
usage_read Read usage Reads
sdk_read Read the Leaf SDK guide Reads
work_report Report a tool problem Sends a report

Code

Tool What it does Kind
code_tree List the files Reads
code_read Read a file Reads
code_search Search the code Reads
code_log Read the change history Reads
code_diff Compare two versions Reads
code_diagnostics Check the code Reads
code_outline Outline a file Reads
code_symbol Find a symbol Reads
code_patch Change the code Changes
code_revert Undo a change Changes
ui_add Add UI components Changes
upload_create Upload local files Adds
upload_part Send a file in parts Adds

Previews and putting online

Tool What it does Kind
preview_create Make a preview Adds
preview_shot Screenshot a preview Reads
preview_fetch Fetch a preview page Reads
preview_play Play a preview Changes
preview_send Send a request to a preview Changes
preview_log_list Read server logs Reads
preview_mail_list Read preview mails Reads
preview_mcp_list List the app’s MCP tools Reads
preview_mcp_call Call a tool of the app’s MCP server Changes
deployment_list List versions Reads
deployment_promote Put a version online Changes

Texts, images and languages

Tool What it does Kind
content_type_list List content types Reads
content_type_define Define a content type Changes
content_type_delete Delete a content type Changes
content_query Read content Reads
content_patch Change content Changes
content_publish Publish content Changes
locale_patch Change the languages Changes
message_list List translations Reads
message_patch Change translations Changes
asset_list List files Reads
asset_upload Upload a file Changes
asset_drop Ask for files to upload Adds
asset_patch Change or delete files Changes
library_search Search the free library Reads
library_add Add from the free library Adds

Forms

Tool What it does Kind
form_list List forms Reads
form_define Define a form Changes
form_delete Delete a form Changes
submission_query Read form replies Reads

Data and server

Tool What it does Kind
db_query Read the preview database Reads
db_execute Write to the preview database Changes
db_reset Reset the preview database Changes
data_import_read Read imported data Reads
data_import_plan Plan a data import Changes
data_import_run Run a data import Changes
schedule_list List scheduled tasks Reads
schedule_run Run a scheduled task Changes
task_list List background tasks Reads
task_retry Retry a background task Changes
ai_model_list List AI models Reads
web_read Read a web page Reads the web
web_search Search the web Reads the web

Sign-in and payments

Tool What it does Kind
sign_in_page_read Read the sign-in page look Reads
sign_in_page_patch Change the sign-in page Changes
test_user_patch Set a test user Changes
product_list List products Reads
product_patch Change products Changes
promo_patch Change promo codes Changes
purchase_list List purchases Reads

Domains

Tool What it does Kind
domain_add Connect a domain Adds
domain_list List domains Reads

Notes and drafts

Tool What it does Kind
review_list List review notes Reads
review_read Read review notes Reads
review_reply Reply to review notes Changes
draft_read Read a draft Reads
draft_file_read Read a draft file Reads
draft_restore Restore a draft Adds

Members of the Leaf team also see a few tools to run Leaf itself (named admin_). They are never shown to anyone else.