Skip to content

Commit 0cd461c

Browse files
committed
Update docs
1 parent 986f5a6 commit 0cd461c

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

bin/generate-mcp-docs.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
$root = dirname( __DIR__ );
1717
require_once $root . '/vendor/autoload.php';
1818

19+
if ( ! function_exists( 'apply_filters' ) ) {
20+
function apply_filters( string $hook_name, mixed $value, mixed ...$args ): mixed {
21+
return $value;
22+
}
23+
}
24+
1925
if ( ! class_exists( 'WP_REST_Request' ) ) {
2026
class WP_REST_Request {
2127
private string $method;

docs/MCP-ABILITIES.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- This file is auto-generated by `composer docs:mcp`. Do not edit by hand. -->
44

5-
Saltus Framework exposes 17 WordPress-native MCP/Abilities tools.
5+
Saltus Framework exposes 18 WordPress-native MCP/Abilities tools.
66

77
| Tool | Ability | REST request | Description |
88
|------|---------|--------------|-------------|
@@ -21,6 +21,7 @@ Saltus Framework exposes 17 WordPress-native MCP/Abilities tools.
2121
| `list_posts` | `saltus/list-posts` | `GET /wp/v2/posts` | Query posts from a Custom Post Type with optional filters |
2222
| `list_terms` | `saltus/list-terms` | `GET /wp/v2/{taxonomy_rest_base}` | List terms from a taxonomy (categories, tags, or custom taxonomies) |
2323
| `reorder_posts` | `saltus/reorder-posts` | `POST /saltus-framework/v1/reorder` | Reorder multiple posts by updating their menu_order values in a single batch operation |
24+
| `update_meta_fields` | `saltus/update-meta-fields` | `PUT /saltus-framework/v1/meta/{post_type}/123` | Update meta fields for a specific post of a registered Saltus post type |
2425
| `update_post` | `saltus/update-post` | `PUT /wp/v2/posts/123` | Update an existing post's fields and meta data |
2526
| `update_settings` | `saltus/update-settings` | `PUT /saltus-framework/v1/settings/{post_type}` | Update the Saltus Framework settings for a specific post type |
2627

@@ -284,6 +285,24 @@ Reorder multiple posts by updating their menu_order values in a single batch ope
284285
|-----------|------|----------|---------|-------------|
285286
| `items` | `array` | yes | | Array of objects with "id" (post ID) and "menu_order" (integer position) |
286287

288+
## `update_meta_fields`
289+
290+
Update meta fields for a specific post of a registered Saltus post type
291+
292+
- Ability: `saltus/update-meta-fields`
293+
- REST request: `PUT /saltus-framework/v1/meta/{post_type}/123`
294+
- REST capability: `meta (post_type)`
295+
- Cacheable: `no`
296+
- Cache TTL: `n/a`
297+
298+
### Parameters
299+
300+
| Parameter | Type | Required | Default | Description |
301+
|-----------|------|----------|---------|-------------|
302+
| `post_id` | `number` | yes | | The post ID to update meta fields for |
303+
| `post_type` | `string` | yes | | The post type slug |
304+
| `meta` | `object` | yes | | Meta fields to update as key-value pairs |
305+
287306
## `update_post`
288307

289308
Update an existing post's fields and meta data

docs/MCP.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ Config section keys:
190190
| `list_posts` | `saltus/list-posts` | `GET /wp/v2/posts` | Query posts from a Custom Post Type with optional filters |
191191
| `list_terms` | `saltus/list-terms` | `GET /wp/v2/{taxonomy_rest_base}` | List terms from a taxonomy (categories, tags, or custom taxonomies) |
192192
| `reorder_posts` | `saltus/reorder-posts` | `POST /saltus-framework/v1/reorder` | Reorder multiple posts by updating their menu_order values in a single batch operation |
193+
| `update_meta_fields` | `saltus/update-meta-fields` | `PUT /saltus-framework/v1/meta/{post_type}/123` | Update meta fields for a specific post of a registered Saltus post type |
193194
| `update_post` | `saltus/update-post` | `PUT /wp/v2/posts/123` | Update an existing post's fields and meta data |
194195
| `update_settings` | `saltus/update-settings` | `PUT /saltus-framework/v1/settings/{post_type}` | Update the Saltus Framework settings for a specific post type |
195196

0 commit comments

Comments
 (0)