Skip to content

Add ToolAnnotations (readOnlyHint, etc.) to MCP tools #3

Description

@nowsprinting

Summary

Add MCP ToolAnnotations to each tool in this plugin to help clients (e.g., Claude Code)
understand whether a tool modifies state, so they can make better decisions about
auto-approval or confirmation prompts.

Planned Annotations per Tool

Tool readOnlyHint destructiveHint idempotentHint openWorldHint
get_unity_compilation_result true false
run_unity_tests true false
run_method_in_unity false true false false
unity_play_control false false false false

Notes:

  • destructiveHint and idempotentHint are only set when readOnlyHint is false
  • run_unity_tests: read-only because test execution does not persist state changes
  • run_method_in_unity: destructiveHint is true — the called method is arbitrary

Prerequisite

This issue depends on JetBrains adding ToolAnnotations support to the McpToolset
extension point API.

Upstream feature request: https://youtrack.jetbrains.com/issue/IJPL-238125/MCP-Server-Support-ToolAnnotations-readOnlyHint-destructiveHint-etc.

Until IJPL-238125 is resolved and a new Rider release includes the fix, this issue
cannot be implemented.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions