Sokket ships 20 tools in five groups. Each one lists the WordPress capability it requires and whether it counts as a write.
Reading this table is how you decide what to tick on a token. Remember all three gates apply: the tool must be in the connection’s allowlist, the connection must not be read-only if the tool writes, and the bound user must have the capability. See Tokens & Permissions.
At a glance
| Tool | Group | Type | Capability |
|---|---|---|---|
get_site_info | Site & diagnostics | read | manage_options |
list_plugins | Site & diagnostics | read | activate_plugins |
list_themes | Site & diagnostics | read | switch_themes |
get_php_error_log_tail | Site & diagnostics | read | manage_options |
get_site_settings | Site & diagnostics | read | manage_options |
list_posts | Content | read | edit_posts |
get_post | Content | read | edit_posts |
search_content | Content | read | edit_posts |
create_post | Content | write | edit_posts |
update_post | Content | write | edit_posts |
list_media | Media | read | upload_files |
upload_media | Media | write | upload_files |
set_featured_image | Media | write | edit_posts |
list_taxonomies | Taxonomies & terms | read | edit_posts |
list_terms | Taxonomies & terms | read | edit_posts |
create_term | Taxonomies & terms | write | manage_categories |
assign_terms | Taxonomies & terms | write | edit_posts |
list_comments | Comments | read | moderate_comments |
moderate_comment | Comments | write | moderate_comments |
reply_to_comment | Comments | write | moderate_comments |
Every write tool is off by default on a new token.
Site & diagnostics
get_site_info
An overview of the site: WordPress version, PHP version, active theme, environment type, and debug settings. Usually the first call an agent makes — it’s the context everything else builds on.
No arguments. Requires manage_options.
list_plugins
Installed plugins with their version, active state, and whether an update is available. The fastest way to answer "what changed before this broke?"
No arguments. Requires activate_plugins.
list_themes
Installed themes with their version and whether they are active.
No arguments. Requires switch_themes.
get_php_error_log_tail
The last lines of the PHP error log.
| Argument | Type | Notes |
|---|---|---|
lines | integer | 1–100. Default 50. |
Requires manage_options.
This is the only tool in the free plugin that touches the filesystem, and it is constrained hard on purpose: it reads only the path returned by ini_get( 'error_log' ) — never a path the caller supplies — and caps the response at the last 100 lines. There is no way to point it at another file.
get_site_settings
The site’s general, writing, reading, discussion, and permalink settings.
| Argument | Type | Notes |
|---|---|---|
group | string | One of general, writing, reading, discussion, permalinks. Default: all groups. |
Requires manage_options.
The options are a fixed, hard-coded allowlist — the caller cannot name an option to read. general includes blogname, siteurl, home, admin_email, timezone_string, date and time formats, and registration settings; reading includes show_on_front, posts_per_page, and blog_public; discussion covers the comment settings; permalinks covers permalink_structure and the category and tag bases.
admin_emailis in thegeneralgroup. It’s the same address that user sees under Settings → General, but if you’d rather not expose it, leave this tool off.
Content
list_posts
Posts or pages with id, title, status, and dates, paginated.
| Argument | Type | Notes |
|---|---|---|
post_type | string | Default post. |
status | string | publish, draft, pending, future, private, or any. Default any. |
per_page | integer | 1–50. Default 10. |
page | integer | Default 1. |
Requires edit_posts.
get_post
One post or page in full, including its content.
| Argument | Type | Notes |
|---|---|---|
id | integer | Required. |
Requires edit_posts.
search_content
Search post and page titles and content for a keyword.
| Argument | Type | Notes |
|---|---|---|
query | string | Required. The keyword or phrase. |
post_type | string | Restrict to one post type. Default: posts and pages. |
per_page | integer | 1–50. Default 10. |
Requires edit_posts.
create_post — write
Create a new post or page.
| Argument | Type | Notes |
|---|---|---|
title | string | Required. |
content | string | HTML allowed, filtered. |
excerpt | string | |
status | string | draft, pending, private, or publish. Default draft. |
post_type | string | Default post. |
Requires edit_posts.
Content is created as a draft unless another status is requested and permitted. Asking for publish or private on a connection whose user cannot publish that post type returns an error rather than quietly downgrading it, so the agent knows the request didn’t do what it asked.
update_post — write
Update the title, content, excerpt, or status of an existing post or page.
| Argument | Type | Notes |
|---|---|---|
id | integer | Required. |
title | string | |
content | string | HTML allowed, filtered. |
excerpt | string | |
status | string | draft, pending, private, or publish. |
Requires edit_posts, plus edit permission on that specific post.
Media
list_media
Media library attachments with id, title, URL, MIME type, and dimensions. Use it to find an existing image before uploading a new one.
| Argument | Type | Notes |
|---|---|---|
search | string | Title, filename, or caption. |
mime_type | string | e.g. image/png. |
post_id | integer | Only attachments uploaded to this post. |
per_page | integer | 1–50. Default 20. |
page | integer | Default 1. |
Requires upload_files.
upload_media — write
Upload an image to the media library from base64-encoded bytes; returns the attachment id and URL.
| Argument | Type | Notes |
|---|---|---|
filename | string | Required. e.g. sunset.jpg. The extension is corrected to match the actual image data. |
data | string | Required. Base64-encoded file contents. A data:image/…;base64, prefix is accepted and stripped. |
title | string | Defaults to the file name. |
alt_text | string | Strongly recommended. |
caption | string | |
description | string | |
post_id | integer | Attach to this post. Requires edit permission on it. |
Requires upload_files.
This tool is deliberately narrow, and the limits are worth knowing before you enable it:
- Raster images only — JPEG, PNG, GIF, WebP, and AVIF. SVG is always refused, because SVG is XML that can carry script — and that holds even on sites that have enabled SVG uploads elsewhere or set
unfiltered_upload. - The type comes from the bytes, not the name. A payload called
photo.jpgthat isn’t really an image is rejected, and the stored extension is rewritten to match the real data. - The bytes arrive inside the request. Sokket never fetches a URL, so enabling uploads still means zero outbound requests from your site — and no SSRF surface.
- Rate limited — 20 files and 25 MB per user per hour by default (both filterable), with a per-file size cap. An agent stuck in a loop cannot fill your uploads directory.
- Logged — the audit log records the resulting attachment id.
set_featured_image — write
Set or clear a post’s featured image.
| Argument | Type | Notes |
|---|---|---|
post_id | integer | Required. |
attachment_id | integer | Required. The image attachment id, or 0 to clear. |
Requires edit_posts, plus edit permission on that post.
Taxonomies & terms
list_taxonomies
The taxonomies registered on this site, which post types they apply to, and whether they’re hierarchical.
| Argument | Type | Notes |
|---|---|---|
post_type | string | Only taxonomies attached to this post type. |
Requires edit_posts.
list_terms
Terms in a taxonomy with id, name, slug, parent, and post count.
| Argument | Type | Notes |
|---|---|---|
taxonomy | string | Required. e.g. category, post_tag. |
search | string | Filter terms by name. |
parent | integer | Only direct children of this term. |
hide_empty | boolean | Exclude terms with no posts. Default false. |
per_page | integer | 1–100. Default 50. |
page | integer | Default 1. |
Requires edit_posts.
create_term — write
Create a term in a taxonomy — a category, a tag, or anything custom.
| Argument | Type | Notes |
|---|---|---|
taxonomy | string | Required. |
name | string | Required. |
slug | string | Generated from the name when omitted. |
description | string | |
parent | integer | Hierarchical taxonomies only. |
Requires manage_categories, re-checked against that taxonomy’s own management capability.
assign_terms — write
Assign existing terms to a post. Terms may be given as ids, exact names, or slugs.
| Argument | Type | Notes |
|---|---|---|
post_id | integer | Required. |
taxonomy | string | Required. |
terms | array | Required. Term ids, names, or slugs. |
append | boolean | Add to existing terms instead of replacing them. Default false. |
Requires edit_posts, plus edit permission on that post.
Unknown terms are reported back, not silently created — so an agent that hallucinates a category gets told about it instead of littering your taxonomy. Call create_term first when you genuinely want a new one.
delete_termwas added in 1.2.0. It counts as a write, so a read-only connection can never call it, and it is announced with the MCPdestructiveHintannotation so your client can ask you to confirm first. Posts using a deleted term are not deleted — they simply lose the assignment.
Comments
list_comments
Comments with their status, author, and content. This is how an agent reads the moderation queue.
| Argument | Type | Notes |
|---|---|---|
status | string | hold, approve, spam, trash, or all. Default hold. |
post_id | integer | Only comments on this post. |
search | string | Filter by content or author. |
per_page | integer | 1–50. Default 20. |
page | integer | Default 1. |
Requires moderate_comments.
This tool returns commenter email addresses — the same data a moderator sees in wp-admin. If you’d rather not expose them to a client, leave it off.
moderate_comment — write
Change a comment’s moderation status.
| Argument | Type | Notes |
|---|---|---|
comment_id | integer | Required. |
action | string | Required. approve, unapprove, spam, unspam, trash, or untrash. |
Requires moderate_comments, re-checked per comment.
Comments are never permanently deleted by this tool. The worst it can do is trash one — and it can untrash it again.
reply_to_comment — write
Post a reply to a comment, authored as the WordPress user the connection is bound to.
| Argument | Type | Notes |
|---|---|---|
comment_id | integer | Required. |
content | string | Required. The reply text. |
Requires moderate_comments.
The reply is attributed to the bound user — so think about which account you bind a comment-moderation connection to, because their name goes on the site.
What is deliberately missing
The free plugin ships no filesystem-write tool, no database query tool, no WP-CLI passthrough, and no plugin or theme installer. That isn’t an oversight — each one is a remote code or data execution surface, and keeping them out is what makes the free plugin safe to hand an agent by default.
Those tools are the Pro add-on’s job, and they register through the same public filter any developer can use.
Adding your own tools
Any plugin can register additional tools with the sokket_register_tools filter. They appear in the token allowlist automatically (in the Other group unless they declare one) and pass exactly the same three gates. See the Developer Reference.