Skip to content

script-execute runs successfully, but MCP server return error. #779

@tianlang0704

Description

@tianlang0704
Image

Tried to fix it by changingTool_Script.Execute return type from SerializedMember? to ResponseCallTool to ensure structured content is always returned. When script returns void, now returns a success message instead of null. This fixes MCP error -32600 which occurs when a tool has output schema but returns null.

Didn't create pull request because don't know how this repo works and it's a minimal fix, but here's the branch.
main...tianlang0704:Unity-MCP:fix/script-execute-mcp-error-32600

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions