MCP tool argument object serialized as string causing schema validation failure
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When invoking the WordPress MCP execute-ability tool, the parameters argument appears to be serialized as a JSON string instead of an object.
This causes schema validation to fail on the WordPress MCP server with:
Ability "mcp-adapter/execute-ability" has invalid input.
Reason: input[parameters] is not of type object.
The tool schema defines parameters as:
parameters:
type: object
However the server appears to receive:
parameters: "{\"title\":\"MCP TEST\",\"status\":\"draft\"}"
instead of:
parameters: { "title": "MCP TEST", "status": "draft" }
This results in validation rejecting the input.
Important detail: a direct MCP invocation using call_mcp_tool with the same payload succeeds, creating a draft WordPress post.
This suggests the object → string conversion is happening in the client/tool invocation layer rather than on the WordPress server.
What Should Happen?
The MCP client should send parameters as a JSON object when invoking tools.
For example:
{
"ability_name": "content/create-post",
"parameters": {
"title": "MCP TEST",
"status": "draft"
}
}
This payload works correctly when executed directly via MCP, so the expected behavior is that the same object structure reaches the server during normal tool invocation.
Error Messages/Logs
The MCP client should send `parameters` as a JSON object when invoking tools.
For example:
{
"ability_name": "content/create-post",
"parameters": {
"title": "MCP TEST",
"status": "draft"
}
}
This payload works correctly when executed directly via MCP, so the expected behavior is that the same object structure reaches the server during normal tool invocation.
Steps to Reproduce
- Configure WordPress MCP in Cursor using:
{
"wordpress": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"]
}
}
- Ensure WordPress has the following plugins active:
- MCP Adapter 0.4.1
- MCP Expose Abilities 3.0.25
- Invoke the WordPress MCP tool
mcp-adapter-execute-abilityvia the agent/tool interface.
- Call the ability:
ability_name: "content/create-post"
- Provide arguments:
{
"ability_name": "content/create-post",
"parameters": {
"title": "MCP TEST",
"status": "draft"
}
}
- Observe the server response:
Ability "mcp-adapter/execute-ability" has invalid input.
Reason: input[parameters] is not of type object.
Control test:
Calling the same tool directly via MCP (call_mcp_tool) with the same payload succeeds and creates a draft post, indicating the server stack works correctly when the argument remains a true object.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.72 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