Skip to main content
Glama

unity_script_update

Update the source code of an existing C# script in Unity by specifying its asset path and new content.

Instructions

Update the contents of an existing C# script file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAsset path of the script
portNoUnity instance port (from unity_select_instance). Always include it when multiple instances run.
contentYesNew full C# source code content
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only says 'Update' without specifying that the script file is overwritten, saved, or that recompilation may be triggered. There is no mention of required permissions or side effects.

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?

The description is a single, concise sentence that is front-loaded. However, it could include slightly more context without becoming verbose, such as mentioning that the content replaces the entire file.

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

Completeness2/5

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

Given the tool has three parameters and no output schema or annotations, the description is too sparse. It lacks guidance on when to use the optional 'port' parameter and does not explain the return behavior or error conditions.

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 description coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond the schema; it simply restates the tool's purpose without elaborating on parameters.

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

Purpose5/5

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

The description clearly states the action ('Update'), the resource ('existing C# script file'), and distinguishes it from sibling tools like unity_script_create (create new) and unity_script_read (read).

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

Usage Guidelines2/5

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

No usage guidelines provided. The description does not indicate when to use this tool vs alternatives, such as unity_script_create for new scripts or when a script does not exist. No prerequisites or context are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnkleBreaker-Studio/unity-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server