Skip to main content

execute_custom_tool

Auto-generated from the Python tool registry. Do not hand-edit outside <!-- examples:start --><!-- examples:end --> blocks — the generator (tools/generate_docs_reference.py) will overwrite them.

Group: core  ·  Module: services.tools.execute_custom_tool

Maturity: stable (support status; independent of enabled state, readiness and permissions).

Description​

Execute a project-scoped custom tool registered by Unity. Built-in tools and internal native aliases require their canonical public API.

Parameters​

NameTypeRequiredDescription
tool_namestryes
parametersdict[str, Any] | None—
unity_instancestr | int | None—Target Unity instance for this call: Name@hash or hash prefix; an integer selects only that exact port over stdio and is rejected over HTTP. Read mcpforunity://instances for available targets. Omit to use the legacy active selection or the sole available instance.

Returns​

A dict containing the Unity response. The exact shape depends on the action.

Examples​

Call the my_custom_tool handler after installing and discovering the sample from the custom tool guide. Pass the parameters declared by that project handler. Run this in the project that registered it.

MCP arguments
{
"tool_name": "my_custom_tool",
"parameters": {
"param1": "Harbor",
"param2": 2
}
}