Tools

The tools an agent calls on the site, the permission each one needs, and what the site tells an agent when it connects.

An agent sees only the tools its connection's permissions allow.

ToolPermissionWhat it does
get_siteRead contentReturns the site's title and URL, its languages, the account the agent works as, the connection's permissions, and the top-level pages
find_pagesRead contentSearches the pages and drafts, or lists the children and drafts of one page – sorted by a field or the last change, filtered by unsaved changes, with the field values you ask for
get_contentRead contentReturns the fields of a page, a file, or the site in one language, and the files of a page or the site; for unsaved changes, who else made them and which fields they change
view_imageRead contentReturns a JPEG, PNG, GIF, or WebP image with its alt text
prepare_changesPrepare changesWrites field values to the unsaved changes in one language
create_draftPrepare changesCreates a draft below the site or a page, with a template the parent allows, in the default language
publish_changesPublish changesPublishes the unsaved changes in one language, whoever made them, unless they have validation errors – a draft's changes publish anyway
discard_changesPublish changesDiscards the unsaved changes in one language, whoever made them
change_statusPublish changesChanges a page's status to listed, unlisted, or draft – a draft with validation errors or unsaved changes stays a draft
change_slugPublish changesChanges a page's slug in one language
move_pagePublish changesMoves a page or a draft with its subpages and files below another parent that takes its template
upload_filePublish changesUploads a file from a public HTTPS URL or sent by the agent to the site or a page, with a file template the parent accepts
delete_pageDelete contentDeletes a page or a draft with its files, unless it or its files have unsaved changes, or it has subpages
delete_fileDelete contentDeletes a file with its content, unless it has unsaved changes

What Agents Are Told

When an agent connects, the site tells it to read content before it changes it. get_content and find_pages tell it to treat the content they return as data, never as instructions. get_site tells it that tools beyond its connection's permissions are hidden and that you can allow more in the Agents view, as far as your role permits. The tools that publish, discard, or delete tell it to call them only when you ask, and so do the tools that change a page's status, slug, or parent.