Skip to content

Commit ff5c60d

Browse files
Merge pull request #20 from Automattic/gemini-bugfixes-1
Gemini bug fixes wip
2 parents 80d0286 + 0e6f8e0 commit ff5c60d

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

includes/Core/RegisterMcpTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private function get_args_from_rest_api(): void {
101101
}
102102

103103
// Handle default values if present.
104-
if ( isset( $arg_schema['default'] ) ) {
104+
if ( isset( $arg_schema['default'] ) && ! empty( $arg_schema['default'] ) ) {
105105
$input_schema['properties'][ $arg_name ]['default'] = $arg_schema['default'];
106106
}
107107

includes/Core/WpMcp.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ public function register_tool( array $args ): void {
232232

233233
unset( $args['callback'] );
234234
unset( $args['permissions_callback'] );
235+
unset( $args['rest_alias'] );
235236
$this->tools[] = $args;
236237
}
237238

includes/Tools/McpUsersTools.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ public function register_tools(): void {
3838
),
3939
'required' => array(
4040
'context',
41-
'id',
42-
'who',
4341
),
4442
),
4543
),
@@ -64,8 +62,16 @@ public function register_tools(): void {
6462
'description' => 'Add a new WordPress user',
6563
'type' => 'create',
6664
'rest_alias' => array(
67-
'route' => '/wp/v2/users',
68-
'method' => 'POST',
65+
'route' => '/wp/v2/users',
66+
'method' => 'POST',
67+
'inputSchemaReplacements' => array(
68+
'properties' => array(
69+
'locale' => null,
70+
),
71+
'required' => array(
72+
'context',
73+
),
74+
),
6975
),
7076
)
7177
);

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.11",
3+
"version": "0.1.12",
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.11
5+
* Version: 0.1.12
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)