Skip to content

Commit 80d0286

Browse files
Merge pull request #19 from Automattic/schema-bugfixes
Schema bugfixes
2 parents d834ab6 + 7d90641 commit 80d0286

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

includes/Core/McpProxyRoutes.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ public function list_tools( array $params ): WP_Error|WP_REST_Response {
185185

186186
return rest_ensure_response(
187187
array(
188-
'tools' => $tools,
189-
'nextCursor' => '',
188+
'tools' => $tools,
190189
)
191190
);
192191
}

includes/Core/RegisterMcpTool.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,12 @@ private function get_args_from_rest_api(): void {
125125
}
126126

127127
// Convert required array to object.
128-
$input_schema['properties'] = (object) $input_schema['properties'];
129-
$input_schema['required'] = (object) $input_schema['required'];
128+
if ( empty( $input_schema['properties'] ) ) {
129+
unset( $input_schema['properties'] );
130+
}
131+
if ( empty( $input_schema['required'] ) ) {
132+
unset( $input_schema['required'] );
133+
}
130134

131135
// Apply modifications if provided in rest_alias['modifications'] .
132136
if ( isset( $this->args['rest_alias']['inputSchemaReplacements'] ) ) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wordpress-mcp",
3-
"version": "0.1.10",
3+
"version": "0.1.11",
44
"description": "Wordpress MCP Settings",
55
"main": "src/index.js",
66
"private": true,

wordpress-mcp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Plugin name: WordPress MCP
44
* Description: A plugin to integrate WordPress with Model Context Protocol (MCP), providing AI-accessible interfaces to WordPress data and functionality through standardized tools, resources, and prompts. Enables AI assistants to interact with posts, users, site settings, and WooCommerce data.
5-
* Version: 0.1.10
5+
* Version: 0.1.11
66
* Author: Automattic AI, Ovidiu Galatan <ovidiu.galatan@a8c.com>
77
* Author URI: https://automattic.ai
88
* Text Domain: wordpress-mcp

0 commit comments

Comments
 (0)