godot-mcp-runtime 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -46
- package/dist/index.js +71 -10
- package/dist/index.js.map +1 -1
- package/dist/tools/node-tools.d.ts +121 -1
- package/dist/tools/node-tools.d.ts.map +1 -1
- package/dist/tools/node-tools.js +437 -277
- package/dist/tools/node-tools.js.map +1 -1
- package/dist/tools/project-tools.d.ts +85 -1
- package/dist/tools/project-tools.d.ts.map +1 -1
- package/dist/tools/project-tools.js +276 -192
- package/dist/tools/project-tools.js.map +1 -1
- package/dist/tools/scene-tools.d.ts +61 -1
- package/dist/tools/scene-tools.d.ts.map +1 -1
- package/dist/tools/scene-tools.js +246 -210
- package/dist/tools/scene-tools.js.map +1 -1
- package/dist/utils/godot-runner.d.ts +14 -0
- package/dist/utils/godot-runner.d.ts.map +1 -1
- package/dist/utils/godot-runner.js +59 -1
- package/dist/utils/godot-runner.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Godot MCP
|
|
1
|
+
# Godot MCP Runtime
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/godot-mcp-runtime)
|
|
4
4
|
[](https://www.npmjs.com/package/godot-mcp-runtime)
|
|
@@ -19,7 +19,7 @@ Think of it as [Playwright MCP](https://github.com/microsoft/playwright-mcp), bu
|
|
|
19
19
|
|
|
20
20
|
This is not a playtesting replacement. It doesn't catch the subtle feel issues that only a human notices, and it won't tell you if your game is fun. What it does is let an agent confirm that a scene loads, a button responds, a value updated, a script ran without errors. That's a fundamentally different development workflow, and it's what this server is built for.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Every operation is its own tool with only its relevant parameters — no operation discriminators, no conditional schemas. Each tool teaches agents how to use it through its description and response messages: what to call next, when to wait, and how to recover from errors.
|
|
23
23
|
|
|
24
24
|
## What It Does
|
|
25
25
|
|
|
@@ -99,9 +99,7 @@ Ask your AI assistant to call `get_project_info`. If it returns a Godot version
|
|
|
99
99
|
|
|
100
100
|
## Tools
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
### Project
|
|
102
|
+
### Project Management
|
|
105
103
|
|
|
106
104
|
| Tool | Description |
|
|
107
105
|
|------|-------------|
|
|
@@ -119,67 +117,59 @@ After calling `run_project`, wait 2-3 seconds for the bridge to initialize befor
|
|
|
119
117
|
| Tool | Description |
|
|
120
118
|
|------|-------------|
|
|
121
119
|
| `take_screenshot` | Capture a PNG of the running viewport |
|
|
122
|
-
| `simulate_input` | Send batched input: key,
|
|
120
|
+
| `simulate_input` | Send batched input: key, mouse, click_element, action, wait |
|
|
123
121
|
| `get_ui_elements` | Get all visible Control nodes with positions, types, and text |
|
|
124
122
|
| `run_script` | Execute arbitrary GDScript at runtime with full SceneTree access |
|
|
125
123
|
|
|
126
|
-
### Scene
|
|
124
|
+
### Scene Editing (headless)
|
|
127
125
|
|
|
128
|
-
All mutation operations save automatically. Use `
|
|
126
|
+
All mutation operations save automatically. Use `save_scene` only for save-as (`newPath`) or to re-canonicalize a `.tscn` file.
|
|
129
127
|
|
|
130
|
-
|
|
|
131
|
-
|
|
132
|
-
| `
|
|
133
|
-
| `add_node` | Add a node to an existing scene |
|
|
128
|
+
| Tool | Description |
|
|
129
|
+
|------|-------------|
|
|
130
|
+
| `create_scene` | Create a new scene file |
|
|
131
|
+
| `add_node` | Add a node to an existing scene (supports promoted spatial params) |
|
|
134
132
|
| `load_sprite` | Set a texture on a Sprite2D, Sprite3D, or TextureRect |
|
|
135
|
-
| `
|
|
133
|
+
| `save_scene` | Re-pack and save the scene, or save-as with `newPath` |
|
|
136
134
|
| `export_mesh_library` | Export scenes as a MeshLibrary for GridMap |
|
|
137
|
-
| `
|
|
135
|
+
| `batch_scene_operations` | Run multiple add_node/load_sprite/save ops in a single Godot process |
|
|
138
136
|
|
|
139
|
-
### Node
|
|
137
|
+
### Node Editing (headless)
|
|
140
138
|
|
|
141
139
|
All mutation operations save automatically.
|
|
142
140
|
|
|
143
|
-
|
|
|
144
|
-
|
|
145
|
-
| `
|
|
146
|
-
| `
|
|
147
|
-
| `
|
|
148
|
-
| `
|
|
141
|
+
| Tool | Description |
|
|
142
|
+
|------|-------------|
|
|
143
|
+
| `get_scene_tree` | Get the full scene tree hierarchy (use `maxDepth: 1` for shallow listing) |
|
|
144
|
+
| `get_node_properties` | Read properties from a node |
|
|
145
|
+
| `batch_get_node_properties` | Read properties from multiple nodes in one process |
|
|
146
|
+
| `set_node_property` | Set a property on a node |
|
|
147
|
+
| `batch_set_node_properties` | Set multiple properties in one process |
|
|
149
148
|
| `attach_script` | Attach a GDScript to a node |
|
|
150
|
-
| `
|
|
151
|
-
| `
|
|
152
|
-
| `
|
|
149
|
+
| `duplicate_node` | Duplicate a node within the scene |
|
|
150
|
+
| `delete_node` | Remove a node from the scene |
|
|
151
|
+
| `get_node_signals` | List all signals on a node with their connections |
|
|
153
152
|
| `connect_signal` | Connect a signal to a method on another node |
|
|
154
153
|
| `disconnect_signal` | Disconnect a signal connection |
|
|
155
154
|
|
|
156
|
-
### Project
|
|
155
|
+
### Project Config (no Godot process required)
|
|
157
156
|
|
|
158
|
-
|
|
157
|
+
These tools edit `project.godot` directly or read the filesystem. Safe to use even when autoloads are broken.
|
|
159
158
|
|
|
160
|
-
|
|
|
161
|
-
|
|
159
|
+
| Tool | Description |
|
|
160
|
+
|------|-------------|
|
|
162
161
|
| `list_autoloads` | List all registered autoloads with paths and singleton status |
|
|
163
162
|
| `add_autoload` | Register a new autoload |
|
|
164
163
|
| `remove_autoload` | Unregister an autoload by name |
|
|
165
164
|
| `update_autoload` | Modify an existing autoload's path or singleton flag |
|
|
166
165
|
| `get_project_settings` | Read settings from `project.godot` by section and key |
|
|
167
|
-
| `
|
|
168
|
-
| `
|
|
166
|
+
| `get_project_files` | Get the project file tree with types and extensions |
|
|
167
|
+
| `search_project` | Search for a string across project source files |
|
|
169
168
|
| `get_scene_dependencies` | List all resources a scene depends on |
|
|
170
169
|
|
|
171
|
-
###
|
|
172
|
-
|
|
173
|
-
Validate before attaching or running. Catches syntax errors and missing resource references before they cause headless crashes or runtime failures.
|
|
174
|
-
|
|
175
|
-
| Input | Description |
|
|
176
|
-
|-------|-------------|
|
|
177
|
-
| `scriptPath` | Validate an existing `.gd` file in the project |
|
|
178
|
-
| `source` | Validate inline GDScript written to a temp file |
|
|
179
|
-
| `scenePath` | Validate a `.tscn` file and check that all `ext_resource` references resolve |
|
|
180
|
-
| `targets` | Array of the above — validate multiple scripts or scenes in a single Godot process |
|
|
170
|
+
### Validation: `validate`
|
|
181
171
|
|
|
182
|
-
|
|
172
|
+
Validate before attaching or running. Catches syntax errors and missing resource references before they cause headless crashes or runtime failures. Supports `scriptPath`, `source` (inline GDScript), `scenePath`, or a `targets` array for batch validation.
|
|
183
173
|
|
|
184
174
|
### UIDs: `manage_uids` (Godot 4.4+)
|
|
185
175
|
|
|
@@ -194,15 +184,15 @@ Returns `{ valid, errors: [{ line?, message }] }` per target. Fix reported error
|
|
|
194
184
|
src/
|
|
195
185
|
├── index.ts # MCP server entry point, routes tool calls
|
|
196
186
|
├── tools/
|
|
197
|
-
│ ├── project-tools.ts # Project
|
|
198
|
-
│ ├── scene-tools.ts # Scene
|
|
199
|
-
│ ├── node-tools.ts # Node
|
|
187
|
+
│ ├── project-tools.ts # Project, runtime, autoload, filesystem, search, settings
|
|
188
|
+
│ ├── scene-tools.ts # Scene creation, node addition, sprite loading, batch ops, UIDs
|
|
189
|
+
│ ├── node-tools.ts # Node properties, scripts, tree, duplication, signals
|
|
200
190
|
│ └── validate-tools.ts # GDScript and scene validation
|
|
201
191
|
├── scripts/
|
|
202
192
|
│ ├── godot_operations.gd # Headless GDScript operations
|
|
203
193
|
│ └── mcp_bridge.gd # UDP autoload for runtime communication
|
|
204
194
|
└── utils/
|
|
205
|
-
└── godot-runner.ts # Process spawning, output parsing
|
|
195
|
+
└── godot-runner.ts # Process spawning, output parsing, shared validation helpers
|
|
206
196
|
```
|
|
207
197
|
|
|
208
198
|
Headless operations spawn Godot with `--headless --script godot_operations.gd`, perform the operation, and return JSON. Runtime operations communicate over UDP with the injected `McpBridge` autoload.
|
|
@@ -221,7 +211,7 @@ Files generated during runtime (screenshots, executed scripts) are stored in `.m
|
|
|
221
211
|
|
|
222
212
|
## Broken Autoloads
|
|
223
213
|
|
|
224
|
-
If any registered autoload fails to initialize (syntax error, missing resource, display dependency), Godot's headless process will crash before any operation runs. Use `
|
|
214
|
+
If any registered autoload fails to initialize (syntax error, missing resource, display dependency), Godot's headless process will crash before any operation runs. Use `list_autoloads` and `remove_autoload` to inspect and remove the failing autoload. These tools edit `project.godot` directly, with no Godot process involved.
|
|
225
215
|
|
|
226
216
|
## Acknowledgments
|
|
227
217
|
|
package/dist/index.js
CHANGED
|
@@ -11,11 +11,11 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
11
11
|
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from '@modelcontextprotocol/sdk/types.js';
|
|
12
12
|
import { GodotRunner } from './utils/godot-runner.js';
|
|
13
13
|
// Project tools
|
|
14
|
-
import { projectToolDefinitions, handleLaunchEditor, handleRunProject, handleGetDebugOutput, handleStopProject, handleListProjects, handleGetProjectInfo, handleTakeScreenshot, handleSimulateInput, handleGetUiElements, handleRunScript,
|
|
14
|
+
import { projectToolDefinitions, handleLaunchEditor, handleRunProject, handleGetDebugOutput, handleStopProject, handleListProjects, handleGetProjectInfo, handleTakeScreenshot, handleSimulateInput, handleGetUiElements, handleRunScript, handleListAutoloads, handleAddAutoload, handleRemoveAutoload, handleUpdateAutoload, handleGetProjectFiles, handleSearchProject, handleGetSceneDependencies, handleGetProjectSettings, } from './tools/project-tools.js';
|
|
15
15
|
// Scene tools
|
|
16
|
-
import { sceneToolDefinitions,
|
|
16
|
+
import { sceneToolDefinitions, handleCreateScene, handleAddNode, handleLoadSprite, handleSaveScene, handleExportMeshLibrary, handleBatchSceneOperations, handleManageUids, } from './tools/scene-tools.js';
|
|
17
17
|
// Node tools
|
|
18
|
-
import { nodeToolDefinitions,
|
|
18
|
+
import { nodeToolDefinitions, handleDeleteNode, handleSetNodeProperty, handleBatchSetNodeProperties, handleGetNodeProperties, handleBatchGetNodeProperties, handleAttachScript, handleGetSceneTree, handleDuplicateNode, handleGetNodeSignals, handleConnectSignal, handleDisconnectSignal, } from './tools/node-tools.js';
|
|
19
19
|
// Validate tools
|
|
20
20
|
import { validateToolDefinitions, handleValidate, } from './tools/validate-tools.js';
|
|
21
21
|
class GodotMcpServer {
|
|
@@ -25,11 +25,28 @@ class GodotMcpServer {
|
|
|
25
25
|
this.runner = new GodotRunner(config);
|
|
26
26
|
this.server = new Server({
|
|
27
27
|
name: 'godot-mcp',
|
|
28
|
-
version: '
|
|
28
|
+
version: '2.0.0',
|
|
29
29
|
}, {
|
|
30
30
|
capabilities: {
|
|
31
31
|
tools: {},
|
|
32
32
|
},
|
|
33
|
+
instructions: `Godot MCP Server — AI-driven Godot 4.x project manipulation.
|
|
34
|
+
|
|
35
|
+
Tool categories:
|
|
36
|
+
- Project management: launch_editor, run_project, stop_project, get_debug_output, list_projects, get_project_info
|
|
37
|
+
- Scene editing (headless): create_scene, add_node, load_sprite, save_scene, export_mesh_library, batch_scene_operations
|
|
38
|
+
- Node editing (headless): delete_node, set_node_property, batch_set_node_properties, get_node_properties, batch_get_node_properties, attach_script, get_scene_tree, duplicate_node, get_node_signals, connect_signal, disconnect_signal
|
|
39
|
+
- Runtime (requires run_project): take_screenshot, simulate_input, get_ui_elements, run_script
|
|
40
|
+
- Project config (no Godot process): list_autoloads, add_autoload, remove_autoload, update_autoload, get_project_files, search_project, get_scene_dependencies, get_project_settings
|
|
41
|
+
- Validation: validate
|
|
42
|
+
- UIDs (Godot 4.4+): manage_uids
|
|
43
|
+
|
|
44
|
+
Key behaviors:
|
|
45
|
+
- All mutation operations (add_node, set_node_property, delete_node, etc.) save the scene automatically. Only use save_scene for save-as (newPath) or re-canonicalization.
|
|
46
|
+
- Headless Godot initializes ALL registered autoloads. If any autoload is broken, headless operations will fail. Use list_autoloads / remove_autoload to diagnose.
|
|
47
|
+
- After run_project, wait 2-3 seconds before using runtime tools (take_screenshot, simulate_input, get_ui_elements, run_script). The MCP bridge needs time to initialize.
|
|
48
|
+
- click_element in simulate_input resolves by node path or node name (BFS search), NOT by visible text. Use get_ui_elements to discover valid element identifiers.
|
|
49
|
+
- run_script expects GDScript with "extends RefCounted" and "func execute(scene_tree: SceneTree) -> Variant".`,
|
|
33
50
|
});
|
|
34
51
|
this.setupToolHandlers();
|
|
35
52
|
this.server.onerror = (error) => console.error('[MCP Error]', error);
|
|
@@ -84,16 +101,60 @@ class GodotMcpServer {
|
|
|
84
101
|
return await handleGetUiElements(this.runner, args);
|
|
85
102
|
case 'run_script':
|
|
86
103
|
return await handleRunScript(this.runner, args);
|
|
87
|
-
case '
|
|
88
|
-
return await
|
|
104
|
+
case 'list_autoloads':
|
|
105
|
+
return await handleListAutoloads(args);
|
|
106
|
+
case 'add_autoload':
|
|
107
|
+
return await handleAddAutoload(args);
|
|
108
|
+
case 'remove_autoload':
|
|
109
|
+
return await handleRemoveAutoload(args);
|
|
110
|
+
case 'update_autoload':
|
|
111
|
+
return await handleUpdateAutoload(args);
|
|
112
|
+
case 'get_project_files':
|
|
113
|
+
return await handleGetProjectFiles(args);
|
|
114
|
+
case 'search_project':
|
|
115
|
+
return await handleSearchProject(args);
|
|
116
|
+
case 'get_scene_dependencies':
|
|
117
|
+
return await handleGetSceneDependencies(args);
|
|
118
|
+
case 'get_project_settings':
|
|
119
|
+
return await handleGetProjectSettings(args);
|
|
89
120
|
// Scene tools
|
|
90
|
-
case '
|
|
91
|
-
return await
|
|
121
|
+
case 'create_scene':
|
|
122
|
+
return await handleCreateScene(this.runner, args);
|
|
123
|
+
case 'add_node':
|
|
124
|
+
return await handleAddNode(this.runner, args);
|
|
125
|
+
case 'load_sprite':
|
|
126
|
+
return await handleLoadSprite(this.runner, args);
|
|
127
|
+
case 'save_scene':
|
|
128
|
+
return await handleSaveScene(this.runner, args);
|
|
129
|
+
case 'export_mesh_library':
|
|
130
|
+
return await handleExportMeshLibrary(this.runner, args);
|
|
131
|
+
case 'batch_scene_operations':
|
|
132
|
+
return await handleBatchSceneOperations(this.runner, args);
|
|
92
133
|
case 'manage_uids':
|
|
93
134
|
return await handleManageUids(this.runner, args);
|
|
94
135
|
// Node tools
|
|
95
|
-
case '
|
|
96
|
-
return await
|
|
136
|
+
case 'delete_node':
|
|
137
|
+
return await handleDeleteNode(this.runner, args);
|
|
138
|
+
case 'set_node_property':
|
|
139
|
+
return await handleSetNodeProperty(this.runner, args);
|
|
140
|
+
case 'batch_set_node_properties':
|
|
141
|
+
return await handleBatchSetNodeProperties(this.runner, args);
|
|
142
|
+
case 'get_node_properties':
|
|
143
|
+
return await handleGetNodeProperties(this.runner, args);
|
|
144
|
+
case 'batch_get_node_properties':
|
|
145
|
+
return await handleBatchGetNodeProperties(this.runner, args);
|
|
146
|
+
case 'attach_script':
|
|
147
|
+
return await handleAttachScript(this.runner, args);
|
|
148
|
+
case 'get_scene_tree':
|
|
149
|
+
return await handleGetSceneTree(this.runner, args);
|
|
150
|
+
case 'duplicate_node':
|
|
151
|
+
return await handleDuplicateNode(this.runner, args);
|
|
152
|
+
case 'get_node_signals':
|
|
153
|
+
return await handleGetNodeSignals(this.runner, args);
|
|
154
|
+
case 'connect_signal':
|
|
155
|
+
return await handleConnectSignal(this.runner, args);
|
|
156
|
+
case 'disconnect_signal':
|
|
157
|
+
return await handleDisconnectSignal(this.runner, args);
|
|
97
158
|
// Validate tools
|
|
98
159
|
case 'validate':
|
|
99
160
|
return await handleValidate(this.runner, args);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,sBAAsB,EACtB,QAAQ,GACT,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAqB,MAAM,yBAAyB,CAAC;AAEzE,gBAAgB;AAChB,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,SAAS,EACT,sBAAsB,EACtB,QAAQ,GACT,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAqB,MAAM,yBAAyB,CAAC;AAEzE,gBAAgB;AAChB,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAElC,cAAc;AACd,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,GACjB,MAA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K,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;YAC9E,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,YAAY,CAAC,CAAC;YACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF;AAED,4BAA4B;AAC5B,MAAM,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;AACpC,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACpC,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;IAC9E,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,YAAY,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,126 @@
|
|
|
1
1
|
import { GodotRunner, OperationParams, ToolDefinition } from '../utils/godot-runner.js';
|
|
2
2
|
export declare const nodeToolDefinitions: ToolDefinition[];
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function handleDeleteNode(runner: GodotRunner, args: OperationParams): Promise<{
|
|
4
|
+
content: Array<{
|
|
5
|
+
type: "text";
|
|
6
|
+
text: string;
|
|
7
|
+
}>;
|
|
8
|
+
isError: boolean;
|
|
9
|
+
} | {
|
|
10
|
+
content: {
|
|
11
|
+
type: string;
|
|
12
|
+
text: string;
|
|
13
|
+
}[];
|
|
14
|
+
}>;
|
|
15
|
+
export declare function handleSetNodeProperty(runner: GodotRunner, args: OperationParams): Promise<{
|
|
16
|
+
content: Array<{
|
|
17
|
+
type: "text";
|
|
18
|
+
text: string;
|
|
19
|
+
}>;
|
|
20
|
+
isError: boolean;
|
|
21
|
+
} | {
|
|
22
|
+
content: {
|
|
23
|
+
type: string;
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
26
|
+
}>;
|
|
27
|
+
export declare function handleBatchSetNodeProperties(runner: GodotRunner, args: OperationParams): Promise<{
|
|
28
|
+
content: Array<{
|
|
29
|
+
type: "text";
|
|
30
|
+
text: string;
|
|
31
|
+
}>;
|
|
32
|
+
isError: boolean;
|
|
33
|
+
} | {
|
|
34
|
+
content: {
|
|
35
|
+
type: string;
|
|
36
|
+
text: string;
|
|
37
|
+
}[];
|
|
38
|
+
}>;
|
|
39
|
+
export declare function handleGetNodeProperties(runner: GodotRunner, args: OperationParams): Promise<{
|
|
40
|
+
content: Array<{
|
|
41
|
+
type: "text";
|
|
42
|
+
text: string;
|
|
43
|
+
}>;
|
|
44
|
+
isError: boolean;
|
|
45
|
+
} | {
|
|
46
|
+
content: {
|
|
47
|
+
type: string;
|
|
48
|
+
text: string;
|
|
49
|
+
}[];
|
|
50
|
+
}>;
|
|
51
|
+
export declare function handleBatchGetNodeProperties(runner: GodotRunner, args: OperationParams): Promise<{
|
|
52
|
+
content: Array<{
|
|
53
|
+
type: "text";
|
|
54
|
+
text: string;
|
|
55
|
+
}>;
|
|
56
|
+
isError: boolean;
|
|
57
|
+
} | {
|
|
58
|
+
content: {
|
|
59
|
+
type: string;
|
|
60
|
+
text: string;
|
|
61
|
+
}[];
|
|
62
|
+
}>;
|
|
63
|
+
export declare function handleAttachScript(runner: GodotRunner, args: OperationParams): Promise<{
|
|
64
|
+
content: Array<{
|
|
65
|
+
type: "text";
|
|
66
|
+
text: string;
|
|
67
|
+
}>;
|
|
68
|
+
isError: boolean;
|
|
69
|
+
} | {
|
|
70
|
+
content: {
|
|
71
|
+
type: string;
|
|
72
|
+
text: string;
|
|
73
|
+
}[];
|
|
74
|
+
}>;
|
|
75
|
+
export declare function handleGetSceneTree(runner: GodotRunner, args: OperationParams): Promise<{
|
|
76
|
+
content: Array<{
|
|
77
|
+
type: "text";
|
|
78
|
+
text: string;
|
|
79
|
+
}>;
|
|
80
|
+
isError: boolean;
|
|
81
|
+
} | {
|
|
82
|
+
content: {
|
|
83
|
+
type: string;
|
|
84
|
+
text: string;
|
|
85
|
+
}[];
|
|
86
|
+
}>;
|
|
87
|
+
export declare function handleDuplicateNode(runner: GodotRunner, args: OperationParams): Promise<{
|
|
88
|
+
content: Array<{
|
|
89
|
+
type: "text";
|
|
90
|
+
text: string;
|
|
91
|
+
}>;
|
|
92
|
+
isError: boolean;
|
|
93
|
+
} | {
|
|
94
|
+
content: {
|
|
95
|
+
type: string;
|
|
96
|
+
text: string;
|
|
97
|
+
}[];
|
|
98
|
+
}>;
|
|
99
|
+
export declare function handleGetNodeSignals(runner: GodotRunner, args: OperationParams): Promise<{
|
|
100
|
+
content: Array<{
|
|
101
|
+
type: "text";
|
|
102
|
+
text: string;
|
|
103
|
+
}>;
|
|
104
|
+
isError: boolean;
|
|
105
|
+
} | {
|
|
106
|
+
content: {
|
|
107
|
+
type: string;
|
|
108
|
+
text: string;
|
|
109
|
+
}[];
|
|
110
|
+
}>;
|
|
111
|
+
export declare function handleConnectSignal(runner: GodotRunner, args: OperationParams): Promise<{
|
|
112
|
+
content: Array<{
|
|
113
|
+
type: "text";
|
|
114
|
+
text: string;
|
|
115
|
+
}>;
|
|
116
|
+
isError: boolean;
|
|
117
|
+
} | {
|
|
118
|
+
content: {
|
|
119
|
+
type: string;
|
|
120
|
+
text: string;
|
|
121
|
+
}[];
|
|
122
|
+
}>;
|
|
123
|
+
export declare function handleDisconnectSignal(runner: GodotRunner, args: OperationParams): Promise<{
|
|
4
124
|
content: Array<{
|
|
5
125
|
type: "text";
|
|
6
126
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-tools.d.ts","sourceRoot":"","sources":["../../src/tools/node-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"node-tools.d.ts","sourceRoot":"","sources":["../../src/tools/node-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EAOX,eAAe,EACf,cAAc,EACf,MAAM,0BAA0B,CAAC;A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