Skip to content
Docs menuReference › Tools reference

Tools reference

Every tool FlitAgent offers, what it reads or changes, whether it can be auto-approved and whether it can be rolled back.

ReferenceFlitAgent 1.0.0Last updated
On this page15 sections

This list is for FlitAgent 1.0.0. Your AI app sees the same tools, with their arguments, when it lists them. Every tool acts as the administrator who connected the site, so it can do only what that user can do.

  • Read tools are always there.
  • Write tools appear only while the site allows Read and propose changes (Turn on changes).
  • Page-builder and WooCommerce tools appear only while that plugin is active.

flitagent.com

list_sites lists the sites on your account with their access and whether changes are on. Every other tool takes a site argument, which may be left out when the account has one site.

Read: site and health

ToolWhat it reads
get_site_infoTitle, tagline, address, language, time zone and site icon.
get_site_healthWordPress, PHP and database versions, multisite and debug mode, and the last saved Site Health counts.
get_health_triageProblems, most serious first, each with the tool that fixes it (Health triage).
get_update_readinessEvery pending update with its risk and blockers (Update readiness).
get_core_updatesThe WordPress version, the updates WordPress last fetched and the automatic update settings.
get_maintenance_statusWhether the site is in maintenance mode.
get_connection_infoWhich user the connection acts as, with its roles and key capabilities, and the active theme.
verify_core_checksumsChecks the WordPress core files against the checksums WordPress.org publishes.
verify_plugin_checksumsChecks plugin files against the checksums WordPress.org publishes.
Read Read tools are always there.

Read: content

ToolWhat it reads
list_recent_contentThe most recently modified posts and pages.
search_contentSearches titles, excerpts and content, like the site’s own search.
get_content_qaContent findings with fixes (Content QA).
get_post_metaThe custom fields of one post.
get_registered_metaThe meta keys registered with WordPress.
count_commentsComments by status, for the site or one post.
get_page_htmlA page as a logged-out visitor sees it.
list_image_sizesThe image sizes WordPress generates.
Read Read tools are always there.

Read: plugins, themes and settings

ToolWhat it reads
list_pluginsInstalled plugins, which are active and which have updates.
list_themesInstalled themes, the active one and updates.
search_plugin_directorySearches the WordPress.org plugin directory.
get_optionOne option.
list_optionsOptions with a short, redacted preview of each value.
get_transientOne transient and when it expires.
list_transientsTransients with a redacted preview.
get_theme_modsThe active theme’s Customizer settings.
get_configThe wp-config.php settings that are not secret.
list_cron_eventsScheduled cron events, soonest first.
get_cron_statusWhether WP-Cron runs and how many events are overdue.
list_rewrite_rulesThe permalink structure and rewrite rules.
get_cache_infoObject and page caching, and the cache plugins FlitAgent can purge.
get_user_metaOne user’s meta.
list_rolesUser roles and their capabilities.
Read Read tools are always there.

Read: files, REST API and abilities

ToolWhat it reads
list_filesFiles in the active theme, its parent, or the themes, plugins or mu-plugins folders.
read_fileOne text file from those folders.
search_filesPlain text in those files, with line numbers.
get_file_outlineAn outline of one file, so only the needed part is read.
wp_rest_getA GET request to any REST API route on the site, with the user’s own permissions.
list_abilitiesThe abilities registered with the WordPress Abilities API (WordPress 6.9 and later).
get_abilityOne ability.
run_readonly_abilityRuns an ability that declares itself read-only.
Read Read tools are always there.

With Elementor, Bricks, Beaver Builder or Breakdance active, tools such as get_elementor_page and list_bricks_elements read their layouts and elements. With WooCommerce active, get_store_overview, list_orders and list_products read the store (WooCommerce reads).

Write tools: approval and rollback

Auto-approve

Every write waits for an administrator’s approval in FlitAgent → Approvals, except when all of these hold: the tool is marked auto below, an administrator ticked it under Auto-approve in FlitAgent → Settings, and the call is a low-risk one, for example update_post on a draft (Auto-approve policy).

Rollback

What rollback_change can do for each write:

  • Yes Restores the state before the write.
  • Nothing to restore The write cleared data WordPress rebuilds itself.
  • Files only Reinstalls the previous version; what the update changed in the database stays.
  • No It cannot be undone, and the preview says so.

Warning The preview says so before you approve. Keep backups for everything else; FlitAgent is not a backup tool. See Rollback and its limits.

Write: posts and pages

ToolAuto-approveRollback
create_post Creates a post, page or other post type item, as a draft unless told otherwise.AutoYes
update_post Changes the title, content, excerpt, status, slug, date, parent, template, author or featured image.AutoYes
replace_in_post Replaces exact text in a title, content or excerpt.AutoYes
restore_post_revision Restores a post from one of its revisions.AutoYes
trash_post Moves an item to the trash.AutoYes
restore_post Restores an item from the trash.AutoYes
delete_post_permanently Deletes a trashed item for good.NoNo
set_post_meta Sets one custom field.NoYes
delete_post_meta Deletes one custom field.AutoYes
set_post_terms Replaces, adds or removes categories, tags or other terms on a post.AutoYes
Write Write tools appear only while the site allows Read and propose changes.

