Skip to content

Abilities API: Forms#1104

Merged
n7studios merged 17 commits into
abilities-api-resourcesfrom
abilities-api-forms
Jun 22, 2026
Merged

Abilities API: Forms#1104
n7studios merged 17 commits into
abilities-api-resourcesfrom
abilities-api-forms

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Registers four abilities (MCP tools) for the Form block/shortcode, so an MCP client can list, insert, update and delete Kit Forms inside a post's content.

Screenshot 2026-05-27 at 22 53 02
Ability Description Required input Output
kit/form-list Lists every Kit Form block in the given post, with each occurrence's index and form ID. post_id { post_id, count, occurrences: [{ occurrence_index, attrs }] }
kit/form-insert Inserts a new Kit Form block. Position: append (default), prepend, or index with numeric index. post_id, attrs.form { post_id, occurrence_index }
kit/form-update Updates the attrs of a specific Form block by occurrence index. post_id, occurrence_index, attrs.form { post_id, occurrence_index }
kit/form-delete Removes a specific Form block by occurrence index. post_id, occurrence_index { post_id, occurrence_index }

Improves the descriptions of the tools.

Testing

  • MCPContentFormTest: Tests that MCP tools are registered, permissions are honored, insert/update/delete tools work.

Checklist

@n7studios n7studios added this to the 3.4.0 milestone May 27, 2026
@n7studios n7studios self-assigned this May 27, 2026
@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 June 17, 2026 08:45
@n7studios n7studios marked this pull request as ready for review June 17, 2026 08:45

@ciccio-kit ciccio-kit left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM ✅

'convertkit/' . $this->block->get_name(),
$this->block->get_title()
__( 'Inserts a new %s in a Page, Post or Custom Post\'s content. The element can be appended (default), prepended, or inserted relative to an existing element using a zero-based index.', 'convertkit' ),
$this->block->get_title_plural()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nitpick (non-blocking): this and other descriptions for tools that work on a single item should probably not use the plural (label looks good)

@@ -59,9 +59,8 @@ public function get_description() {

return sprintf(
/* translators: 1: block full name e.g. convertkit/form, 2: block title */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

niptick (non-blocking): should this comment be updated like in the other get_description in this PR?

@n7studios n7studios merged commit 7d339d4 into abilities-api-resources Jun 22, 2026
@n7studios n7studios deleted the abilities-api-forms branch June 22, 2026 02:50
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.

2 participants