Unity Get Script Source
unity_get_script_sourceRetrieve the source code of any C# script from the Unity Assets folder by providing its relative path.
Instructions
Read the source code of a C# script file from the Unity project's Assets folder.
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": {
"scriptPath": "<scriptPath>"
},
"name": "unity_get_script_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scriptPath | Yes | Relative path from Assets/ (e.g. 'Scripts/PlayerController.cs'). | |
| timeoutMs | No | Command timeout. |