MCP tool reference

View Source

Generated from Wraith.Tools.catalogue/0: 53 tools. Every admin action is one of these; the studio agent and any MCP client at POST /mcp see the same registry. A tool is read (readOnlyHint), write, or destructive (destructiveHint). Staff contexts get the tools their role allows (Wraith.Policy); a Content key gets the ones marked Content key, which see only published posts with the paywall applied.

Posts, pages, newsletters

posts_list

read, Content key. List posts or pages of any status: id, title, slug, status, type, tags, visibility, updated_at.

  • limit, integer: default 50
  • query, string: search words
  • status, string: draft | scheduled | published

  • type, string: post | page

post_get

read, Content key. One post by id or slug, with Markdown body, widgets and revision count.

  • id, string (required): id or slug

post_revisions

read. Earlier versions of a post (title, markdown, when).

  • id, string (required): id or slug
  • limit, integer: default 10

post_create

write. Create a draft post or page.

  • title, string (required)
  • authors, array: co-author user ids
  • canonical_url, string
  • custom_excerpt, string
  • feature_image, string: URL
  • feature_image_alt, string
  • featured, boolean
  • html, string: HTML body instead of Markdown (converted)
  • markdown, string: Markdown body
  • meta_description, string
  • meta_title, string
  • og_image, string
  • show_toc, boolean
  • slug, string
  • tags, string: comma-separated
  • type, string: post (default) | page

  • visibility, string: public | members | paid

post_update

write. Change any field of a post (same fields as post_create).

  • id, string (required): id or slug
  • authors, array
  • canonical_url, string
  • custom_excerpt, string
  • feature_image, string
  • feature_image_alt, string
  • featured, boolean
  • html, string
  • markdown, string
  • meta_description, string
  • meta_title, string
  • og_image, string
  • show_toc, boolean
  • slug, string
  • tags, string
  • title, string
  • type, string
  • visibility, string

post_publish

write. Publish now, or schedule with an ISO-8601 at.

  • id, string (required)
  • at, string: ISO-8601, in the future to schedule

post_unpublish

write. Back to draft.

  • id, string (required)

post_preview_link

write. A shareable link to read a draft (any status) without signing in. Stable per post.

  • id, string (required)

post_delete

destructive. Delete a post or page for good (revisions too).

  • id, string (required)

post_restore_revision

write. Put an earlier revision's title and body back (as a new revision).

  • id, string (required): post id or slug
  • revision, string (required): the revision's sk from post_revisions

newsletter_send

write. Mail a published post to every subscribed member who may read it. Once per post unless force.

  • id, string (required)
  • force, boolean: send again

newsletter_status

read. Has this post gone out, when, to how many.

  • id, string (required)

read, Content key. Full-text search over published posts.

  • query, string (required)
  • limit, integer: default 10

Widgets

widgets_list

read. Every widget: slug, name, kind, enabled, props, rev.

widget_get

read. A widget's definition with its Lua source.

  • slug, string (required)

widget_docs

read, Content key. How to write a Lua widget: functions, helpers, CSS classes, an example.

widget_versions

read. Saved versions of a Lua widget.

  • slug, string (required)

widget_test

read. Run Lua widget source without saving: init, render, apply events, render again.

  • source, string (required)
  • events, array: [{event, payload, visitor}]
  • props, object

widget_save

write. Create or update a Lua widget (a new version).

  • name, string (required)
  • slug, string (required)
  • source, string (required)
  • description, string
  • props, array: [{name, type, required, help}]

widget_rollback

write. Make an earlier version the current source.

  • rev, integer (required)
  • slug, string (required)

widget_enable

write. Enable or disable a widget.

  • enabled, boolean (required)
  • slug, string (required)

widget_delete

destructive. Delete a (non built-in) widget and its versions.

  • slug, string (required)

widget_state_get

read. The live shared state of one embedded widget instance.

  • instance, string (required): the instance id (post id:n or the id= prop)
  • slug, string (required)

widget_state_reset

write. Reset an instance's shared state (next render runs init again).

  • instance, string (required)
  • slug, string (required)

Members

members_list

