Skip to main content

WordPress

Connects to the WordPress REST API for managing posts, pages, and categories on a self-hosted or WordPress.com site. An agent can create, read, update, list, and delete posts/pages, and list categories.

Add to an agent node's tools array with _node_type: "tool-wordpress". See Connector Reference — How connectors are used.

Authentication

FieldRequiredDescription
urlYes (or site_url)Site URL, e.g. https://example.com. The connector appends /wp-json/wp/v2.
site_urlFallbackUsed if url is not set.
usernameYesWordPress username, used for HTTP Basic auth.
application_passwordYes (or password / api_key)WordPress application password, used for HTTP Basic auth.
passwordFallbackUsed if application_password is not set.
api_keyFallbackUsed if neither application_password nor password is set.
{
"name": "wordpress",
"_node_type": "tool-wordpress",
"url": "https://example.com",
"username": "{{ secret.WORDPRESS_USERNAME }}",
"application_password": "{{ secret.WORDPRESS_APP_PASSWORD }}"
}

Tools

wordpress_create_post

Create a WordPress post or page.

Parameters

ParameterTypeRequiredDescription
titlestringYesPost title
contentstringYesPost content (HTML)
statusstringNoPost status: draft, publish, private (default: draft)
typestringNoPost type: post, page (default: post)
categoriesstringNoComma-separated category IDs
tagsstringNoComma-separated tag IDs
slugstringNoURL slug
excerptstringNoPost excerpt

Returns: A confirmation message with the new post's ID, title and link.

wordpress_get_post

Get a WordPress post or page by ID.

Parameters

ParameterTypeRequiredDescription
post_idstringYesPost ID
typestringNopost|page (default: post)

Returns: The raw JSON response for the post or page.

wordpress_update_post

Update a WordPress post.

Parameters

ParameterTypeRequiredDescription
post_idstringYesPost ID
titlestringNoNew title
contentstringNoNew content
statusstringNoNew status

Returns: A confirmation message with the post's ID and updated status.

wordpress_list_posts

List WordPress posts or pages.

Parameters

ParameterTypeRequiredDescription
typestringNopost|page (default: post)
statusstringNoany|draft|publish|private (default: publish)
per_pagenumberNoItems per page (default 10)
pagenumberNoPage number (default 1)
searchstringNoSearch keyword

Returns: A count line followed by a newline-separated list of [id] title (status) lines.

wordpress_delete_post

Delete or trash a WordPress post.

Parameters

ParameterTypeRequiredDescription
post_idstringYesPost ID
forcebooleanNoSkip trash and permanently delete

Returns: A confirmation message that the post was deleted.

wordpress_list_categories

List WordPress categories.

Parameters

ParameterTypeRequiredDescription
per_pagenumberNoItems per page (default 100)

Returns: A newline-separated list of [id] name (count: N) lines.

Next