Skip to main content
Glama

unity_invoke

Invoke a public static C# method by type and method name with JSON arguments, serving as an escape hatch for Unity actions not covered by dedicated tools.

Instructions

Invoke a public static C# method by type+method name with JSON args (escape hatch for anything not covered). (Unity editor offline right now: schemas are cached; calls will fail until it reconnects)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "type": "<type>",
      "method": "<method>"
    },
    "name": "unity_invoke"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNopositional args, coerced to parameter types
typeYesfull type name, e.g. UnityEngine.Debug
methodYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden. It does disclose one valuable operational fact (editor offline, calls will fail until reconnect), but says nothing about side effects of arbitrary method invocation, whether the method's return value is surfaced, how errors are reported, or any safety limits on what can be executed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with the core capability front-loaded and the caveat parenthesized at the end. Every clause earns its place, though the offline notice is time-sensitive content that will become stale or misleading once the editor reconnects.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With three parameters, no output schema, and no annotations, the description should say what a successful call returns (e.g., the method's return value) and how failures surface. It covers the offline failure mode but leaves the success path and result shape unspecified, which matters for a generic escape-hatch tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%: args and type are documented in the schema, method is not. The description restates 'type+method name with JSON args' and adds the 'public static' constraint on the target, but adds no format or coercion detail beyond what the schema already says.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: invoke a public static C# method by type+method name with JSON args. The parenthetical 'escape hatch for anything not covered' frames its role, but it never names unity_run_csharp, the closest sibling that also executes C#, so the boundary between the two is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Escape hatch for anything not covered' implies a last-resort usage pattern, which is useful positioning. However, there is no explicit when-not guidance, no mention of when unity_run_csharp or the dedicated set_/get_ tools should be preferred, and no prerequisite that the target must be public static.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.