read. Members, newest first: id, email, name, status, subscribed, labels.

  • limit, integer: default 50
  • status, string: free | paid | comped

member_get

read. One member by id or email.

  • id, string (required): id or email

member_create

write. Add a member.

  • email, string (required)
  • labels, array
  • name, string
  • note, string
  • status, string: free | paid | comped

  • subscribed, boolean
  • welcome, boolean: send the welcome mail

member_update

write. Change a member: name, status, labels, note, subscribed.

  • id, string (required): id or email
  • labels, array
  • name, string
  • note, string
  • status, string
  • subscribed, boolean

member_delete

destructive. Remove a member (and, with erase: true, their comments and sessions).

  • id, string (required): id or email
  • erase, boolean

members_export_csv

read. Every member as CSV.

members_import_csv

write. Members from CSV (header: email,name,status,labels,subscribed). Existing emails are skipped.

  • csv, string (required)

write. Mail a member a sign-in link.

  • id, string (required): id or email

Site, settings, themes

site_info

read, Content key. The site: settings, authors, counts, installed widgets and themes.

settings_get

read. Every site setting (title, description, navigation, theme, redirects, members/comments flags, Stripe price).

settings_update

write. Change site settings. Any of: title, description, lang, timezone, posts_per_page, accent (#hex), theme, navigation ([{label,url}]), footer, members_enabled, comments_enabled, redirects ([{from,to,permanent}]), stripe_price_id, paid_price_label.

  • accent, string: #rrggbb
  • comments_enabled, boolean
  • description, string
  • footer, string
  • lang, string
  • members_enabled, boolean
  • navigation, array: [{label, url}]
  • paid_price_label, string
  • posts_per_page, integer
  • redirects, array: [{from, to, permanent}]; from may end in * to keep the rest
  • stripe_price_id, string
  • theme, string: paper | ink

  • timezone, string
  • title, string

themes_list

read. Installed themes and which is active.

site_export

read. The whole site as a Ghost-compatible export (JSON).

site_import

write. Import a Ghost or Wraith export (the decoded JSON as data). Existing slugs/emails are skipped.

  • data, object (required): the export document

Authors

authors_list

read. Authors: id, name, slug, role, bio, socials.

author_create

write. Add an author (owner only). They get the password you give or a random one plus a reset mail.

  • email, string (required)
  • name, string (required)
  • bio, string
  • password, string: ≥ 10 chars; omit to mail a reset link

author_update

write. Change an author's profile: name, bio, avatar (URL), website, twitter, github, mastodon, location. Your own, or anyone's as owner.

  • avatar, string
  • bio, string
  • github, string
  • id, string: user id; defaults to you
  • location, string
  • mastodon, string
  • name, string
  • twitter, string
  • website, string

author_send_reset

write. Mail an author a password-reset link.

  • email, string (required)

Tags

tags_list

read, Content key. Every tag with its post count.

tag_upsert

write. Create a tag or rename/describe it.

  • slug, string (required)
  • accent, string: #rrggbb
  • description, string
  • name, string

tag_delete

destructive. Delete a tag (posts keep the label).

  • slug, string (required)

Uploads

uploads_list

read. The image library: uploaded originals, newest first, with URLs to reuse in posts.

  • limit, integer: default 60

upload_from_url

write. Fetch an image from a URL into the site's uploads; returns the hosted URL to use in posts.

  • url, string (required)
  • name, string: file name stem

upload_base64

write. Store an image given as base64; returns the hosted URL.

  • content_type, string (required): image/png etc.
  • data, string (required): base64 bytes
  • name, string

API keys

api_keys_list

read. API keys (never the secrets).

api_key_create

write. Create a Content (read) or Admin (read/write) API key; the key is returned once.

  • kind, string (required): content | admin

  • label, string (required)

api_key_delete

destructive. Revoke an API key.

  • id, string (required)

Comments

comments_list

read. Newest comments across the site, or one post's thread.

  • limit, integer: default 50
  • post_id, string: a post: its whole thread
  • status, string: published | hidden

comment_moderate

write. Hide, show or remove a comment.

  • action, string (required): hide | show | remove

  • id, string (required)
  • post_id, string (required)