Write: terms, comments and media

ToolAuto-approveRollback
create_term Creates a category, tag or other term.AutoYes
update_term Changes a term’s name, slug, description or parent.NoYes
delete_term Deletes a term for good.NoNo
create_comment Posts a comment or reply as the connected user.NoYes
moderate_comment Approves, holds, spams, trashes or restores a comment.AutoYes
delete_comment_permanently Deletes a trashed or spam comment for good.NoNo
upload_media_from_url Downloads an image from a public address into the media library.NoYes
update_media Changes a media item’s title, alt text, caption or description.NoYes
delete_media Deletes a media item and its files for good.NoNo
Write Write tools appear only while the site allows Read and propose changes.

Write: users and roles

ToolAuto-approveRollback
create_user Creates a user with a role you may assign.NoYes
update_user Changes a user’s names, biography, website or email address.NoYes
set_user_role Replaces a user’s role.NoYes
set_user_meta Sets one user meta key.NoYes
delete_user_meta Deletes one user meta key.NoYes
set_user_capabilities Grants or removes capabilities of one user.NoYes
create_role Adds a role.NoYes
set_role_capabilities Changes what a role grants.NoYes
delete_role Removes a role no user has.NoYes
send_password_reset Emails a user WordPress’s password reset link.NoNo
delete_user Deletes a user and gives their posts to another user.NoNo
Write Write tools appear only while the site allows Read and propose changes.

Write: caches, transients and cron

ToolAuto-approveRollback
flush_object_cache Empties the object cache.AutoNothing to restore
purge_page_cache Purges the page cache through each active cache plugin.AutoNothing to restore
regenerate_builder_css Clears page builders’ generated CSS.AutoNothing to restore
flush_rewrite_rules Rebuilds the rewrite rules.AutoNothing to restore
delete_expired_transients Deletes expired transients.AutoNothing to restore
delete_transient Deletes one transient. A name that looks like a secret, such as a token or key, always needs approval and has no rollback.AutoNothing to restore
delete_all_transients Deletes every transient.NoNo
unschedule_cron_event Removes one scheduled cron event.NoYes
run_cron_event Runs one cron event now.NoNo
Write Write tools appear only while the site allows Read and propose changes.

Write: plugins, themes and WordPress

ToolAuto-approveRollback
install_plugin Installs a plugin from WordPress.org, inactive. Rollback works while it is still inactive and still the installed version.NoYes
activate_plugin Activates a plugin.NoYes
deactivate_plugin Deactivates a plugin.NoYes
update_plugin Updates a plugin from WordPress.org.NoFiles only
delete_plugin Deletes an inactive plugin.NoNo
install_theme Installs a theme from WordPress.org, inactive. Rollback works while it is still inactive and still the installed version.NoYes
switch_theme Activates another theme.NoYes
update_theme Updates a theme from WordPress.org.NoFiles only
delete_theme Deletes a theme.NoNo
update_core Updates WordPress to a version WordPress.org offers.NoNo
Write Write tools appear only while the site allows Read and propose changes.

Write: settings and appearance

ToolAuto-approveRollback
update_option Sets one option registered as a setting.NoYes
delete_option Deletes one such option.NoYes
set_permalink_structure Changes the permalink structure.NoYes
set_theme_mod Sets the logo, colors, background or header image of the active theme. Rollback works while that theme is active.NoYes
update_custom_css Replaces the Additional CSS. Rollback works while that theme is active.NoYes
update_template Replaces a block theme template or template part.NoYes
update_global_styles Replaces the custom global styles of the active theme.NoYes
Write Write tools appear only while the site allows Read and propose changes.

Write: menus and widgets

ToolAuto-approveRollback
create_menu Creates an empty menu.NoYes
delete_menu Deletes a menu and its items.NoYes
add_menu_item Adds a link, post, page or term to a menu.NoYes
update_menu_item Changes a menu item.NoYes
delete_menu_item Deletes a menu item.NoYes
assign_menu_location Shows a menu in a theme location.NoYes
update_widget Changes a classic widget’s settings.NoYes
move_widget Moves a classic widget.NoYes
delete_widget Deletes a classic widget.NoYes
Write Write tools appear only while the site allows Read and propose changes.

Write: page builders and abilities

ToolAuto-approveRollback
save_elementor_page Saves an Elementor layout, and the same for save_bricks_page, save_beaver_page and save_breakdance_page.NoYes
save_elementor_template Saves an Elementor template, which can change every page that uses it.NoYes
run_ability Runs an ability that is not read-only.NoNo
Write Write tools appear only while the site allows Read and propose changes.

Changes, plans and receipts

  • apply_change: applies a change after it was approved, with its change ID (Approvals).
  • submit_plan: sends up to 25 changes for approval under one title.
  • get_change: the state of one change.
  • list_receipts: the receipts of applied, failed and refused writes (Receipts and Activity).
  • rollback_change: undoes a write from its receipt, once. Auto, when the target is unchanged since the write and the original change could have been auto-approved; otherwise it needs approval.
Last updated

Something wrong or missing on this page? Email hello@flitagent.com.