Skip to content

Abilities API: Post Settings#1143

Open
n7studios wants to merge 1 commit into
abilities-api-authenticationfrom
abilities-api-post-settings
Open

Abilities API: Post Settings#1143
n7studios wants to merge 1 commit into
abilities-api-authenticationfrom
abilities-api-post-settings

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Registers get and update abilities (MCP tools) for the per-Post Kit settings (Form, Landing Page, Tag, Member Content / Restrict Content) stored in the _wp_convertkit_post_meta post meta, so an MCP client can fetch and update these settings for any Post, Page or Custom Post Type. Partial updates are supported; the Restrict Content cache stays in sync automatically via the existing updated_post_meta hook.

Ability Description Required input Output
kit/post-settings-get Returns the current Kit settings (form, landing_page, tag, restrict_content) for the given Post, Page or Custom Post Type. { post_id } { post_id, form, landing_page, tag, restrict_content }
kit/post-settings-update Updates one or more Kit settings for the given Post, Page or Custom Post Type. Only the settings provided in the input are updated; other settings are preserved. Unknown keys are rejected. { post_id } plus a partial object of any subset of: form, landing_page, tag, restrict_content same shape as kit/post-settings-get (post-save state)

Testing

  • MCPPostSettingsGetTest: Tests that the MCP tool is registered, permissions are honored (edit_post capability required), defaults are returned when no post meta exists, stored values are returned when set, non-existent post IDs are rejected, and the tool works across post types (Post, Page).
  • MCPPostSettingsUpdateTest: Tests that the MCP tool is registered, full and partial updates persist correctly, unknown keys and malformed form / restrict_content values are rejected, empty input is rejected, non-existent post IDs are rejected, the update → get round-trip returns the updated values, and setting or clearing restrict_content correctly populates or removes the Post from the Restrict Content cache.

Checklist

@n7studios n7studios added this to the 3.4.0 milestone Jul 22, 2026
@n7studios n7studios self-assigned this Jul 22, 2026
public static function get_server_url() {

return rest_url( self::SERVER_NAMESPACE . '/' . self::SERVER_ROUTE . '/mcp' );
return rest_url( self::SERVER_NAMESPACE . '/' . self::SERVER_ROUTE );

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't have /mcp appended to it - not sure how this was added in an earlier PR.

@github-actions

Copy link
Copy Markdown

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios
n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team July 22, 2026 12:54
@n7studios
n7studios marked this pull request as ready for review July 22, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant