gopeak 2.3.4 → 2.3.6
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 +32 -1
- package/build/addon/godot_mcp_editor/tools/scene_tools.gd +94 -43
- package/build/addon/godot_mcp_runtime/mcp_runtime_autoload.gd +3 -0
- package/build/godot-bridge.js +9 -2
- package/build/index.js +182 -2619
- package/build/scripts/godot_operations.gd +9 -1
- package/build/server-types.js +1 -0
- package/build/server-version.js +12 -0
- package/build/tool-definitions.js +2264 -0
- package/build/tool-groups.js +174 -0
- package/package.json +11 -6
- package/scripts/postinstall.mjs +29 -0
package/build/index.js
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { fileURLToPath } from 'url';
|
|
10
10
|
import { join, dirname, basename, normalize } from 'path';
|
|
11
|
-
import { existsSync, readdirSync, mkdirSync, readFileSync, appendFileSync, writeFileSync } from 'fs';
|
|
11
|
+
import { existsSync, readdirSync, mkdirSync, readFileSync, appendFileSync, writeFileSync, mkdtempSync, rmSync } from 'fs';
|
|
12
|
+
import { tmpdir } from 'os';
|
|
12
13
|
import { spawn } from 'child_process';
|
|
13
14
|
import { createConnection as createTcpConnection } from 'node:net';
|
|
14
15
|
import { promisify } from 'util';
|
|
@@ -17,211 +18,19 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
|
17
18
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
18
19
|
import { CallToolRequestSchema, ErrorCode, GetPromptRequestSchema, ListPromptsRequestSchema, ListToolsRequestSchema, McpError, } from '@modelcontextprotocol/sdk/types.js';
|
|
19
20
|
import { setupResourceHandlers } from './resources.js';
|
|
20
|
-
import { GodotLSPClient,
|
|
21
|
-
import { GodotDAPClient,
|
|
21
|
+
import { GodotLSPClient, handleLSPTool } from './lsp_client.js';
|
|
22
|
+
import { GodotDAPClient, handleDAPTool } from './dap_client.js';
|
|
22
23
|
import { mapProject } from './gdscript_parser.js';
|
|
23
24
|
import { serveVisualization, setProjectPath, stopVisualizationServer } from './visualizer-server.js';
|
|
24
25
|
import { getDefaultBridge } from './godot-bridge.js';
|
|
25
26
|
import { getPrompt, listPrompts } from './prompts.js';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const GODOT_DEBUG_MODE_DEFAULT = process.env.GODOT_DEBUG === 'true' || DEBUG_MODE;
|
|
27
|
+
import { buildToolDefinitions as buildToolDefinitionsForServer } from './tool-definitions.js';
|
|
28
|
+
import { CORE_TOOL_GROUPS, TOOL_GROUPS } from './tool-groups.js';
|
|
29
|
+
import { DEBUG_MODE, GODOT_DEBUG_MODE_DEFAULT, SERVER_VERSION } from './server-version.js';
|
|
30
30
|
const execAsync = promisify(exec);
|
|
31
31
|
// Derive __filename and __dirname in ESM
|
|
32
32
|
const __filename = fileURLToPath(import.meta.url);
|
|
33
33
|
const __dirname = dirname(__filename);
|
|
34
|
-
const SERVER_VERSION = (() => {
|
|
35
|
-
try {
|
|
36
|
-
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
37
|
-
return typeof pkg.version === 'string' ? pkg.version : '0.0.0';
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
return '0.0.0';
|
|
41
|
-
}
|
|
42
|
-
})();
|
|
43
|
-
/**
|
|
44
|
-
* Dynamic tool groups for context-based activation.
|
|
45
|
-
* Tools in these groups are hidden by default and activated on demand.
|
|
46
|
-
*/
|
|
47
|
-
const TOOL_GROUPS = {
|
|
48
|
-
scene_advanced: {
|
|
49
|
-
description: 'Advanced scene tree manipulation (duplicate, reparent, sprite)',
|
|
50
|
-
tools: ['duplicate_node', 'reparent_node', 'load_sprite'],
|
|
51
|
-
keywords: ['duplicate', 'reparent', 'move node', 'sprite', 'texture', 'copy node'],
|
|
52
|
-
},
|
|
53
|
-
uid: {
|
|
54
|
-
description: 'UID management for resources',
|
|
55
|
-
tools: ['get_uid', 'update_project_uids'],
|
|
56
|
-
keywords: ['uid', 'resource id', 'unique id'],
|
|
57
|
-
},
|
|
58
|
-
import_export: {
|
|
59
|
-
description: 'Import pipeline and project validation',
|
|
60
|
-
tools: ['get_import_status', 'get_import_options', 'set_import_options', 'reimport_resource', 'validate_project'],
|
|
61
|
-
keywords: ['import', 'reimport', 'import settings', 'import options', 'validate project'],
|
|
62
|
-
},
|
|
63
|
-
autoload: {
|
|
64
|
-
description: 'Autoload singletons and main scene management',
|
|
65
|
-
tools: ['add_autoload', 'remove_autoload', 'list_autoloads', 'set_main_scene'],
|
|
66
|
-
keywords: ['autoload', 'singleton', 'main scene'],
|
|
67
|
-
},
|
|
68
|
-
signal: {
|
|
69
|
-
description: 'Signal disconnection and connection listing',
|
|
70
|
-
tools: ['disconnect_signal', 'list_connections'],
|
|
71
|
-
keywords: ['disconnect signal', 'list signals', 'signal connections', 'list connections'],
|
|
72
|
-
},
|
|
73
|
-
runtime: {
|
|
74
|
-
description: 'Runtime inspection and live game control',
|
|
75
|
-
tools: ['inspect_runtime_tree', 'set_runtime_property', 'call_runtime_method', 'get_runtime_metrics'],
|
|
76
|
-
keywords: ['runtime inspect', 'live inspect', 'running game', 'performance', 'metrics', 'runtime tree', 'runtime property', 'runtime method'],
|
|
77
|
-
},
|
|
78
|
-
resource: {
|
|
79
|
-
description: 'Resource creation and modification (materials, shaders)',
|
|
80
|
-
tools: ['create_resource', 'create_material', 'create_shader', 'modify_resource'],
|
|
81
|
-
keywords: ['material', 'shader', 'resource create', 'modify resource', 'create material', 'create shader'],
|
|
82
|
-
},
|
|
83
|
-
animation: {
|
|
84
|
-
description: 'Animation system (animations, tracks, animation tree, state machine)',
|
|
85
|
-
tools: ['create_animation', 'add_animation_track', 'create_animation_tree', 'add_animation_state', 'connect_animation_states'],
|
|
86
|
-
keywords: ['animation', 'animate', 'keyframe', 'animation tree', 'state machine', 'animation track', 'animation state'],
|
|
87
|
-
},
|
|
88
|
-
plugin: {
|
|
89
|
-
description: 'Plugin/addon management',
|
|
90
|
-
tools: ['list_plugins', 'enable_plugin', 'disable_plugin'],
|
|
91
|
-
keywords: ['plugin', 'addon', 'enable plugin', 'disable plugin', 'list plugins'],
|
|
92
|
-
},
|
|
93
|
-
input: {
|
|
94
|
-
description: 'Input action mapping',
|
|
95
|
-
tools: ['add_input_action'],
|
|
96
|
-
keywords: ['input action', 'input map', 'key binding', 'controller', 'input mapping'],
|
|
97
|
-
},
|
|
98
|
-
tilemap: {
|
|
99
|
-
description: 'TileMap and TileSet system',
|
|
100
|
-
tools: ['create_tileset', 'set_tilemap_cells'],
|
|
101
|
-
keywords: ['tilemap', 'tileset', 'tile', '2d map', 'tilemap cells'],
|
|
102
|
-
},
|
|
103
|
-
audio: {
|
|
104
|
-
description: 'Audio bus system',
|
|
105
|
-
tools: ['create_audio_bus', 'get_audio_buses', 'set_audio_bus_effect', 'set_audio_bus_volume'],
|
|
106
|
-
keywords: ['audio', 'sound', 'music', 'audio bus', 'volume', 'sound effect'],
|
|
107
|
-
},
|
|
108
|
-
navigation: {
|
|
109
|
-
description: 'Navigation and pathfinding system',
|
|
110
|
-
tools: ['create_navigation_region', 'create_navigation_agent'],
|
|
111
|
-
keywords: ['navigation', 'pathfinding', 'navmesh', 'nav agent', 'navigation region'],
|
|
112
|
-
},
|
|
113
|
-
theme_ui: {
|
|
114
|
-
description: 'Theme and UI styling',
|
|
115
|
-
tools: ['set_theme_color', 'set_theme_font_size', 'apply_theme_shader'],
|
|
116
|
-
keywords: ['theme', 'ui style', 'font size', 'color override', 'theme color', 'theme shader'],
|
|
117
|
-
},
|
|
118
|
-
asset_store: {
|
|
119
|
-
description: 'Asset library search and download',
|
|
120
|
-
tools: ['search_assets', 'fetch_asset', 'list_asset_providers'],
|
|
121
|
-
keywords: ['asset store', 'asset library', 'download asset', 'search assets', 'fetch asset'],
|
|
122
|
-
},
|
|
123
|
-
testing: {
|
|
124
|
-
description: 'Screenshot capture and input injection for testing',
|
|
125
|
-
tools: ['capture_screenshot', 'capture_viewport', 'inject_action', 'inject_key', 'inject_mouse_click', 'inject_mouse_motion'],
|
|
126
|
-
keywords: ['screenshot', 'capture', 'inject input', 'simulate', 'test input', 'inject key', 'inject mouse', 'viewport capture'],
|
|
127
|
-
},
|
|
128
|
-
dx_tools: {
|
|
129
|
-
description: 'Developer experience tools (error log, health, usages, scaffold)',
|
|
130
|
-
tools: ['parse_error_log', 'get_project_health', 'find_resource_usages', 'scaffold_gameplay_prototype'],
|
|
131
|
-
keywords: ['error log', 'project health', 'find usages', 'scaffold', 'prototype', 'resource usages'],
|
|
132
|
-
},
|
|
133
|
-
intent_tracking: {
|
|
134
|
-
description: 'Intent capture, decision logging, and handoff',
|
|
135
|
-
tools: ['capture_intent_snapshot', 'record_decision_log', 'generate_handoff_brief', 'summarize_intent_context', 'record_work_step', 'record_execution_trace', 'export_handoff_pack', 'set_recording_mode', 'get_recording_mode'],
|
|
136
|
-
keywords: ['intent', 'handoff', 'decision log', 'work step', 'recording', 'execution trace', 'handoff brief'],
|
|
137
|
-
},
|
|
138
|
-
class_advanced: {
|
|
139
|
-
description: 'Advanced class introspection',
|
|
140
|
-
tools: ['inspect_inheritance'],
|
|
141
|
-
keywords: ['inheritance', 'class hierarchy', 'extends', 'inspect inheritance'],
|
|
142
|
-
},
|
|
143
|
-
lsp: {
|
|
144
|
-
description: 'GDScript Language Server tools (completions, hover, symbols)',
|
|
145
|
-
tools: ['lsp_get_completions', 'lsp_get_hover', 'lsp_get_symbols'],
|
|
146
|
-
keywords: ['completion', 'hover info', 'lsp completions', 'code completion', 'gdscript symbols'],
|
|
147
|
-
},
|
|
148
|
-
dap: {
|
|
149
|
-
description: 'Debug Adapter Protocol tools (breakpoints, stepping, stack trace)',
|
|
150
|
-
tools: ['dap_set_breakpoint', 'dap_remove_breakpoint', 'dap_continue', 'dap_pause', 'dap_step_over', 'dap_get_stack_trace'],
|
|
151
|
-
keywords: ['breakpoint', 'debugger', 'step over', 'stack trace', 'pause execution', 'debug adapter'],
|
|
152
|
-
},
|
|
153
|
-
version_gate: {
|
|
154
|
-
description: 'Version validation and patch verification',
|
|
155
|
-
tools: ['validate_patch_with_lsp', 'enforce_version_gate'],
|
|
156
|
-
keywords: ['version gate', 'validate patch', 'version constraint', 'version check'],
|
|
157
|
-
},
|
|
158
|
-
};
|
|
159
|
-
/**
|
|
160
|
-
* Core tool groups — always visible, never deactivated.
|
|
161
|
-
* These categorize the 33 default compact-profile tools for structured discovery.
|
|
162
|
-
*/
|
|
163
|
-
const CORE_TOOL_GROUPS = {
|
|
164
|
-
core_meta: {
|
|
165
|
-
description: 'Tool discovery and group management',
|
|
166
|
-
tools: ['tool_catalog', 'manage_tool_groups'],
|
|
167
|
-
keywords: ['catalog', 'discover', 'search tools', 'groups', 'manage groups'],
|
|
168
|
-
},
|
|
169
|
-
core_project: {
|
|
170
|
-
description: 'Project discovery, info, search, and settings',
|
|
171
|
-
tools: ['list_projects', 'get_project_info', 'search_project', 'get_project_setting', 'set_project_setting'],
|
|
172
|
-
keywords: ['project', 'list projects', 'project info', 'project search', 'project setting'],
|
|
173
|
-
},
|
|
174
|
-
core_editor: {
|
|
175
|
-
description: 'Editor launch, run, stop, debug output, and version info',
|
|
176
|
-
tools: ['launch_editor', 'run_project', 'stop_project', 'get_debug_output', 'get_editor_status', 'get_godot_version'],
|
|
177
|
-
keywords: ['editor', 'launch', 'run game', 'stop game', 'debug output', 'editor status', 'godot version'],
|
|
178
|
-
},
|
|
179
|
-
core_scene: {
|
|
180
|
-
description: 'Scene creation, saving, node tree manipulation',
|
|
181
|
-
tools: ['create_scene', 'save_scene', 'list_scene_nodes', 'add_node', 'get_node_properties', 'set_node_properties', 'delete_node'],
|
|
182
|
-
keywords: ['scene', 'node', 'create scene', 'add node', 'delete node', 'node properties', 'scene tree'],
|
|
183
|
-
},
|
|
184
|
-
core_script: {
|
|
185
|
-
description: 'GDScript creation, modification, and analysis',
|
|
186
|
-
tools: ['create_script', 'modify_script', 'get_script_info'],
|
|
187
|
-
keywords: ['script', 'gdscript', 'create script', 'modify script', 'script info'],
|
|
188
|
-
},
|
|
189
|
-
core_class: {
|
|
190
|
-
description: 'ClassDB querying and class introspection',
|
|
191
|
-
tools: ['query_classes', 'query_class_info'],
|
|
192
|
-
keywords: ['class', 'classdb', 'query class', 'class info', 'node types'],
|
|
193
|
-
},
|
|
194
|
-
core_signal: {
|
|
195
|
-
description: 'Signal connection',
|
|
196
|
-
tools: ['connect_signal'],
|
|
197
|
-
keywords: ['connect signal', 'signal'],
|
|
198
|
-
},
|
|
199
|
-
core_resource: {
|
|
200
|
-
description: 'Resource dependency analysis',
|
|
201
|
-
tools: ['get_dependencies'],
|
|
202
|
-
keywords: ['dependencies', 'resource deps', 'dependency tree'],
|
|
203
|
-
},
|
|
204
|
-
core_export: {
|
|
205
|
-
description: 'Export presets and project export/build',
|
|
206
|
-
tools: ['list_export_presets', 'export_project'],
|
|
207
|
-
keywords: ['export', 'build', 'export preset', 'publish'],
|
|
208
|
-
},
|
|
209
|
-
core_runtime: {
|
|
210
|
-
description: 'Runtime connection status',
|
|
211
|
-
tools: ['get_runtime_status'],
|
|
212
|
-
keywords: ['runtime status', 'game status', 'runtime connection'],
|
|
213
|
-
},
|
|
214
|
-
core_visualizer: {
|
|
215
|
-
description: 'Interactive project code map visualization',
|
|
216
|
-
tools: ['map_project'],
|
|
217
|
-
keywords: ['visualize', 'code map', 'project map', 'visualizer'],
|
|
218
|
-
},
|
|
219
|
-
core_diagnostics: {
|
|
220
|
-
description: 'GDScript diagnostics and DAP debug output',
|
|
221
|
-
tools: ['lsp_get_diagnostics', 'dap_get_output'],
|
|
222
|
-
keywords: ['diagnostics', 'errors', 'warnings', 'linting', 'debug output'],
|
|
223
|
-
},
|
|
224
|
-
};
|
|
225
34
|
/**
|
|
226
35
|
* Main server class for the Godot MCP server
|
|
227
36
|
*/
|
|
@@ -235,6 +44,7 @@ class GodotServer {
|
|
|
235
44
|
godotDebugMode = GODOT_DEBUG_MODE_DEFAULT;
|
|
236
45
|
lspClient = null;
|
|
237
46
|
dapClient = null;
|
|
47
|
+
bridgeStartupError = null;
|
|
238
48
|
lastProjectPath = null;
|
|
239
49
|
recordingMode = (process.env.LOG_MODE === 'full' ? 'full' : 'lite');
|
|
240
50
|
logQueue = [];
|
|
@@ -844,6 +654,87 @@ class GodotServer {
|
|
|
844
654
|
}
|
|
845
655
|
return compactTools;
|
|
846
656
|
}
|
|
657
|
+
jsonTextResponse(payload) {
|
|
658
|
+
return {
|
|
659
|
+
content: [{
|
|
660
|
+
type: 'text',
|
|
661
|
+
text: JSON.stringify(payload, null, 2),
|
|
662
|
+
}],
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
buildLegacyToCompactAliasMap() {
|
|
666
|
+
return new Map(Object.entries(this.compactAliasToLegacy).map(([compactName, legacyName]) => [legacyName, compactName]));
|
|
667
|
+
}
|
|
668
|
+
buildToolGroupLookup() {
|
|
669
|
+
const toolToGroup = new Map();
|
|
670
|
+
const registerGroups = (groups, type) => {
|
|
671
|
+
for (const [groupName, group] of Object.entries(groups)) {
|
|
672
|
+
for (const toolName of group.tools) {
|
|
673
|
+
toolToGroup.set(toolName, { group: groupName, type });
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
registerGroups(CORE_TOOL_GROUPS, 'core');
|
|
678
|
+
registerGroups(TOOL_GROUPS, 'dynamic');
|
|
679
|
+
return toolToGroup;
|
|
680
|
+
}
|
|
681
|
+
getActivatedToolNames() {
|
|
682
|
+
const activatedToolNames = new Set();
|
|
683
|
+
for (const groupName of this.activeGroups) {
|
|
684
|
+
const group = TOOL_GROUPS[groupName];
|
|
685
|
+
if (!group) {
|
|
686
|
+
continue;
|
|
687
|
+
}
|
|
688
|
+
for (const toolName of group.tools) {
|
|
689
|
+
activatedToolNames.add(toolName);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
return activatedToolNames;
|
|
693
|
+
}
|
|
694
|
+
getAvailableDynamicGroups() {
|
|
695
|
+
return Object.keys(TOOL_GROUPS);
|
|
696
|
+
}
|
|
697
|
+
getUnknownDynamicGroupError(groupName) {
|
|
698
|
+
return `Unknown group '${groupName}'. Available dynamic groups: ${this.getAvailableDynamicGroups().join(', ')}`;
|
|
699
|
+
}
|
|
700
|
+
notifyToolListChanged() {
|
|
701
|
+
this.cachedToolDefinitions = [];
|
|
702
|
+
this.server.sendToolListChanged().catch(() => { });
|
|
703
|
+
}
|
|
704
|
+
autoActivateMatchingGroups(query) {
|
|
705
|
+
if (!query || this.toolExposureProfile !== 'compact') {
|
|
706
|
+
return [];
|
|
707
|
+
}
|
|
708
|
+
const newlyActivated = [];
|
|
709
|
+
for (const [groupName, group] of Object.entries(TOOL_GROUPS)) {
|
|
710
|
+
if (this.activeGroups.has(groupName)) {
|
|
711
|
+
continue;
|
|
712
|
+
}
|
|
713
|
+
const hasMatchingKeyword = group.keywords.some((kw) => query.includes(kw) || kw.includes(query));
|
|
714
|
+
const hasMatchingToolName = group.tools.some((toolName) => toolName.toLowerCase().includes(query));
|
|
715
|
+
if (hasMatchingKeyword || hasMatchingToolName) {
|
|
716
|
+
this.activeGroups.add(groupName);
|
|
717
|
+
newlyActivated.push(groupName);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
if (newlyActivated.length > 0) {
|
|
721
|
+
this.notifyToolListChanged();
|
|
722
|
+
}
|
|
723
|
+
return newlyActivated;
|
|
724
|
+
}
|
|
725
|
+
setDynamicGroupActivation(groupName, active) {
|
|
726
|
+
const wasActive = this.activeGroups.has(groupName);
|
|
727
|
+
if (active) {
|
|
728
|
+
this.activeGroups.add(groupName);
|
|
729
|
+
}
|
|
730
|
+
else {
|
|
731
|
+
this.activeGroups.delete(groupName);
|
|
732
|
+
}
|
|
733
|
+
if (wasActive !== active) {
|
|
734
|
+
this.notifyToolListChanged();
|
|
735
|
+
}
|
|
736
|
+
return wasActive;
|
|
737
|
+
}
|
|
847
738
|
sanitizeToolsForList(tools) {
|
|
848
739
|
const seenNames = new Map();
|
|
849
740
|
return tools.map((tool) => {
|
|
@@ -872,15 +763,7 @@ class GodotServer {
|
|
|
872
763
|
const exposed = this.buildCompactTools(allTools);
|
|
873
764
|
// Add dynamically activated group tools (using their legacy names)
|
|
874
765
|
if (this.activeGroups.size > 0) {
|
|
875
|
-
const activatedToolNames =
|
|
876
|
-
for (const groupName of this.activeGroups) {
|
|
877
|
-
const group = TOOL_GROUPS[groupName];
|
|
878
|
-
if (!group)
|
|
879
|
-
continue;
|
|
880
|
-
for (const toolName of group.tools) {
|
|
881
|
-
activatedToolNames.add(toolName);
|
|
882
|
-
}
|
|
883
|
-
}
|
|
766
|
+
const activatedToolNames = this.getActivatedToolNames();
|
|
884
767
|
for (const tool of allTools) {
|
|
885
768
|
if (activatedToolNames.has(tool.name)) {
|
|
886
769
|
exposed.push({
|
|
@@ -942,22 +825,8 @@ class GodotServer {
|
|
|
942
825
|
const rawLimit = typeof normalizedArgs.limit === 'number' ? normalizedArgs.limit : 30;
|
|
943
826
|
const limit = Math.max(1, Math.min(100, rawLimit));
|
|
944
827
|
const tools = this.getAllToolDefinitions();
|
|
945
|
-
const reverseAlias =
|
|
946
|
-
|
|
947
|
-
reverseAlias.set(legacyName, compactName);
|
|
948
|
-
}
|
|
949
|
-
// Build tool → group reverse map (core + dynamic)
|
|
950
|
-
const toolToGroup = new Map();
|
|
951
|
-
for (const [groupName, group] of Object.entries(CORE_TOOL_GROUPS)) {
|
|
952
|
-
for (const toolName of group.tools) {
|
|
953
|
-
toolToGroup.set(toolName, { group: groupName, type: 'core' });
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
for (const [groupName, group] of Object.entries(TOOL_GROUPS)) {
|
|
957
|
-
for (const toolName of group.tools) {
|
|
958
|
-
toolToGroup.set(toolName, { group: groupName, type: 'dynamic' });
|
|
959
|
-
}
|
|
960
|
-
}
|
|
828
|
+
const reverseAlias = this.buildLegacyToCompactAliasMap();
|
|
829
|
+
const toolToGroup = this.buildToolGroupLookup();
|
|
961
830
|
const filtered = tools.filter((tool) => {
|
|
962
831
|
if (!query)
|
|
963
832
|
return true;
|
|
@@ -977,40 +846,16 @@ class GodotServer {
|
|
|
977
846
|
// Auto-activate matching tool groups when query matches their keywords
|
|
978
847
|
// or when the query directly matches a group's tool NAME (not description).
|
|
979
848
|
// This prevents over-activation from incidental description matches.
|
|
980
|
-
const newlyActivated =
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
this.activeGroups.add(groupName);
|
|
991
|
-
newlyActivated.push(groupName);
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
// Notify clients that tool list changed so they re-fetch
|
|
995
|
-
if (newlyActivated.length > 0) {
|
|
996
|
-
this.cachedToolDefinitions = []; // Clear cache to force rebuild
|
|
997
|
-
this.server.sendToolListChanged().catch(() => { });
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
return {
|
|
1001
|
-
content: [{
|
|
1002
|
-
type: 'text',
|
|
1003
|
-
text: JSON.stringify({
|
|
1004
|
-
profile: this.toolExposureProfile,
|
|
1005
|
-
totalTools: tools.length,
|
|
1006
|
-
query: query || null,
|
|
1007
|
-
returned: items.length,
|
|
1008
|
-
activeGroups: Array.from(this.activeGroups),
|
|
1009
|
-
newlyActivated: newlyActivated.length > 0 ? newlyActivated : undefined,
|
|
1010
|
-
tools: items,
|
|
1011
|
-
}, null, 2),
|
|
1012
|
-
}],
|
|
1013
|
-
};
|
|
849
|
+
const newlyActivated = this.autoActivateMatchingGroups(query);
|
|
850
|
+
return this.jsonTextResponse({
|
|
851
|
+
profile: this.toolExposureProfile,
|
|
852
|
+
totalTools: tools.length,
|
|
853
|
+
query: query || null,
|
|
854
|
+
returned: items.length,
|
|
855
|
+
activeGroups: Array.from(this.activeGroups),
|
|
856
|
+
newlyActivated: newlyActivated.length > 0 ? newlyActivated : undefined,
|
|
857
|
+
tools: items,
|
|
858
|
+
});
|
|
1014
859
|
}
|
|
1015
860
|
async handleManageToolGroups(args) {
|
|
1016
861
|
const normalizedArgs = this.normalizeParameters(args || {});
|
|
@@ -1037,102 +882,55 @@ class GodotServer {
|
|
|
1037
882
|
const allGroups = [...coreGroups, ...dynamicGroups];
|
|
1038
883
|
const totalCoreTools = coreGroups.reduce((sum, g) => sum + g.toolCount, 0);
|
|
1039
884
|
const totalDynTools = dynamicGroups.reduce((sum, g) => sum + g.toolCount, 0);
|
|
1040
|
-
return {
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
dynamicTools: totalDynTools,
|
|
1049
|
-
groups: allGroups,
|
|
1050
|
-
}, null, 2),
|
|
1051
|
-
}],
|
|
1052
|
-
};
|
|
885
|
+
return this.jsonTextResponse({
|
|
886
|
+
totalGroups: allGroups.length,
|
|
887
|
+
coreGroups: coreGroups.length,
|
|
888
|
+
dynamicGroups: dynamicGroups.length,
|
|
889
|
+
coreTools: totalCoreTools,
|
|
890
|
+
dynamicTools: totalDynTools,
|
|
891
|
+
groups: allGroups,
|
|
892
|
+
});
|
|
1053
893
|
}
|
|
1054
894
|
case 'activate': {
|
|
1055
895
|
if (groupName && CORE_TOOL_GROUPS[groupName]) {
|
|
1056
|
-
return {
|
|
1057
|
-
content: [{ type: 'text', text: JSON.stringify({ error: `'${groupName}' is a core group and always visible. No activation needed.` }) }],
|
|
1058
|
-
};
|
|
896
|
+
return this.jsonTextResponse({ error: `'${groupName}' is a core group and always visible. No activation needed.` });
|
|
1059
897
|
}
|
|
1060
898
|
if (!groupName || !TOOL_GROUPS[groupName]) {
|
|
1061
|
-
|
|
1062
|
-
return {
|
|
1063
|
-
content: [{
|
|
1064
|
-
type: 'text',
|
|
1065
|
-
text: JSON.stringify({ error: `Unknown group '${groupName}'. Available dynamic groups: ${available}` }),
|
|
1066
|
-
}],
|
|
1067
|
-
};
|
|
899
|
+
return this.jsonTextResponse({ error: this.getUnknownDynamicGroupError(groupName) });
|
|
1068
900
|
}
|
|
1069
|
-
const
|
|
1070
|
-
this.
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
content: [{
|
|
1077
|
-
type: 'text',
|
|
1078
|
-
text: JSON.stringify({
|
|
1079
|
-
activated: groupName,
|
|
1080
|
-
tools: TOOL_GROUPS[groupName].tools,
|
|
1081
|
-
wasAlreadyActive: !wasNew,
|
|
1082
|
-
activeGroups: Array.from(this.activeGroups),
|
|
1083
|
-
}, null, 2),
|
|
1084
|
-
}],
|
|
1085
|
-
};
|
|
901
|
+
const wasAlreadyActive = this.setDynamicGroupActivation(groupName, true);
|
|
902
|
+
return this.jsonTextResponse({
|
|
903
|
+
activated: groupName,
|
|
904
|
+
tools: TOOL_GROUPS[groupName].tools,
|
|
905
|
+
wasAlreadyActive,
|
|
906
|
+
activeGroups: Array.from(this.activeGroups),
|
|
907
|
+
});
|
|
1086
908
|
}
|
|
1087
909
|
case 'deactivate': {
|
|
1088
910
|
if (groupName && CORE_TOOL_GROUPS[groupName]) {
|
|
1089
|
-
return {
|
|
1090
|
-
content: [{ type: 'text', text: JSON.stringify({ error: `'${groupName}' is a core group and cannot be deactivated.` }) }],
|
|
1091
|
-
};
|
|
911
|
+
return this.jsonTextResponse({ error: `'${groupName}' is a core group and cannot be deactivated.` });
|
|
1092
912
|
}
|
|
1093
913
|
if (!groupName || !TOOL_GROUPS[groupName]) {
|
|
1094
|
-
|
|
1095
|
-
return {
|
|
1096
|
-
content: [{
|
|
1097
|
-
type: 'text',
|
|
1098
|
-
text: JSON.stringify({ error: `Unknown group '${groupName}'. Available dynamic groups: ${available}` }),
|
|
1099
|
-
}],
|
|
1100
|
-
};
|
|
1101
|
-
}
|
|
1102
|
-
const wasActive = this.activeGroups.has(groupName);
|
|
1103
|
-
this.activeGroups.delete(groupName);
|
|
1104
|
-
if (wasActive) {
|
|
1105
|
-
this.cachedToolDefinitions = [];
|
|
1106
|
-
this.server.sendToolListChanged().catch(() => { });
|
|
914
|
+
return this.jsonTextResponse({ error: this.getUnknownDynamicGroupError(groupName) });
|
|
1107
915
|
}
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
activeGroups: Array.from(this.activeGroups),
|
|
1115
|
-
}, null, 2),
|
|
1116
|
-
}],
|
|
1117
|
-
};
|
|
916
|
+
const wasActive = this.setDynamicGroupActivation(groupName, false);
|
|
917
|
+
return this.jsonTextResponse({
|
|
918
|
+
deactivated: groupName,
|
|
919
|
+
wasActive,
|
|
920
|
+
activeGroups: Array.from(this.activeGroups),
|
|
921
|
+
});
|
|
1118
922
|
}
|
|
1119
923
|
case 'reset': {
|
|
1120
924
|
const previouslyActive = Array.from(this.activeGroups);
|
|
1121
925
|
this.activeGroups.clear();
|
|
1122
926
|
if (previouslyActive.length > 0) {
|
|
1123
|
-
this.
|
|
1124
|
-
this.server.sendToolListChanged().catch(() => { });
|
|
927
|
+
this.notifyToolListChanged();
|
|
1125
928
|
}
|
|
1126
|
-
return {
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
deactivated: previouslyActive,
|
|
1132
|
-
activeGroups: [],
|
|
1133
|
-
}, null, 2),
|
|
1134
|
-
}],
|
|
1135
|
-
};
|
|
929
|
+
return this.jsonTextResponse({
|
|
930
|
+
reset: true,
|
|
931
|
+
deactivated: previouslyActive,
|
|
932
|
+
activeGroups: [],
|
|
933
|
+
});
|
|
1136
934
|
}
|
|
1137
935
|
case 'status':
|
|
1138
936
|
default: {
|
|
@@ -1151,16 +949,11 @@ class GodotServer {
|
|
|
1151
949
|
}));
|
|
1152
950
|
const totalCoreTools = coreGroupDetails.reduce((sum, g) => sum + g.tools.length, 0);
|
|
1153
951
|
const totalDynamicTools = activeGroupDetails.reduce((sum, g) => sum + (g.tools?.length || 0), 0);
|
|
1154
|
-
return {
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
dynamicGroups: { activeCount: this.activeGroups.size, tools: totalDynamicTools, groups: activeGroupDetails },
|
|
1160
|
-
availableDynamicGroups: Object.keys(TOOL_GROUPS),
|
|
1161
|
-
}, null, 2),
|
|
1162
|
-
}],
|
|
1163
|
-
};
|
|
952
|
+
return this.jsonTextResponse({
|
|
953
|
+
coreGroups: { count: coreGroupDetails.length, tools: totalCoreTools, groups: coreGroupDetails },
|
|
954
|
+
dynamicGroups: { activeCount: this.activeGroups.size, tools: totalDynamicTools, groups: activeGroupDetails },
|
|
955
|
+
availableDynamicGroups: this.getAvailableDynamicGroups(),
|
|
956
|
+
});
|
|
1164
957
|
}
|
|
1165
958
|
}
|
|
1166
959
|
}
|
|
@@ -1191,8 +984,11 @@ class GodotServer {
|
|
|
1191
984
|
for (const key in params) {
|
|
1192
985
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
1193
986
|
let normalizedKey = key;
|
|
1194
|
-
//
|
|
1195
|
-
if (key.
|
|
987
|
+
// Preserve sentinel keys like _type, but normalize regular snake_case keys.
|
|
988
|
+
if (key.startsWith('_')) {
|
|
989
|
+
normalizedKey = key;
|
|
990
|
+
}
|
|
991
|
+
else if (key.includes('_')) {
|
|
1196
992
|
normalizedKey = this.parameterMappings[key] || key.replace(/_([a-zA-Z0-9])/g, (_, letter) => letter.toUpperCase());
|
|
1197
993
|
}
|
|
1198
994
|
// Handle nested objects recursively
|
|
@@ -1215,8 +1011,10 @@ class GodotServer {
|
|
|
1215
1011
|
const result = {};
|
|
1216
1012
|
for (const key in params) {
|
|
1217
1013
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
1218
|
-
// Convert camelCase to snake_case
|
|
1219
|
-
const snakeKey =
|
|
1014
|
+
// Convert camelCase to snake_case while preserving sentinel keys like _type.
|
|
1015
|
+
const snakeKey = key.startsWith('_')
|
|
1016
|
+
? key
|
|
1017
|
+
: (this.reverseParameterMappings[key] || key.replace(/[A-Z]/g, letter => `_${letter.toLowerCase()}`));
|
|
1220
1018
|
// Handle nested objects recursively
|
|
1221
1019
|
if (typeof params[key] === 'object' && params[key] !== null && !Array.isArray(params[key])) {
|
|
1222
1020
|
result[snakeKey] = this.convertCamelToSnakeCase(params[key]);
|
|
@@ -1249,16 +1047,18 @@ class GodotServer {
|
|
|
1249
1047
|
}
|
|
1250
1048
|
}
|
|
1251
1049
|
try {
|
|
1252
|
-
// Serialize
|
|
1050
|
+
// Serialize parameters into a temp file to avoid shell/cmd JSON escaping issues
|
|
1051
|
+
// (notably Windows command-line parsing of sequences such as \t, \r, and \").
|
|
1253
1052
|
const paramsJson = JSON.stringify(snakeCaseParams);
|
|
1254
|
-
|
|
1255
|
-
const
|
|
1256
|
-
|
|
1257
|
-
//
|
|
1258
|
-
|
|
1053
|
+
const paramsDir = mkdtempSync(join(tmpdir(), 'gopeak-params-'));
|
|
1054
|
+
const paramsFilePath = join(paramsDir, `${operation}.json`);
|
|
1055
|
+
writeFileSync(paramsFilePath, paramsJson, 'utf8');
|
|
1056
|
+
// Escape the params file reference for the current shell.
|
|
1057
|
+
const paramsFileArg = `@file:${paramsFilePath}`;
|
|
1058
|
+
const escapedParams = paramsFileArg.replace(/'/g, "'\\''");
|
|
1259
1059
|
const isWindows = process.platform === 'win32';
|
|
1260
1060
|
const quotedParams = isWindows
|
|
1261
|
-
? `\"${
|
|
1061
|
+
? `\"${paramsFileArg.replace(/\"/g, '\\"')}\"`
|
|
1262
1062
|
: `'${escapedParams}'`;
|
|
1263
1063
|
// Add debug arguments if debug mode is enabled
|
|
1264
1064
|
const debugArgs = this.godotDebugMode ? ['--debug-godot'] : [];
|
|
@@ -1275,8 +1075,13 @@ class GodotServer {
|
|
|
1275
1075
|
...debugArgs,
|
|
1276
1076
|
].join(' ');
|
|
1277
1077
|
this.logDebug(`Command: ${cmd}`);
|
|
1278
|
-
|
|
1279
|
-
|
|
1078
|
+
try {
|
|
1079
|
+
const { stdout, stderr } = await execAsync(cmd);
|
|
1080
|
+
return { stdout, stderr };
|
|
1081
|
+
}
|
|
1082
|
+
finally {
|
|
1083
|
+
rmSync(paramsDir, { recursive: true, force: true });
|
|
1084
|
+
}
|
|
1280
1085
|
}
|
|
1281
1086
|
catch (error) {
|
|
1282
1087
|
// If execAsync throws, it still contains stdout/stderr
|
|
@@ -1290,6 +1095,21 @@ class GodotServer {
|
|
|
1290
1095
|
throw error;
|
|
1291
1096
|
}
|
|
1292
1097
|
}
|
|
1098
|
+
getEditorStatusPayload() {
|
|
1099
|
+
const status = this.godotBridge.getStatus();
|
|
1100
|
+
const isPortConflict = this.bridgeStartupError?.includes('EADDRINUSE') ?? false;
|
|
1101
|
+
return {
|
|
1102
|
+
...status,
|
|
1103
|
+
bridgeAvailable: this.bridgeStartupError === null,
|
|
1104
|
+
startupError: this.bridgeStartupError,
|
|
1105
|
+
note: isPortConflict
|
|
1106
|
+
? 'Bridge port is already in use. Another gopeak instance may own the editor bridge, so this server cannot report that editor connection.'
|
|
1107
|
+
: undefined,
|
|
1108
|
+
suggestion: isPortConflict
|
|
1109
|
+
? 'Stop duplicate gopeak/MCP server instances or re-run the command from the same server process that owns the bridge port.'
|
|
1110
|
+
: undefined,
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1293
1113
|
/**
|
|
1294
1114
|
* Get the structure of a Godot project
|
|
1295
1115
|
* @param projectPath Path to the Godot project
|
|
@@ -1414,2266 +1234,7 @@ class GodotServer {
|
|
|
1414
1234
|
return getPrompt(request.params.name, request.params.arguments);
|
|
1415
1235
|
});
|
|
1416
1236
|
// Define available tools
|
|
1417
|
-
const buildToolDefinitions = () =>
|
|
1418
|
-
{
|
|
1419
|
-
name: 'launch_editor',
|
|
1420
|
-
description: 'Opens the Godot editor GUI for a project. Use when visual inspection or manual editing of scenes/scripts is needed. Opens a new window on the host system. Requires: project directory with project.godot file.',
|
|
1421
|
-
inputSchema: {
|
|
1422
|
-
type: 'object',
|
|
1423
|
-
properties: {
|
|
1424
|
-
projectPath: {
|
|
1425
|
-
type: 'string',
|
|
1426
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1427
|
-
},
|
|
1428
|
-
},
|
|
1429
|
-
required: ['projectPath'],
|
|
1430
|
-
},
|
|
1431
|
-
},
|
|
1432
|
-
{
|
|
1433
|
-
name: 'run_project',
|
|
1434
|
-
description: 'Launches a Godot project in a new window and captures output. Use to test gameplay or verify script behavior. Runs until stop_project is called. Use get_debug_output to retrieve logs.',
|
|
1435
|
-
inputSchema: {
|
|
1436
|
-
type: 'object',
|
|
1437
|
-
properties: {
|
|
1438
|
-
projectPath: {
|
|
1439
|
-
type: 'string',
|
|
1440
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1441
|
-
},
|
|
1442
|
-
scene: {
|
|
1443
|
-
type: 'string',
|
|
1444
|
-
description: 'Optional: specific scene to run (e.g., "scenes/TestLevel.tscn"). If omitted, runs main scene from project settings.',
|
|
1445
|
-
},
|
|
1446
|
-
},
|
|
1447
|
-
required: ['projectPath'],
|
|
1448
|
-
},
|
|
1449
|
-
},
|
|
1450
|
-
{
|
|
1451
|
-
name: 'get_debug_output',
|
|
1452
|
-
description: 'Retrieves console output and errors from the currently running Godot project. Use after run_project to check logs, errors, and print statements. Returns empty if no project is running.',
|
|
1453
|
-
inputSchema: {
|
|
1454
|
-
type: 'object',
|
|
1455
|
-
properties: {
|
|
1456
|
-
reason: { type: 'string', description: 'Brief explanation of why you are calling this tool' }
|
|
1457
|
-
},
|
|
1458
|
-
required: ['reason'],
|
|
1459
|
-
},
|
|
1460
|
-
},
|
|
1461
|
-
{
|
|
1462
|
-
name: 'stop_project',
|
|
1463
|
-
description: 'Terminates the currently running Godot project process. Use to stop a project started with run_project. No effect if no project is running.',
|
|
1464
|
-
inputSchema: {
|
|
1465
|
-
type: 'object',
|
|
1466
|
-
properties: {
|
|
1467
|
-
reason: { type: 'string', description: 'Brief explanation of why you are calling this tool' }
|
|
1468
|
-
},
|
|
1469
|
-
required: ['reason'],
|
|
1470
|
-
},
|
|
1471
|
-
},
|
|
1472
|
-
{
|
|
1473
|
-
name: 'get_godot_version',
|
|
1474
|
-
description: 'Returns the installed Godot engine version string. Use to check compatibility (e.g., Godot 4.4+ features like UID). Returns version like "4.3.stable" or "4.4.dev".',
|
|
1475
|
-
inputSchema: {
|
|
1476
|
-
type: 'object',
|
|
1477
|
-
properties: {
|
|
1478
|
-
reason: { type: 'string', description: 'Brief explanation of why you are calling this tool' }
|
|
1479
|
-
},
|
|
1480
|
-
required: ['reason'],
|
|
1481
|
-
},
|
|
1482
|
-
},
|
|
1483
|
-
{
|
|
1484
|
-
name: 'list_projects',
|
|
1485
|
-
description: 'Scans a directory for Godot projects (folders containing project.godot). Use to discover projects before using other tools. Returns array of {path, name}.',
|
|
1486
|
-
inputSchema: {
|
|
1487
|
-
type: 'object',
|
|
1488
|
-
properties: {
|
|
1489
|
-
directory: {
|
|
1490
|
-
type: 'string',
|
|
1491
|
-
description: 'Absolute path to search (e.g., "/home/user/godot-projects" on Linux, "C:\\Games" on Windows)',
|
|
1492
|
-
},
|
|
1493
|
-
recursive: {
|
|
1494
|
-
type: 'boolean',
|
|
1495
|
-
description: 'If true, searches all subdirectories. If false (default), only checks immediate children.',
|
|
1496
|
-
},
|
|
1497
|
-
},
|
|
1498
|
-
required: ['directory'],
|
|
1499
|
-
},
|
|
1500
|
-
},
|
|
1501
|
-
{
|
|
1502
|
-
name: 'get_project_info',
|
|
1503
|
-
description: 'Returns metadata about a Godot project including name, version, main scene, autoloads, and directory structure. Use to understand project before modifying. Requires valid project.godot.',
|
|
1504
|
-
inputSchema: {
|
|
1505
|
-
type: 'object',
|
|
1506
|
-
properties: {
|
|
1507
|
-
projectPath: {
|
|
1508
|
-
type: 'string',
|
|
1509
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1510
|
-
},
|
|
1511
|
-
},
|
|
1512
|
-
required: ['projectPath'],
|
|
1513
|
-
},
|
|
1514
|
-
},
|
|
1515
|
-
{
|
|
1516
|
-
name: 'scaffold_gameplay_prototype',
|
|
1517
|
-
description: 'Creates a minimal playable prototype scaffold in one shot: main scene, player scene, basic nodes, common input actions, and optional starter player script.',
|
|
1518
|
-
inputSchema: {
|
|
1519
|
-
type: 'object',
|
|
1520
|
-
properties: {
|
|
1521
|
-
projectPath: {
|
|
1522
|
-
type: 'string',
|
|
1523
|
-
description: 'Absolute path to project directory containing project.godot.',
|
|
1524
|
-
},
|
|
1525
|
-
scenePath: {
|
|
1526
|
-
type: 'string',
|
|
1527
|
-
description: 'Main scene path relative to project. Default: scenes/Main.tscn',
|
|
1528
|
-
},
|
|
1529
|
-
playerScenePath: {
|
|
1530
|
-
type: 'string',
|
|
1531
|
-
description: 'Player scene path relative to project. Default: scenes/Player.tscn',
|
|
1532
|
-
},
|
|
1533
|
-
includePlayerScript: {
|
|
1534
|
-
type: 'boolean',
|
|
1535
|
-
description: 'If true, creates scripts/player.gd starter script. Default: true',
|
|
1536
|
-
},
|
|
1537
|
-
},
|
|
1538
|
-
required: ['projectPath'],
|
|
1539
|
-
},
|
|
1540
|
-
},
|
|
1541
|
-
{
|
|
1542
|
-
name: 'validate_patch_with_lsp',
|
|
1543
|
-
description: 'Runs Godot LSP diagnostics for a script and returns whether it is safe to apply changes. Intended as a pre-apply quality gate.',
|
|
1544
|
-
inputSchema: {
|
|
1545
|
-
type: 'object',
|
|
1546
|
-
properties: {
|
|
1547
|
-
projectPath: {
|
|
1548
|
-
type: 'string',
|
|
1549
|
-
description: 'Absolute path to project directory containing project.godot.',
|
|
1550
|
-
},
|
|
1551
|
-
scriptPath: {
|
|
1552
|
-
type: 'string',
|
|
1553
|
-
description: 'Script path relative to project (e.g., scripts/player.gd).',
|
|
1554
|
-
},
|
|
1555
|
-
},
|
|
1556
|
-
required: ['projectPath', 'scriptPath'],
|
|
1557
|
-
},
|
|
1558
|
-
},
|
|
1559
|
-
{
|
|
1560
|
-
name: 'enforce_version_gate',
|
|
1561
|
-
description: 'Checks Godot version and runtime addon protocol/capabilities against minimum requirements before risky operations.',
|
|
1562
|
-
inputSchema: {
|
|
1563
|
-
type: 'object',
|
|
1564
|
-
properties: {
|
|
1565
|
-
projectPath: {
|
|
1566
|
-
type: 'string',
|
|
1567
|
-
description: 'Absolute path to project directory containing project.godot.',
|
|
1568
|
-
},
|
|
1569
|
-
minGodotVersion: {
|
|
1570
|
-
type: 'string',
|
|
1571
|
-
description: 'Minimum required Godot version (major.minor). Default: 4.2',
|
|
1572
|
-
},
|
|
1573
|
-
minProtocolVersion: {
|
|
1574
|
-
type: 'string',
|
|
1575
|
-
description: 'Minimum required runtime protocol version. Default: 1.0',
|
|
1576
|
-
},
|
|
1577
|
-
},
|
|
1578
|
-
required: ['projectPath'],
|
|
1579
|
-
},
|
|
1580
|
-
},
|
|
1581
|
-
{
|
|
1582
|
-
name: 'capture_intent_snapshot',
|
|
1583
|
-
description: 'Capture/update an intent snapshot for current work (goal, constraints, acceptance criteria) and persist it for handoff.',
|
|
1584
|
-
inputSchema: {
|
|
1585
|
-
type: 'object',
|
|
1586
|
-
properties: {
|
|
1587
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
1588
|
-
goal: { type: 'string', description: 'Primary goal of the current work.' },
|
|
1589
|
-
why: { type: 'string', description: 'Why this work matters.' },
|
|
1590
|
-
constraints: { type: 'array', items: { type: 'string' }, description: 'Operational/technical constraints.' },
|
|
1591
|
-
acceptanceCriteria: { type: 'array', items: { type: 'string' }, description: 'Definition of done.' },
|
|
1592
|
-
nonGoals: { type: 'array', items: { type: 'string' }, description: 'Out of scope items.' },
|
|
1593
|
-
priority: { type: 'string', description: 'Priority label (e.g., P0, P1).' }
|
|
1594
|
-
},
|
|
1595
|
-
required: ['projectPath', 'goal'],
|
|
1596
|
-
},
|
|
1597
|
-
},
|
|
1598
|
-
{
|
|
1599
|
-
name: 'record_decision_log',
|
|
1600
|
-
description: 'Record a structured decision log entry with rationale and alternatives.',
|
|
1601
|
-
inputSchema: {
|
|
1602
|
-
type: 'object',
|
|
1603
|
-
properties: {
|
|
1604
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
1605
|
-
intentId: { type: 'string', description: 'Related intent id. Optional if latest intent should be inferred.' },
|
|
1606
|
-
decision: { type: 'string', description: 'Decision statement.' },
|
|
1607
|
-
rationale: { type: 'string', description: 'Why this decision was made.' },
|
|
1608
|
-
alternativesRejected: { type: 'array', items: { type: 'string' }, description: 'Alternatives considered and rejected.' },
|
|
1609
|
-
evidenceRefs: { type: 'array', items: { type: 'string' }, description: 'References supporting the decision.' }
|
|
1610
|
-
},
|
|
1611
|
-
required: ['projectPath', 'decision'],
|
|
1612
|
-
},
|
|
1613
|
-
},
|
|
1614
|
-
{
|
|
1615
|
-
name: 'generate_handoff_brief',
|
|
1616
|
-
description: 'Generate a handoff brief from saved intents, decisions, and execution traces for the next AI/operator.',
|
|
1617
|
-
inputSchema: {
|
|
1618
|
-
type: 'object',
|
|
1619
|
-
properties: {
|
|
1620
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
1621
|
-
maxItems: { type: 'number', description: 'Max items per section. Default: 5' }
|
|
1622
|
-
},
|
|
1623
|
-
required: ['projectPath'],
|
|
1624
|
-
},
|
|
1625
|
-
},
|
|
1626
|
-
{
|
|
1627
|
-
name: 'summarize_intent_context',
|
|
1628
|
-
description: 'Summarize current intent context (goal, open decisions, risks, next actions) in compact form.',
|
|
1629
|
-
inputSchema: {
|
|
1630
|
-
type: 'object',
|
|
1631
|
-
properties: {
|
|
1632
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' }
|
|
1633
|
-
},
|
|
1634
|
-
required: ['projectPath'],
|
|
1635
|
-
},
|
|
1636
|
-
},
|
|
1637
|
-
{
|
|
1638
|
-
name: 'record_work_step',
|
|
1639
|
-
description: 'Unified operation: records execution trace and optionally refreshes handoff pack in one call.',
|
|
1640
|
-
inputSchema: {
|
|
1641
|
-
type: 'object',
|
|
1642
|
-
properties: {
|
|
1643
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
1644
|
-
intentId: { type: 'string', description: 'Related intent id. Optional: auto-link active intent.' },
|
|
1645
|
-
action: { type: 'string', description: 'Executed action name.' },
|
|
1646
|
-
command: { type: 'string', description: 'Command or tool invocation.' },
|
|
1647
|
-
filesChanged: { type: 'array', items: { type: 'string' }, description: 'Changed file paths.' },
|
|
1648
|
-
result: { type: 'string', description: 'success|failed|partial' },
|
|
1649
|
-
artifact: { type: 'string', description: 'Artifact reference (branch, commit, build id).' },
|
|
1650
|
-
error: { type: 'string', description: 'Error details when failed.' },
|
|
1651
|
-
refreshHandoffPack: { type: 'boolean', description: 'If true, regenerates handoff pack after recording. Default: true' },
|
|
1652
|
-
maxItems: { type: 'number', description: 'Max items for refreshed handoff pack. Default: 10' }
|
|
1653
|
-
},
|
|
1654
|
-
required: ['projectPath', 'action', 'result'],
|
|
1655
|
-
},
|
|
1656
|
-
},
|
|
1657
|
-
{
|
|
1658
|
-
name: 'record_execution_trace',
|
|
1659
|
-
description: 'Record execution trace for a work step (command/tool, files changed, result, artifacts).',
|
|
1660
|
-
inputSchema: {
|
|
1661
|
-
type: 'object',
|
|
1662
|
-
properties: {
|
|
1663
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
1664
|
-
intentId: { type: 'string', description: 'Related intent id. Optional: auto-link active intent.' },
|
|
1665
|
-
action: { type: 'string', description: 'Executed action name.' },
|
|
1666
|
-
command: { type: 'string', description: 'Command or tool invocation.' },
|
|
1667
|
-
filesChanged: { type: 'array', items: { type: 'string' }, description: 'Changed file paths.' },
|
|
1668
|
-
result: { type: 'string', description: 'success|failed|partial' },
|
|
1669
|
-
artifact: { type: 'string', description: 'Artifact reference (branch, commit, build id).' },
|
|
1670
|
-
error: { type: 'string', description: 'Error details when failed.' }
|
|
1671
|
-
},
|
|
1672
|
-
required: ['projectPath', 'action', 'result'],
|
|
1673
|
-
},
|
|
1674
|
-
},
|
|
1675
|
-
{
|
|
1676
|
-
name: 'export_handoff_pack',
|
|
1677
|
-
description: 'Export a machine-readable handoff pack combining intent, decisions, and execution traces.',
|
|
1678
|
-
inputSchema: {
|
|
1679
|
-
type: 'object',
|
|
1680
|
-
properties: {
|
|
1681
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
1682
|
-
maxItems: { type: 'number', description: 'Maximum decisions/traces to include. Default: 10' }
|
|
1683
|
-
},
|
|
1684
|
-
required: ['projectPath'],
|
|
1685
|
-
},
|
|
1686
|
-
},
|
|
1687
|
-
{
|
|
1688
|
-
name: 'set_recording_mode',
|
|
1689
|
-
description: 'Set recording mode: lite (minimal overhead) or full (richer context).',
|
|
1690
|
-
inputSchema: {
|
|
1691
|
-
type: 'object',
|
|
1692
|
-
properties: {
|
|
1693
|
-
mode: { type: 'string', description: 'lite|full' }
|
|
1694
|
-
},
|
|
1695
|
-
required: ['mode'],
|
|
1696
|
-
},
|
|
1697
|
-
},
|
|
1698
|
-
{
|
|
1699
|
-
name: 'get_recording_mode',
|
|
1700
|
-
description: 'Get current recording mode and queue status.',
|
|
1701
|
-
inputSchema: {
|
|
1702
|
-
type: 'object',
|
|
1703
|
-
properties: {},
|
|
1704
|
-
required: [],
|
|
1705
|
-
},
|
|
1706
|
-
},
|
|
1707
|
-
{
|
|
1708
|
-
name: 'tool_catalog',
|
|
1709
|
-
description: 'Discover available tools including hidden legacy tools. Use query to search by capability keywords. Results include group categorization (core/dynamic). Matching dynamic groups are auto-activated and become available immediately. Core groups (always visible): core_meta, core_project, core_editor, core_scene, core_script, core_class, core_signal, core_resource, core_export, core_runtime, core_visualizer, core_diagnostics. Dynamic groups (on-demand): scene_advanced, uid, import_export, autoload, signal, runtime, resource, animation, plugin, input, tilemap, audio, navigation, theme_ui, asset_store, testing, dx_tools, intent_tracking, class_advanced, lsp, dap, version_gate.',
|
|
1710
|
-
inputSchema: {
|
|
1711
|
-
type: 'object',
|
|
1712
|
-
properties: {
|
|
1713
|
-
query: { type: 'string', description: 'Optional keyword search over tool names and descriptions.' },
|
|
1714
|
-
limit: { type: 'number', description: 'Maximum results to return. Default: 30, max: 100.' },
|
|
1715
|
-
},
|
|
1716
|
-
required: [],
|
|
1717
|
-
},
|
|
1718
|
-
},
|
|
1719
|
-
{
|
|
1720
|
-
name: 'manage_tool_groups',
|
|
1721
|
-
description: 'Manage tool groups. Actions: list (show all core + dynamic groups), activate (enable a dynamic group), deactivate (disable a dynamic group), reset (disable all dynamic), status (show current state). Core groups (always visible, 33 tools): core_meta, core_project, core_editor, core_scene, core_script, core_class, core_signal, core_resource, core_export, core_runtime, core_visualizer, core_diagnostics. Dynamic groups (on-demand, 78 tools): scene_advanced, uid, import_export, autoload, signal, runtime, resource, animation, plugin, input, tilemap, audio, navigation, theme_ui, asset_store, testing, dx_tools, intent_tracking, class_advanced, lsp, dap, version_gate.',
|
|
1722
|
-
inputSchema: {
|
|
1723
|
-
type: 'object',
|
|
1724
|
-
properties: {
|
|
1725
|
-
action: { type: 'string', description: 'Action to perform: list, activate, deactivate, reset, status', enum: ['list', 'activate', 'deactivate', 'reset', 'status'] },
|
|
1726
|
-
group: { type: 'string', description: 'Group name for activate/deactivate (dynamic groups only). One of: scene_advanced, uid, import_export, autoload, signal, runtime, resource, animation, plugin, input, tilemap, audio, navigation, theme_ui, asset_store, testing, dx_tools, intent_tracking, class_advanced, lsp, dap, version_gate.' },
|
|
1727
|
-
},
|
|
1728
|
-
required: ['action'],
|
|
1729
|
-
},
|
|
1730
|
-
},
|
|
1731
|
-
{
|
|
1732
|
-
name: 'create_scene',
|
|
1733
|
-
description: 'Creates a new Godot scene file (.tscn) with a specified root node type. Use to start building new game levels, UI screens, or reusable components. The scene is saved automatically after creation.',
|
|
1734
|
-
inputSchema: {
|
|
1735
|
-
type: 'object',
|
|
1736
|
-
properties: {
|
|
1737
|
-
projectPath: {
|
|
1738
|
-
type: 'string',
|
|
1739
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1740
|
-
},
|
|
1741
|
-
scenePath: {
|
|
1742
|
-
type: 'string',
|
|
1743
|
-
description: 'Path for new scene file relative to project (e.g., "scenes/Player.tscn", "levels/Level1.tscn")',
|
|
1744
|
-
},
|
|
1745
|
-
rootNodeType: {
|
|
1746
|
-
type: 'string',
|
|
1747
|
-
description: 'Godot node class for root (e.g., "Node2D" for 2D games, "Node3D" for 3D, "Control" for UI). Default: "Node"',
|
|
1748
|
-
},
|
|
1749
|
-
},
|
|
1750
|
-
required: ['projectPath', 'scenePath'],
|
|
1751
|
-
},
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
name: 'add_node',
|
|
1755
|
-
description: 'Adds ANY node type to an existing scene. This is the universal node creation tool — replaces all specialized create_* node tools. Supports ALL ClassDB node types (Camera3D, DirectionalLight3D, AudioStreamPlayer, HTTPRequest, RayCast3D, etc.). Set any property via the properties parameter with type conversion support (Vector2, Vector3, Color, etc.). Use query_classes to discover available node types. Use query_class_info to discover available properties for a type.',
|
|
1756
|
-
inputSchema: {
|
|
1757
|
-
type: 'object',
|
|
1758
|
-
properties: {
|
|
1759
|
-
projectPath: {
|
|
1760
|
-
type: 'string',
|
|
1761
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1762
|
-
},
|
|
1763
|
-
scenePath: {
|
|
1764
|
-
type: 'string',
|
|
1765
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Player.tscn")',
|
|
1766
|
-
},
|
|
1767
|
-
parentNodePath: {
|
|
1768
|
-
type: 'string',
|
|
1769
|
-
description: 'Node path within scene (e.g., "." for root, "Player" for direct child, "Player/Sprite2D" for nested)',
|
|
1770
|
-
},
|
|
1771
|
-
nodeType: {
|
|
1772
|
-
type: 'string',
|
|
1773
|
-
description: 'Godot node class name (e.g., "Sprite2D", "CollisionShape2D", "CharacterBody2D"). Must be valid Godot 4 class.',
|
|
1774
|
-
},
|
|
1775
|
-
nodeName: {
|
|
1776
|
-
type: 'string',
|
|
1777
|
-
description: 'Name for the new node (will be unique identifier in scene tree)',
|
|
1778
|
-
},
|
|
1779
|
-
properties: {
|
|
1780
|
-
type: 'string',
|
|
1781
|
-
description: 'Optional properties to set on the node (as JSON string)',
|
|
1782
|
-
},
|
|
1783
|
-
},
|
|
1784
|
-
required: ['projectPath', 'scenePath', 'nodeType', 'nodeName'],
|
|
1785
|
-
},
|
|
1786
|
-
},
|
|
1787
|
-
{
|
|
1788
|
-
name: 'load_sprite',
|
|
1789
|
-
description: 'Assigns a texture to a Sprite2D node in a scene. Use to set character sprites, backgrounds, or UI images. The texture file must exist in the project.',
|
|
1790
|
-
inputSchema: {
|
|
1791
|
-
type: 'object',
|
|
1792
|
-
properties: {
|
|
1793
|
-
projectPath: {
|
|
1794
|
-
type: 'string',
|
|
1795
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1796
|
-
},
|
|
1797
|
-
scenePath: {
|
|
1798
|
-
type: 'string',
|
|
1799
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Player.tscn")',
|
|
1800
|
-
},
|
|
1801
|
-
nodePath: {
|
|
1802
|
-
type: 'string',
|
|
1803
|
-
description: 'Path to Sprite2D node in scene (e.g., ".", "Player/Sprite2D")',
|
|
1804
|
-
},
|
|
1805
|
-
texturePath: {
|
|
1806
|
-
type: 'string',
|
|
1807
|
-
description: 'Path to texture file relative to project (e.g., "assets/player.png", "sprites/enemy.svg")',
|
|
1808
|
-
},
|
|
1809
|
-
},
|
|
1810
|
-
required: ['projectPath', 'scenePath', 'nodePath', 'texturePath'],
|
|
1811
|
-
},
|
|
1812
|
-
},
|
|
1813
|
-
{
|
|
1814
|
-
name: 'save_scene',
|
|
1815
|
-
description: 'Saves changes to a scene file or creates a variant at a new path. Most scene modification tools save automatically, but use this for explicit saves or creating variants.',
|
|
1816
|
-
inputSchema: {
|
|
1817
|
-
type: 'object',
|
|
1818
|
-
properties: {
|
|
1819
|
-
projectPath: {
|
|
1820
|
-
type: 'string',
|
|
1821
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1822
|
-
},
|
|
1823
|
-
scenePath: {
|
|
1824
|
-
type: 'string',
|
|
1825
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Player.tscn")',
|
|
1826
|
-
},
|
|
1827
|
-
newPath: {
|
|
1828
|
-
type: 'string',
|
|
1829
|
-
description: 'Optional: New path to save as variant (e.g., "scenes/PlayerBlue.tscn")',
|
|
1830
|
-
},
|
|
1831
|
-
},
|
|
1832
|
-
required: ['projectPath', 'scenePath'],
|
|
1833
|
-
},
|
|
1834
|
-
},
|
|
1835
|
-
{
|
|
1836
|
-
name: 'get_uid',
|
|
1837
|
-
description: 'Get the UID for a specific file in a Godot project (for Godot 4.4+)',
|
|
1838
|
-
inputSchema: {
|
|
1839
|
-
type: 'object',
|
|
1840
|
-
properties: {
|
|
1841
|
-
projectPath: {
|
|
1842
|
-
type: 'string',
|
|
1843
|
-
description: 'Path to the Godot project directory',
|
|
1844
|
-
},
|
|
1845
|
-
filePath: {
|
|
1846
|
-
type: 'string',
|
|
1847
|
-
description: 'Path to the file (relative to project) for which to get the UID',
|
|
1848
|
-
},
|
|
1849
|
-
},
|
|
1850
|
-
required: ['projectPath', 'filePath'],
|
|
1851
|
-
},
|
|
1852
|
-
},
|
|
1853
|
-
{
|
|
1854
|
-
name: 'update_project_uids',
|
|
1855
|
-
description: 'Update UID references in a Godot project by resaving resources (for Godot 4.4+)',
|
|
1856
|
-
inputSchema: {
|
|
1857
|
-
type: 'object',
|
|
1858
|
-
properties: {
|
|
1859
|
-
projectPath: {
|
|
1860
|
-
type: 'string',
|
|
1861
|
-
description: 'Path to the Godot project directory',
|
|
1862
|
-
},
|
|
1863
|
-
},
|
|
1864
|
-
required: ['projectPath'],
|
|
1865
|
-
},
|
|
1866
|
-
},
|
|
1867
|
-
// ============================================
|
|
1868
|
-
// Phase 1: Scene Operations (V3 Enhancement)
|
|
1869
|
-
// ============================================
|
|
1870
|
-
{
|
|
1871
|
-
name: 'list_scene_nodes',
|
|
1872
|
-
description: 'Returns complete scene tree structure with all nodes, types, and hierarchy. Use to understand scene organization before modifying. Returns nested tree with node paths.',
|
|
1873
|
-
inputSchema: {
|
|
1874
|
-
type: 'object',
|
|
1875
|
-
properties: {
|
|
1876
|
-
projectPath: {
|
|
1877
|
-
type: 'string',
|
|
1878
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1879
|
-
},
|
|
1880
|
-
scenePath: {
|
|
1881
|
-
type: 'string',
|
|
1882
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Player.tscn")',
|
|
1883
|
-
},
|
|
1884
|
-
depth: {
|
|
1885
|
-
type: 'number',
|
|
1886
|
-
description: 'Maximum depth to traverse. -1 = all (default), 0 = root only, 1 = root + children',
|
|
1887
|
-
},
|
|
1888
|
-
includeProperties: {
|
|
1889
|
-
type: 'boolean',
|
|
1890
|
-
description: 'If true, includes all node properties. If false (default), only names and types.',
|
|
1891
|
-
},
|
|
1892
|
-
},
|
|
1893
|
-
required: ['projectPath', 'scenePath'],
|
|
1894
|
-
},
|
|
1895
|
-
},
|
|
1896
|
-
{
|
|
1897
|
-
name: 'get_node_properties',
|
|
1898
|
-
description: 'Returns all properties of a specific node in a scene. Use to inspect current values before modifying. Returns property names, values, and types.',
|
|
1899
|
-
inputSchema: {
|
|
1900
|
-
type: 'object',
|
|
1901
|
-
properties: {
|
|
1902
|
-
projectPath: {
|
|
1903
|
-
type: 'string',
|
|
1904
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1905
|
-
},
|
|
1906
|
-
scenePath: {
|
|
1907
|
-
type: 'string',
|
|
1908
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Player.tscn")',
|
|
1909
|
-
},
|
|
1910
|
-
nodePath: {
|
|
1911
|
-
type: 'string',
|
|
1912
|
-
description: 'Path to node within scene (e.g., ".", "Player", "Player/Sprite2D")',
|
|
1913
|
-
},
|
|
1914
|
-
includeDefaults: {
|
|
1915
|
-
type: 'boolean',
|
|
1916
|
-
description: 'If true, includes properties with default values. If false (default), only modified properties.',
|
|
1917
|
-
},
|
|
1918
|
-
},
|
|
1919
|
-
required: ['projectPath', 'scenePath', 'nodePath'],
|
|
1920
|
-
},
|
|
1921
|
-
},
|
|
1922
|
-
{
|
|
1923
|
-
name: 'set_node_properties',
|
|
1924
|
-
description: 'Sets multiple properties on a node in a scene. Prerequisite: scene and node must exist (use create_scene and add_node first). Use to modify position, scale, rotation, or any node-specific properties. Scene is saved automatically unless saveScene=false.',
|
|
1925
|
-
inputSchema: {
|
|
1926
|
-
type: 'object',
|
|
1927
|
-
properties: {
|
|
1928
|
-
projectPath: {
|
|
1929
|
-
type: 'string',
|
|
1930
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1931
|
-
},
|
|
1932
|
-
scenePath: {
|
|
1933
|
-
type: 'string',
|
|
1934
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Player.tscn")',
|
|
1935
|
-
},
|
|
1936
|
-
nodePath: {
|
|
1937
|
-
type: 'string',
|
|
1938
|
-
description: 'Path to node within scene (e.g., ".", "Player", "Player/Sprite2D")',
|
|
1939
|
-
},
|
|
1940
|
-
properties: {
|
|
1941
|
-
type: 'string',
|
|
1942
|
-
description: 'JSON object of properties to set (e.g., {"position": {"x": 100, "y": 200}, "scale": {"x": 2, "y": 2}})',
|
|
1943
|
-
},
|
|
1944
|
-
saveScene: {
|
|
1945
|
-
type: 'boolean',
|
|
1946
|
-
description: 'If true (default), saves scene after modification. Set false for batch operations.',
|
|
1947
|
-
},
|
|
1948
|
-
},
|
|
1949
|
-
required: ['projectPath', 'scenePath', 'nodePath', 'properties'],
|
|
1950
|
-
},
|
|
1951
|
-
},
|
|
1952
|
-
{
|
|
1953
|
-
name: 'delete_node',
|
|
1954
|
-
description: 'Removes a node and all its children from a scene. Use to clean up unused nodes. Cannot delete root node. Scene is saved automatically unless saveScene=false.',
|
|
1955
|
-
inputSchema: {
|
|
1956
|
-
type: 'object',
|
|
1957
|
-
properties: {
|
|
1958
|
-
projectPath: {
|
|
1959
|
-
type: 'string',
|
|
1960
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1961
|
-
},
|
|
1962
|
-
scenePath: {
|
|
1963
|
-
type: 'string',
|
|
1964
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Player.tscn")',
|
|
1965
|
-
},
|
|
1966
|
-
nodePath: {
|
|
1967
|
-
type: 'string',
|
|
1968
|
-
description: 'Path to node to delete (e.g., "Player/OldSprite", "Enemies/Enemy1")',
|
|
1969
|
-
},
|
|
1970
|
-
saveScene: {
|
|
1971
|
-
type: 'boolean',
|
|
1972
|
-
description: 'If true (default), saves scene after deletion. Set false for batch operations.',
|
|
1973
|
-
},
|
|
1974
|
-
},
|
|
1975
|
-
required: ['projectPath', 'scenePath', 'nodePath'],
|
|
1976
|
-
},
|
|
1977
|
-
},
|
|
1978
|
-
{
|
|
1979
|
-
name: 'duplicate_node',
|
|
1980
|
-
description: 'Creates a copy of a node with all its properties and children. Use to replicate enemies, UI elements, or any repeated structures. Scene is saved automatically unless saveScene=false.',
|
|
1981
|
-
inputSchema: {
|
|
1982
|
-
type: 'object',
|
|
1983
|
-
properties: {
|
|
1984
|
-
projectPath: {
|
|
1985
|
-
type: 'string',
|
|
1986
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
1987
|
-
},
|
|
1988
|
-
scenePath: {
|
|
1989
|
-
type: 'string',
|
|
1990
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Level.tscn")',
|
|
1991
|
-
},
|
|
1992
|
-
nodePath: {
|
|
1993
|
-
type: 'string',
|
|
1994
|
-
description: 'Path to node to duplicate (e.g., "Enemies/Enemy", "UI/Button")',
|
|
1995
|
-
},
|
|
1996
|
-
newName: {
|
|
1997
|
-
type: 'string',
|
|
1998
|
-
description: 'Name for the new duplicated node (e.g., "Enemy2", "ButtonCopy")',
|
|
1999
|
-
},
|
|
2000
|
-
parentPath: {
|
|
2001
|
-
type: 'string',
|
|
2002
|
-
description: 'Optional: Different parent path. If omitted, uses same parent as original.',
|
|
2003
|
-
},
|
|
2004
|
-
saveScene: {
|
|
2005
|
-
type: 'boolean',
|
|
2006
|
-
description: 'If true (default), saves scene after duplication. Set false for batch operations.',
|
|
2007
|
-
},
|
|
2008
|
-
},
|
|
2009
|
-
required: ['projectPath', 'scenePath', 'nodePath', 'newName'],
|
|
2010
|
-
},
|
|
2011
|
-
},
|
|
2012
|
-
{
|
|
2013
|
-
name: 'reparent_node',
|
|
2014
|
-
description: 'Moves a node to a different parent in the scene tree, preserving all properties and children. Use for reorganizing scene hierarchy. Scene is saved automatically unless saveScene=false.',
|
|
2015
|
-
inputSchema: {
|
|
2016
|
-
type: 'object',
|
|
2017
|
-
properties: {
|
|
2018
|
-
projectPath: {
|
|
2019
|
-
type: 'string',
|
|
2020
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2021
|
-
},
|
|
2022
|
-
scenePath: {
|
|
2023
|
-
type: 'string',
|
|
2024
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Level.tscn")',
|
|
2025
|
-
},
|
|
2026
|
-
nodePath: {
|
|
2027
|
-
type: 'string',
|
|
2028
|
-
description: 'Path to node to move (e.g., "OldParent/Child", "UI/Button")',
|
|
2029
|
-
},
|
|
2030
|
-
newParentPath: {
|
|
2031
|
-
type: 'string',
|
|
2032
|
-
description: 'Path to new parent node (e.g., "NewParent", "UI/Panel")',
|
|
2033
|
-
},
|
|
2034
|
-
saveScene: {
|
|
2035
|
-
type: 'boolean',
|
|
2036
|
-
description: 'If true (default), saves scene after reparenting. Set false for batch operations.',
|
|
2037
|
-
},
|
|
2038
|
-
},
|
|
2039
|
-
required: ['projectPath', 'scenePath', 'nodePath', 'newParentPath'],
|
|
2040
|
-
},
|
|
2041
|
-
},
|
|
2042
|
-
// ============================================
|
|
2043
|
-
// Phase 2: Import/Export Pipeline (V3 Enhancement)
|
|
2044
|
-
// ============================================
|
|
2045
|
-
{
|
|
2046
|
-
name: 'get_import_status',
|
|
2047
|
-
description: 'Returns import status for project resources. Use to find outdated or failed imports. Shows which resources need reimporting.',
|
|
2048
|
-
inputSchema: {
|
|
2049
|
-
type: 'object',
|
|
2050
|
-
properties: {
|
|
2051
|
-
projectPath: {
|
|
2052
|
-
type: 'string',
|
|
2053
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2054
|
-
},
|
|
2055
|
-
resourcePath: {
|
|
2056
|
-
type: 'string',
|
|
2057
|
-
description: 'Optional: specific resource path (e.g., "textures/player.png"). If omitted, returns all.',
|
|
2058
|
-
},
|
|
2059
|
-
includeUpToDate: {
|
|
2060
|
-
type: 'boolean',
|
|
2061
|
-
description: 'If true, includes already-imported resources. Default: false (only pending)',
|
|
2062
|
-
},
|
|
2063
|
-
},
|
|
2064
|
-
required: ['projectPath'],
|
|
2065
|
-
},
|
|
2066
|
-
},
|
|
2067
|
-
{
|
|
2068
|
-
name: 'get_import_options',
|
|
2069
|
-
description: 'Returns current import settings for a resource. Use to check compression, mipmaps, filter settings before modifying.',
|
|
2070
|
-
inputSchema: {
|
|
2071
|
-
type: 'object',
|
|
2072
|
-
properties: {
|
|
2073
|
-
projectPath: {
|
|
2074
|
-
type: 'string',
|
|
2075
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2076
|
-
},
|
|
2077
|
-
resourcePath: {
|
|
2078
|
-
type: 'string',
|
|
2079
|
-
description: 'Path to resource file (e.g., "textures/player.png", "audio/music.ogg")',
|
|
2080
|
-
},
|
|
2081
|
-
},
|
|
2082
|
-
required: ['projectPath', 'resourcePath'],
|
|
2083
|
-
},
|
|
2084
|
-
},
|
|
2085
|
-
{
|
|
2086
|
-
name: 'set_import_options',
|
|
2087
|
-
description: 'Modifies import settings for a resource. Use to change compression, mipmaps, filter mode. Triggers reimport by default.',
|
|
2088
|
-
inputSchema: {
|
|
2089
|
-
type: 'object',
|
|
2090
|
-
properties: {
|
|
2091
|
-
projectPath: {
|
|
2092
|
-
type: 'string',
|
|
2093
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2094
|
-
},
|
|
2095
|
-
resourcePath: {
|
|
2096
|
-
type: 'string',
|
|
2097
|
-
description: 'Path to resource file (e.g., "textures/player.png")',
|
|
2098
|
-
},
|
|
2099
|
-
options: {
|
|
2100
|
-
type: 'string',
|
|
2101
|
-
description: 'JSON string of import options (e.g., {"compress/mode": 1, "mipmaps/generate": true})',
|
|
2102
|
-
},
|
|
2103
|
-
reimport: {
|
|
2104
|
-
type: 'boolean',
|
|
2105
|
-
description: 'If true (default), reimports after setting. Set false for batch changes.',
|
|
2106
|
-
},
|
|
2107
|
-
},
|
|
2108
|
-
required: ['projectPath', 'resourcePath', 'options'],
|
|
2109
|
-
},
|
|
2110
|
-
},
|
|
2111
|
-
{
|
|
2112
|
-
name: 'reimport_resource',
|
|
2113
|
-
description: 'Forces reimport of resources. Use after modifying source files or to fix import issues. Can reimport single file or all modified.',
|
|
2114
|
-
inputSchema: {
|
|
2115
|
-
type: 'object',
|
|
2116
|
-
properties: {
|
|
2117
|
-
projectPath: {
|
|
2118
|
-
type: 'string',
|
|
2119
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2120
|
-
},
|
|
2121
|
-
resourcePath: {
|
|
2122
|
-
type: 'string',
|
|
2123
|
-
description: 'Optional: specific resource to reimport. If omitted, reimports all modified.',
|
|
2124
|
-
},
|
|
2125
|
-
force: {
|
|
2126
|
-
type: 'boolean',
|
|
2127
|
-
description: 'If true, reimports even if up-to-date. Default: false',
|
|
2128
|
-
},
|
|
2129
|
-
},
|
|
2130
|
-
required: ['projectPath'],
|
|
2131
|
-
},
|
|
2132
|
-
},
|
|
2133
|
-
{
|
|
2134
|
-
name: 'list_export_presets',
|
|
2135
|
-
description: 'Lists all export presets defined in export_presets.cfg. Use before export_project to see available targets (Windows, Linux, Android, etc.).',
|
|
2136
|
-
inputSchema: {
|
|
2137
|
-
type: 'object',
|
|
2138
|
-
properties: {
|
|
2139
|
-
projectPath: {
|
|
2140
|
-
type: 'string',
|
|
2141
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2142
|
-
},
|
|
2143
|
-
includeTemplateStatus: {
|
|
2144
|
-
type: 'boolean',
|
|
2145
|
-
description: 'If true (default), shows if export templates are installed.',
|
|
2146
|
-
},
|
|
2147
|
-
},
|
|
2148
|
-
required: ['projectPath'],
|
|
2149
|
-
},
|
|
2150
|
-
},
|
|
2151
|
-
{
|
|
2152
|
-
name: 'export_project',
|
|
2153
|
-
description: 'Exports the project to a distributable format. Use to build final game executables. Requires export templates installed.',
|
|
2154
|
-
inputSchema: {
|
|
2155
|
-
type: 'object',
|
|
2156
|
-
properties: {
|
|
2157
|
-
projectPath: {
|
|
2158
|
-
type: 'string',
|
|
2159
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2160
|
-
},
|
|
2161
|
-
preset: {
|
|
2162
|
-
type: 'string',
|
|
2163
|
-
description: 'Export preset name from export_presets.cfg (e.g., "Windows Desktop", "Linux/X11")',
|
|
2164
|
-
},
|
|
2165
|
-
outputPath: {
|
|
2166
|
-
type: 'string',
|
|
2167
|
-
description: 'Destination path for exported file (e.g., "builds/game.exe", "builds/game.x86_64")',
|
|
2168
|
-
},
|
|
2169
|
-
debug: {
|
|
2170
|
-
type: 'boolean',
|
|
2171
|
-
description: 'If true, exports debug build. Default: false (release)',
|
|
2172
|
-
},
|
|
2173
|
-
},
|
|
2174
|
-
required: ['projectPath', 'preset', 'outputPath'],
|
|
2175
|
-
},
|
|
2176
|
-
},
|
|
2177
|
-
{
|
|
2178
|
-
name: 'validate_project',
|
|
2179
|
-
description: 'Checks project for export issues: missing resources, script errors, configuration problems. Use before export_project.',
|
|
2180
|
-
inputSchema: {
|
|
2181
|
-
type: 'object',
|
|
2182
|
-
properties: {
|
|
2183
|
-
projectPath: {
|
|
2184
|
-
type: 'string',
|
|
2185
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2186
|
-
},
|
|
2187
|
-
preset: {
|
|
2188
|
-
type: 'string',
|
|
2189
|
-
description: 'Optional: validate against specific export preset requirements',
|
|
2190
|
-
},
|
|
2191
|
-
includeSuggestions: {
|
|
2192
|
-
type: 'boolean',
|
|
2193
|
-
description: 'If true (default), includes fix suggestions for each issue',
|
|
2194
|
-
},
|
|
2195
|
-
},
|
|
2196
|
-
required: ['projectPath'],
|
|
2197
|
-
},
|
|
2198
|
-
},
|
|
2199
|
-
// ============================================
|
|
2200
|
-
// Phase 3: DX Tools (V3 Enhancement)
|
|
2201
|
-
// ============================================
|
|
2202
|
-
{
|
|
2203
|
-
name: 'get_dependencies',
|
|
2204
|
-
description: 'Analyzes resource dependencies and detects circular references. Use to understand what a scene/script depends on before refactoring.',
|
|
2205
|
-
inputSchema: {
|
|
2206
|
-
type: 'object',
|
|
2207
|
-
properties: {
|
|
2208
|
-
projectPath: {
|
|
2209
|
-
type: 'string',
|
|
2210
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2211
|
-
},
|
|
2212
|
-
resourcePath: {
|
|
2213
|
-
type: 'string',
|
|
2214
|
-
description: 'Path to analyze (e.g., "scenes/player.tscn", "scripts/game.gd")',
|
|
2215
|
-
},
|
|
2216
|
-
depth: {
|
|
2217
|
-
type: 'number',
|
|
2218
|
-
description: 'How deep to traverse dependencies. -1 for unlimited. Default: -1',
|
|
2219
|
-
},
|
|
2220
|
-
includeBuiltin: {
|
|
2221
|
-
type: 'boolean',
|
|
2222
|
-
description: 'If true, includes Godot built-in resources. Default: false',
|
|
2223
|
-
},
|
|
2224
|
-
},
|
|
2225
|
-
required: ['projectPath', 'resourcePath'],
|
|
2226
|
-
},
|
|
2227
|
-
},
|
|
2228
|
-
{
|
|
2229
|
-
name: 'find_resource_usages',
|
|
2230
|
-
description: 'Finds all files that reference a resource. Use before deleting or renaming to avoid breaking references.',
|
|
2231
|
-
inputSchema: {
|
|
2232
|
-
type: 'object',
|
|
2233
|
-
properties: {
|
|
2234
|
-
projectPath: {
|
|
2235
|
-
type: 'string',
|
|
2236
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2237
|
-
},
|
|
2238
|
-
resourcePath: {
|
|
2239
|
-
type: 'string',
|
|
2240
|
-
description: 'Resource to search for (e.g., "textures/player.png")',
|
|
2241
|
-
},
|
|
2242
|
-
fileTypes: {
|
|
2243
|
-
type: 'array',
|
|
2244
|
-
items: { type: 'string' },
|
|
2245
|
-
description: 'File types to search. Default: ["tscn", "tres", "gd"]',
|
|
2246
|
-
},
|
|
2247
|
-
},
|
|
2248
|
-
required: ['projectPath', 'resourcePath'],
|
|
2249
|
-
},
|
|
2250
|
-
},
|
|
2251
|
-
{
|
|
2252
|
-
name: 'parse_error_log',
|
|
2253
|
-
description: 'Parses Godot error log and provides fix suggestions. Use to diagnose runtime errors or script issues.',
|
|
2254
|
-
inputSchema: {
|
|
2255
|
-
type: 'object',
|
|
2256
|
-
properties: {
|
|
2257
|
-
projectPath: {
|
|
2258
|
-
type: 'string',
|
|
2259
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2260
|
-
},
|
|
2261
|
-
logContent: {
|
|
2262
|
-
type: 'string',
|
|
2263
|
-
description: 'Optional: error log text. If omitted, reads from godot.log',
|
|
2264
|
-
},
|
|
2265
|
-
maxErrors: {
|
|
2266
|
-
type: 'number',
|
|
2267
|
-
description: 'Maximum errors to return. Default: 50',
|
|
2268
|
-
},
|
|
2269
|
-
},
|
|
2270
|
-
required: ['projectPath'],
|
|
2271
|
-
},
|
|
2272
|
-
},
|
|
2273
|
-
{
|
|
2274
|
-
name: 'get_project_health',
|
|
2275
|
-
description: 'Generates a health report with scoring for project quality. Checks for unused resources, script errors, missing references, etc.',
|
|
2276
|
-
inputSchema: {
|
|
2277
|
-
type: 'object',
|
|
2278
|
-
properties: {
|
|
2279
|
-
projectPath: {
|
|
2280
|
-
type: 'string',
|
|
2281
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2282
|
-
},
|
|
2283
|
-
includeDetails: {
|
|
2284
|
-
type: 'boolean',
|
|
2285
|
-
description: 'If true (default), includes detailed breakdown per category',
|
|
2286
|
-
},
|
|
2287
|
-
},
|
|
2288
|
-
required: ['projectPath'],
|
|
2289
|
-
},
|
|
2290
|
-
},
|
|
2291
|
-
// ============================================
|
|
2292
|
-
// Phase 3: Project Configuration Tools
|
|
2293
|
-
// ============================================
|
|
2294
|
-
{
|
|
2295
|
-
name: 'get_project_setting',
|
|
2296
|
-
description: 'Reads a value from project.godot settings. Use to check game name, window size, physics settings, etc.',
|
|
2297
|
-
inputSchema: {
|
|
2298
|
-
type: 'object',
|
|
2299
|
-
properties: {
|
|
2300
|
-
projectPath: {
|
|
2301
|
-
type: 'string',
|
|
2302
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2303
|
-
},
|
|
2304
|
-
setting: {
|
|
2305
|
-
type: 'string',
|
|
2306
|
-
description: 'Setting path (e.g., "application/config/name", "display/window/size/width", "physics/2d/default_gravity")',
|
|
2307
|
-
},
|
|
2308
|
-
},
|
|
2309
|
-
required: ['projectPath', 'setting'],
|
|
2310
|
-
},
|
|
2311
|
-
},
|
|
2312
|
-
{
|
|
2313
|
-
name: 'set_project_setting',
|
|
2314
|
-
description: 'Writes a value to project.godot settings. Use to configure game name, window size, physics, etc.',
|
|
2315
|
-
inputSchema: {
|
|
2316
|
-
type: 'object',
|
|
2317
|
-
properties: {
|
|
2318
|
-
projectPath: {
|
|
2319
|
-
type: 'string',
|
|
2320
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2321
|
-
},
|
|
2322
|
-
setting: {
|
|
2323
|
-
type: 'string',
|
|
2324
|
-
description: 'Setting path (e.g., "application/config/name", "display/window/size/width")',
|
|
2325
|
-
},
|
|
2326
|
-
value: {
|
|
2327
|
-
type: 'string',
|
|
2328
|
-
description: 'Value to set (Godot auto-converts types)',
|
|
2329
|
-
},
|
|
2330
|
-
},
|
|
2331
|
-
required: ['projectPath', 'setting', 'value'],
|
|
2332
|
-
},
|
|
2333
|
-
},
|
|
2334
|
-
{
|
|
2335
|
-
name: 'add_autoload',
|
|
2336
|
-
description: 'Registers a script/scene as an autoload singleton. Use for global managers (GameManager, AudioManager, etc.). Loads automatically on game start.',
|
|
2337
|
-
inputSchema: {
|
|
2338
|
-
type: 'object',
|
|
2339
|
-
properties: {
|
|
2340
|
-
projectPath: {
|
|
2341
|
-
type: 'string',
|
|
2342
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2343
|
-
},
|
|
2344
|
-
name: {
|
|
2345
|
-
type: 'string',
|
|
2346
|
-
description: 'Singleton name for global access (e.g., "GameManager", "EventBus")',
|
|
2347
|
-
},
|
|
2348
|
-
path: {
|
|
2349
|
-
type: 'string',
|
|
2350
|
-
description: 'Path to .gd or .tscn file (e.g., "autoload/game_manager.gd")',
|
|
2351
|
-
},
|
|
2352
|
-
enabled: {
|
|
2353
|
-
type: 'boolean',
|
|
2354
|
-
description: 'If true (default), autoload is active. Set false to temporarily disable.',
|
|
2355
|
-
},
|
|
2356
|
-
},
|
|
2357
|
-
required: ['projectPath', 'name', 'path'],
|
|
2358
|
-
},
|
|
2359
|
-
},
|
|
2360
|
-
{
|
|
2361
|
-
name: 'remove_autoload',
|
|
2362
|
-
description: 'Unregisters an autoload singleton. Use to remove global managers no longer needed.',
|
|
2363
|
-
inputSchema: {
|
|
2364
|
-
type: 'object',
|
|
2365
|
-
properties: {
|
|
2366
|
-
projectPath: {
|
|
2367
|
-
type: 'string',
|
|
2368
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2369
|
-
},
|
|
2370
|
-
name: {
|
|
2371
|
-
type: 'string',
|
|
2372
|
-
description: 'Singleton name to remove (e.g., "GameManager")',
|
|
2373
|
-
},
|
|
2374
|
-
},
|
|
2375
|
-
required: ['projectPath', 'name'],
|
|
2376
|
-
},
|
|
2377
|
-
},
|
|
2378
|
-
{
|
|
2379
|
-
name: 'list_autoloads',
|
|
2380
|
-
description: 'Lists all registered autoload singletons in the project. Shows name, path, and enabled status.',
|
|
2381
|
-
inputSchema: {
|
|
2382
|
-
type: 'object',
|
|
2383
|
-
properties: {
|
|
2384
|
-
projectPath: {
|
|
2385
|
-
type: 'string',
|
|
2386
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2387
|
-
},
|
|
2388
|
-
},
|
|
2389
|
-
required: ['projectPath'],
|
|
2390
|
-
},
|
|
2391
|
-
},
|
|
2392
|
-
{
|
|
2393
|
-
name: 'set_main_scene',
|
|
2394
|
-
description: 'Sets which scene loads first when the game starts. Updates application/run/main_scene in project.godot.',
|
|
2395
|
-
inputSchema: {
|
|
2396
|
-
type: 'object',
|
|
2397
|
-
properties: {
|
|
2398
|
-
projectPath: {
|
|
2399
|
-
type: 'string',
|
|
2400
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2401
|
-
},
|
|
2402
|
-
scenePath: {
|
|
2403
|
-
type: 'string',
|
|
2404
|
-
description: 'Path to main scene (e.g., "scenes/main_menu.tscn", "scenes/game.tscn")',
|
|
2405
|
-
},
|
|
2406
|
-
},
|
|
2407
|
-
required: ['projectPath', 'scenePath'],
|
|
2408
|
-
},
|
|
2409
|
-
},
|
|
2410
|
-
// ============================================
|
|
2411
|
-
// Signal Management Tools
|
|
2412
|
-
// ============================================
|
|
2413
|
-
{
|
|
2414
|
-
name: 'connect_signal',
|
|
2415
|
-
description: 'Creates a signal connection between nodes in a scene. Prerequisite: source and target nodes must exist. Use to wire up button clicks, collision events, custom signals. Saved to scene file.',
|
|
2416
|
-
inputSchema: {
|
|
2417
|
-
type: 'object',
|
|
2418
|
-
properties: {
|
|
2419
|
-
projectPath: {
|
|
2420
|
-
type: 'string',
|
|
2421
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2422
|
-
},
|
|
2423
|
-
scenePath: {
|
|
2424
|
-
type: 'string',
|
|
2425
|
-
description: 'Path to .tscn file (e.g., "scenes/ui/menu.tscn")',
|
|
2426
|
-
},
|
|
2427
|
-
sourceNodePath: {
|
|
2428
|
-
type: 'string',
|
|
2429
|
-
description: 'Emitting node path (e.g., "StartButton", "Player/Area2D")',
|
|
2430
|
-
},
|
|
2431
|
-
signalName: {
|
|
2432
|
-
type: 'string',
|
|
2433
|
-
description: 'Signal name (e.g., "pressed", "body_entered", "health_changed")',
|
|
2434
|
-
},
|
|
2435
|
-
targetNodePath: {
|
|
2436
|
-
type: 'string',
|
|
2437
|
-
description: 'Receiving node path (e.g., ".", "Player", "../GameManager")',
|
|
2438
|
-
},
|
|
2439
|
-
methodName: {
|
|
2440
|
-
type: 'string',
|
|
2441
|
-
description: 'Method to call on target (e.g., "_on_start_pressed", "take_damage")',
|
|
2442
|
-
},
|
|
2443
|
-
flags: {
|
|
2444
|
-
type: 'number',
|
|
2445
|
-
description: 'Optional: connection flags (0=default, 1=deferred, 2=persist, 4=one_shot)',
|
|
2446
|
-
},
|
|
2447
|
-
},
|
|
2448
|
-
required: ['projectPath', 'scenePath', 'sourceNodePath', 'signalName', 'targetNodePath', 'methodName'],
|
|
2449
|
-
},
|
|
2450
|
-
},
|
|
2451
|
-
{
|
|
2452
|
-
name: 'disconnect_signal',
|
|
2453
|
-
description: 'Removes a signal connection from a scene. Use to clean up unused connections or rewire logic.',
|
|
2454
|
-
inputSchema: {
|
|
2455
|
-
type: 'object',
|
|
2456
|
-
properties: {
|
|
2457
|
-
projectPath: {
|
|
2458
|
-
type: 'string',
|
|
2459
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2460
|
-
},
|
|
2461
|
-
scenePath: {
|
|
2462
|
-
type: 'string',
|
|
2463
|
-
description: 'Path to .tscn file (e.g., "scenes/ui/menu.tscn")',
|
|
2464
|
-
},
|
|
2465
|
-
sourceNodePath: {
|
|
2466
|
-
type: 'string',
|
|
2467
|
-
description: 'Emitting node path (e.g., "StartButton")',
|
|
2468
|
-
},
|
|
2469
|
-
signalName: {
|
|
2470
|
-
type: 'string',
|
|
2471
|
-
description: 'Signal name (e.g., "pressed")',
|
|
2472
|
-
},
|
|
2473
|
-
targetNodePath: {
|
|
2474
|
-
type: 'string',
|
|
2475
|
-
description: 'Receiving node path (e.g., ".")',
|
|
2476
|
-
},
|
|
2477
|
-
methodName: {
|
|
2478
|
-
type: 'string',
|
|
2479
|
-
description: 'Connected method name (e.g., "_on_start_pressed")',
|
|
2480
|
-
},
|
|
2481
|
-
},
|
|
2482
|
-
required: ['projectPath', 'scenePath', 'sourceNodePath', 'signalName', 'targetNodePath', 'methodName'],
|
|
2483
|
-
},
|
|
2484
|
-
},
|
|
2485
|
-
{
|
|
2486
|
-
name: 'list_connections',
|
|
2487
|
-
description: 'Lists all signal connections in a scene. Use to understand event flow or debug connection issues.',
|
|
2488
|
-
inputSchema: {
|
|
2489
|
-
type: 'object',
|
|
2490
|
-
properties: {
|
|
2491
|
-
projectPath: {
|
|
2492
|
-
type: 'string',
|
|
2493
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2494
|
-
},
|
|
2495
|
-
scenePath: {
|
|
2496
|
-
type: 'string',
|
|
2497
|
-
description: 'Path to .tscn file (e.g., "scenes/player.tscn")',
|
|
2498
|
-
},
|
|
2499
|
-
nodePath: {
|
|
2500
|
-
type: 'string',
|
|
2501
|
-
description: 'Optional: filter to connections involving this node. If omitted, shows all.',
|
|
2502
|
-
},
|
|
2503
|
-
},
|
|
2504
|
-
required: ['projectPath', 'scenePath'],
|
|
2505
|
-
},
|
|
2506
|
-
},
|
|
2507
|
-
// ============================================
|
|
2508
|
-
// Phase 4: Runtime Connection Tools
|
|
2509
|
-
// ============================================
|
|
2510
|
-
{
|
|
2511
|
-
name: 'get_runtime_status',
|
|
2512
|
-
description: 'Checks if a Godot game instance is running and connected for live debugging. Use before other runtime tools.',
|
|
2513
|
-
inputSchema: {
|
|
2514
|
-
type: 'object',
|
|
2515
|
-
properties: {
|
|
2516
|
-
projectPath: {
|
|
2517
|
-
type: 'string',
|
|
2518
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2519
|
-
},
|
|
2520
|
-
},
|
|
2521
|
-
required: ['projectPath'],
|
|
2522
|
-
},
|
|
2523
|
-
},
|
|
2524
|
-
{
|
|
2525
|
-
name: 'inspect_runtime_tree',
|
|
2526
|
-
description: 'Inspect the scene tree of a running Godot instance',
|
|
2527
|
-
inputSchema: {
|
|
2528
|
-
type: 'object',
|
|
2529
|
-
properties: {
|
|
2530
|
-
projectPath: {
|
|
2531
|
-
type: 'string',
|
|
2532
|
-
description: 'Path to the Godot project directory',
|
|
2533
|
-
},
|
|
2534
|
-
nodePath: {
|
|
2535
|
-
type: 'string',
|
|
2536
|
-
description: 'Path to start inspection from (default: root)',
|
|
2537
|
-
},
|
|
2538
|
-
depth: {
|
|
2539
|
-
type: 'number',
|
|
2540
|
-
description: 'Maximum depth to inspect (default: 3)',
|
|
2541
|
-
},
|
|
2542
|
-
},
|
|
2543
|
-
required: ['projectPath'],
|
|
2544
|
-
},
|
|
2545
|
-
},
|
|
2546
|
-
{
|
|
2547
|
-
name: 'set_runtime_property',
|
|
2548
|
-
description: 'Set a property on a node in a running Godot instance',
|
|
2549
|
-
inputSchema: {
|
|
2550
|
-
type: 'object',
|
|
2551
|
-
properties: {
|
|
2552
|
-
projectPath: {
|
|
2553
|
-
type: 'string',
|
|
2554
|
-
description: 'Path to the Godot project directory',
|
|
2555
|
-
},
|
|
2556
|
-
nodePath: {
|
|
2557
|
-
type: 'string',
|
|
2558
|
-
description: 'Path to the target node',
|
|
2559
|
-
},
|
|
2560
|
-
property: {
|
|
2561
|
-
type: 'string',
|
|
2562
|
-
description: 'Property name to set',
|
|
2563
|
-
},
|
|
2564
|
-
value: {
|
|
2565
|
-
type: 'string',
|
|
2566
|
-
description: 'Value to set (Godot handles type conversion)',
|
|
2567
|
-
},
|
|
2568
|
-
},
|
|
2569
|
-
required: ['projectPath', 'nodePath', 'property', 'value'],
|
|
2570
|
-
},
|
|
2571
|
-
},
|
|
2572
|
-
{
|
|
2573
|
-
name: 'call_runtime_method',
|
|
2574
|
-
description: 'Call a method on a node in a running Godot instance',
|
|
2575
|
-
inputSchema: {
|
|
2576
|
-
type: 'object',
|
|
2577
|
-
properties: {
|
|
2578
|
-
projectPath: {
|
|
2579
|
-
type: 'string',
|
|
2580
|
-
description: 'Path to the Godot project directory',
|
|
2581
|
-
},
|
|
2582
|
-
nodePath: {
|
|
2583
|
-
type: 'string',
|
|
2584
|
-
description: 'Path to the target node',
|
|
2585
|
-
},
|
|
2586
|
-
method: {
|
|
2587
|
-
type: 'string',
|
|
2588
|
-
description: 'Method name to call',
|
|
2589
|
-
},
|
|
2590
|
-
args: {
|
|
2591
|
-
type: 'array',
|
|
2592
|
-
items: { type: 'string' },
|
|
2593
|
-
description: 'Arguments to pass to the method (as JSON strings)',
|
|
2594
|
-
},
|
|
2595
|
-
},
|
|
2596
|
-
required: ['projectPath', 'nodePath', 'method'],
|
|
2597
|
-
},
|
|
2598
|
-
},
|
|
2599
|
-
{
|
|
2600
|
-
name: 'get_runtime_metrics',
|
|
2601
|
-
description: 'Get performance metrics from a running Godot instance',
|
|
2602
|
-
inputSchema: {
|
|
2603
|
-
type: 'object',
|
|
2604
|
-
properties: {
|
|
2605
|
-
projectPath: {
|
|
2606
|
-
type: 'string',
|
|
2607
|
-
description: 'Path to the Godot project directory',
|
|
2608
|
-
},
|
|
2609
|
-
metrics: {
|
|
2610
|
-
type: 'array',
|
|
2611
|
-
items: { type: 'string' },
|
|
2612
|
-
description: 'Specific metrics to retrieve (default: all)',
|
|
2613
|
-
},
|
|
2614
|
-
},
|
|
2615
|
-
required: ['projectPath'],
|
|
2616
|
-
},
|
|
2617
|
-
},
|
|
2618
|
-
// ============================================
|
|
2619
|
-
// Resource Creation Tools
|
|
2620
|
-
// ============================================
|
|
2621
|
-
{
|
|
2622
|
-
name: 'create_resource',
|
|
2623
|
-
description: 'Creates ANY resource type as a .tres file. This is the universal resource creation tool — replaces all specialized create_* resource tools (PhysicsMaterial, Environment, Theme, etc.). Supports ALL ClassDB resource types. Set any property via the properties parameter with type conversion support. Use query_classes with category "resource" to discover available resource types. Use query_class_info to discover available properties.',
|
|
2624
|
-
inputSchema: {
|
|
2625
|
-
type: 'object',
|
|
2626
|
-
properties: {
|
|
2627
|
-
projectPath: {
|
|
2628
|
-
type: 'string',
|
|
2629
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2630
|
-
},
|
|
2631
|
-
resourcePath: {
|
|
2632
|
-
type: 'string',
|
|
2633
|
-
description: 'Path for new .tres file relative to project (e.g., "resources/items/sword.tres")',
|
|
2634
|
-
},
|
|
2635
|
-
resourceType: {
|
|
2636
|
-
type: 'string',
|
|
2637
|
-
description: 'Resource class name (e.g., "Resource", "CurveTexture", "GradientTexture2D")',
|
|
2638
|
-
},
|
|
2639
|
-
properties: {
|
|
2640
|
-
type: 'string',
|
|
2641
|
-
description: 'Optional: JSON object of properties to set (e.g., {"value": 100})',
|
|
2642
|
-
},
|
|
2643
|
-
script: {
|
|
2644
|
-
type: 'string',
|
|
2645
|
-
description: 'Optional: path to custom Resource script (e.g., "scripts/resources/item_data.gd")',
|
|
2646
|
-
},
|
|
2647
|
-
},
|
|
2648
|
-
required: ['projectPath', 'resourcePath', 'resourceType'],
|
|
2649
|
-
},
|
|
2650
|
-
},
|
|
2651
|
-
{
|
|
2652
|
-
name: 'create_material',
|
|
2653
|
-
description: 'Creates a material resource for 3D/2D rendering. Types: StandardMaterial3D (PBR), ShaderMaterial (custom), CanvasItemMaterial (2D), ParticleProcessMaterial (particles).',
|
|
2654
|
-
inputSchema: {
|
|
2655
|
-
type: 'object',
|
|
2656
|
-
properties: {
|
|
2657
|
-
projectPath: {
|
|
2658
|
-
type: 'string',
|
|
2659
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2660
|
-
},
|
|
2661
|
-
materialPath: {
|
|
2662
|
-
type: 'string',
|
|
2663
|
-
description: 'Path for new material file relative to project (e.g., "materials/player.tres")',
|
|
2664
|
-
},
|
|
2665
|
-
materialType: {
|
|
2666
|
-
type: 'string',
|
|
2667
|
-
enum: ['StandardMaterial3D', 'ShaderMaterial', 'CanvasItemMaterial', 'ParticleProcessMaterial'],
|
|
2668
|
-
description: 'Material type: StandardMaterial3D (3D PBR), ShaderMaterial (custom shader), CanvasItemMaterial (2D), ParticleProcessMaterial (particles)',
|
|
2669
|
-
},
|
|
2670
|
-
properties: {
|
|
2671
|
-
type: 'string',
|
|
2672
|
-
description: 'Optional: JSON object of properties (e.g., {"albedo_color": [1, 0, 0, 1], "metallic": 0.8})',
|
|
2673
|
-
},
|
|
2674
|
-
shader: {
|
|
2675
|
-
type: 'string',
|
|
2676
|
-
description: 'Optional for ShaderMaterial: path to .gdshader file (e.g., "shaders/outline.gdshader")',
|
|
2677
|
-
},
|
|
2678
|
-
},
|
|
2679
|
-
required: ['projectPath', 'materialPath', 'materialType'],
|
|
2680
|
-
},
|
|
2681
|
-
},
|
|
2682
|
-
{
|
|
2683
|
-
name: 'create_shader',
|
|
2684
|
-
description: 'Creates a shader file (.gdshader) with optional templates. Types: canvas_item (2D), spatial (3D), particles, sky, fog. Templates: basic, color_shift, outline.',
|
|
2685
|
-
inputSchema: {
|
|
2686
|
-
type: 'object',
|
|
2687
|
-
properties: {
|
|
2688
|
-
projectPath: {
|
|
2689
|
-
type: 'string',
|
|
2690
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2691
|
-
},
|
|
2692
|
-
shaderPath: {
|
|
2693
|
-
type: 'string',
|
|
2694
|
-
description: 'Path for new .gdshader file relative to project (e.g., "shaders/outline.gdshader")',
|
|
2695
|
-
},
|
|
2696
|
-
shaderType: {
|
|
2697
|
-
type: 'string',
|
|
2698
|
-
enum: ['canvas_item', 'spatial', 'particles', 'sky', 'fog'],
|
|
2699
|
-
description: 'Shader type: canvas_item (2D/UI), spatial (3D), particles, sky, fog',
|
|
2700
|
-
},
|
|
2701
|
-
code: {
|
|
2702
|
-
type: 'string',
|
|
2703
|
-
description: 'Optional: custom shader code. If omitted, uses template or generates basic shader.',
|
|
2704
|
-
},
|
|
2705
|
-
template: {
|
|
2706
|
-
type: 'string',
|
|
2707
|
-
description: 'Optional: predefined template - "basic", "color_shift", "outline"',
|
|
2708
|
-
},
|
|
2709
|
-
},
|
|
2710
|
-
required: ['projectPath', 'shaderPath', 'shaderType'],
|
|
2711
|
-
},
|
|
2712
|
-
},
|
|
2713
|
-
// ============================================
|
|
2714
|
-
// GDScript File Operations
|
|
2715
|
-
// ============================================
|
|
2716
|
-
{
|
|
2717
|
-
name: 'create_script',
|
|
2718
|
-
description: 'Creates a new GDScript (.gd) file with optional templates. Use to generate scripts for game logic. Templates: "singleton" (autoload), "state_machine" (FSM), "component" (modular), "resource" (custom Resource).',
|
|
2719
|
-
inputSchema: {
|
|
2720
|
-
type: 'object',
|
|
2721
|
-
properties: {
|
|
2722
|
-
projectPath: {
|
|
2723
|
-
type: 'string',
|
|
2724
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2725
|
-
},
|
|
2726
|
-
scriptPath: {
|
|
2727
|
-
type: 'string',
|
|
2728
|
-
description: 'Path for new script relative to project (e.g., "scripts/player.gd", "autoload/game_manager.gd")',
|
|
2729
|
-
},
|
|
2730
|
-
className: {
|
|
2731
|
-
type: 'string',
|
|
2732
|
-
description: 'Optional: class_name for global access (e.g., "Player", "GameManager")',
|
|
2733
|
-
},
|
|
2734
|
-
extends: {
|
|
2735
|
-
type: 'string',
|
|
2736
|
-
description: 'Base class to extend (e.g., "Node", "CharacterBody2D", "Resource"). Default: "Node"',
|
|
2737
|
-
},
|
|
2738
|
-
content: {
|
|
2739
|
-
type: 'string',
|
|
2740
|
-
description: 'Optional: initial script content to add after class declaration',
|
|
2741
|
-
},
|
|
2742
|
-
template: {
|
|
2743
|
-
type: 'string',
|
|
2744
|
-
description: 'Optional: template name - "singleton", "state_machine", "component", "resource"',
|
|
2745
|
-
},
|
|
2746
|
-
reason: {
|
|
2747
|
-
type: 'string',
|
|
2748
|
-
description: 'Optional reason/context for this change. Displayed in visualizer audit timeline.',
|
|
2749
|
-
},
|
|
2750
|
-
},
|
|
2751
|
-
required: ['projectPath', 'scriptPath'],
|
|
2752
|
-
},
|
|
2753
|
-
},
|
|
2754
|
-
{
|
|
2755
|
-
name: 'modify_script',
|
|
2756
|
-
description: 'Adds functions, variables, or signals to an existing GDScript. Use to extend scripts without manual editing. Supports @export, @onready annotations and type hints.',
|
|
2757
|
-
inputSchema: {
|
|
2758
|
-
type: 'object',
|
|
2759
|
-
properties: {
|
|
2760
|
-
projectPath: {
|
|
2761
|
-
type: 'string',
|
|
2762
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2763
|
-
},
|
|
2764
|
-
scriptPath: {
|
|
2765
|
-
type: 'string',
|
|
2766
|
-
description: 'Path to existing .gd file relative to project (e.g., "scripts/player.gd")',
|
|
2767
|
-
},
|
|
2768
|
-
modifications: {
|
|
2769
|
-
type: 'array',
|
|
2770
|
-
description: 'Array of modifications to apply',
|
|
2771
|
-
items: {
|
|
2772
|
-
type: 'object',
|
|
2773
|
-
properties: {
|
|
2774
|
-
type: {
|
|
2775
|
-
type: 'string',
|
|
2776
|
-
description: 'Modification type: "add_function", "add_variable", or "add_signal"',
|
|
2777
|
-
},
|
|
2778
|
-
name: {
|
|
2779
|
-
type: 'string',
|
|
2780
|
-
description: 'Name of the function, variable, or signal',
|
|
2781
|
-
},
|
|
2782
|
-
params: {
|
|
2783
|
-
type: 'string',
|
|
2784
|
-
description: 'For functions/signals: parameter string (e.g., "delta: float, input: Vector2")',
|
|
2785
|
-
},
|
|
2786
|
-
returnType: {
|
|
2787
|
-
type: 'string',
|
|
2788
|
-
description: 'For functions: return type (e.g., "void", "bool", "Vector2")',
|
|
2789
|
-
},
|
|
2790
|
-
body: {
|
|
2791
|
-
type: 'string',
|
|
2792
|
-
description: 'For functions: function body code',
|
|
2793
|
-
},
|
|
2794
|
-
varType: {
|
|
2795
|
-
type: 'string',
|
|
2796
|
-
description: 'For variables: type annotation',
|
|
2797
|
-
},
|
|
2798
|
-
defaultValue: {
|
|
2799
|
-
type: 'string',
|
|
2800
|
-
description: 'For variables: default value',
|
|
2801
|
-
},
|
|
2802
|
-
isExport: {
|
|
2803
|
-
type: 'boolean',
|
|
2804
|
-
description: 'For variables: whether to add @export annotation',
|
|
2805
|
-
},
|
|
2806
|
-
exportHint: {
|
|
2807
|
-
type: 'string',
|
|
2808
|
-
description: 'For variables: export hint (e.g., "range(0, 100)")',
|
|
2809
|
-
},
|
|
2810
|
-
isOnready: {
|
|
2811
|
-
type: 'boolean',
|
|
2812
|
-
description: 'For variables: whether to add @onready annotation',
|
|
2813
|
-
},
|
|
2814
|
-
position: {
|
|
2815
|
-
type: 'string',
|
|
2816
|
-
description: 'For functions: where to insert ("end", "after_ready", "after_init")',
|
|
2817
|
-
},
|
|
2818
|
-
},
|
|
2819
|
-
required: ['type', 'name'],
|
|
2820
|
-
},
|
|
2821
|
-
},
|
|
2822
|
-
reason: {
|
|
2823
|
-
type: 'string',
|
|
2824
|
-
description: 'Optional reason/context for this change. Displayed in visualizer audit timeline.',
|
|
2825
|
-
},
|
|
2826
|
-
},
|
|
2827
|
-
required: ['projectPath', 'scriptPath', 'modifications'],
|
|
2828
|
-
},
|
|
2829
|
-
},
|
|
2830
|
-
{
|
|
2831
|
-
name: 'get_script_info',
|
|
2832
|
-
description: 'Analyzes a GDScript and returns its structure: functions, variables, signals, class_name, extends. Use before modify_script to understand existing code.',
|
|
2833
|
-
inputSchema: {
|
|
2834
|
-
type: 'object',
|
|
2835
|
-
properties: {
|
|
2836
|
-
projectPath: {
|
|
2837
|
-
type: 'string',
|
|
2838
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2839
|
-
},
|
|
2840
|
-
scriptPath: {
|
|
2841
|
-
type: 'string',
|
|
2842
|
-
description: 'Path to .gd file relative to project (e.g., "scripts/player.gd")',
|
|
2843
|
-
},
|
|
2844
|
-
includeInherited: {
|
|
2845
|
-
type: 'boolean',
|
|
2846
|
-
description: 'If true, includes members from parent classes. Default: false (only script-defined members).',
|
|
2847
|
-
},
|
|
2848
|
-
},
|
|
2849
|
-
required: ['projectPath', 'scriptPath'],
|
|
2850
|
-
},
|
|
2851
|
-
},
|
|
2852
|
-
// ============================================
|
|
2853
|
-
// Animation Tools
|
|
2854
|
-
// ============================================
|
|
2855
|
-
{
|
|
2856
|
-
name: 'create_animation',
|
|
2857
|
-
description: 'Creates a new animation in an AnimationPlayer. Prerequisite: AnimationPlayer node must exist in scene (use add_node first). Use to set up character animations, UI transitions, or cutscenes. Supports loop modes: none, linear, pingpong.',
|
|
2858
|
-
inputSchema: {
|
|
2859
|
-
type: 'object',
|
|
2860
|
-
properties: {
|
|
2861
|
-
projectPath: {
|
|
2862
|
-
type: 'string',
|
|
2863
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2864
|
-
},
|
|
2865
|
-
scenePath: {
|
|
2866
|
-
type: 'string',
|
|
2867
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Player.tscn")',
|
|
2868
|
-
},
|
|
2869
|
-
playerNodePath: {
|
|
2870
|
-
type: 'string',
|
|
2871
|
-
description: 'Path to AnimationPlayer node in scene (e.g., ".", "Player/AnimationPlayer")',
|
|
2872
|
-
},
|
|
2873
|
-
animationName: {
|
|
2874
|
-
type: 'string',
|
|
2875
|
-
description: 'Name for new animation (e.g., "walk", "idle", "attack")',
|
|
2876
|
-
},
|
|
2877
|
-
length: {
|
|
2878
|
-
type: 'number',
|
|
2879
|
-
description: 'Duration of the animation in seconds (default: 1.0)',
|
|
2880
|
-
},
|
|
2881
|
-
loopMode: {
|
|
2882
|
-
type: 'string',
|
|
2883
|
-
enum: ['none', 'linear', 'pingpong'],
|
|
2884
|
-
description: 'Loop mode for the animation (default: "none")',
|
|
2885
|
-
},
|
|
2886
|
-
step: {
|
|
2887
|
-
type: 'number',
|
|
2888
|
-
description: 'Keyframe snap step in seconds (default: 0.1)',
|
|
2889
|
-
},
|
|
2890
|
-
},
|
|
2891
|
-
required: ['projectPath', 'scenePath', 'playerNodePath', 'animationName'],
|
|
2892
|
-
},
|
|
2893
|
-
},
|
|
2894
|
-
{
|
|
2895
|
-
name: 'add_animation_track',
|
|
2896
|
-
description: 'Adds a property or method track to an animation. Prerequisite: animation must exist (use create_animation first). Use to animate position, rotation, color, or call methods at specific times. Keyframes define values over time.',
|
|
2897
|
-
inputSchema: {
|
|
2898
|
-
type: 'object',
|
|
2899
|
-
properties: {
|
|
2900
|
-
projectPath: {
|
|
2901
|
-
type: 'string',
|
|
2902
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2903
|
-
},
|
|
2904
|
-
scenePath: {
|
|
2905
|
-
type: 'string',
|
|
2906
|
-
description: 'Path to .tscn file relative to project (e.g., "scenes/Player.tscn")',
|
|
2907
|
-
},
|
|
2908
|
-
playerNodePath: {
|
|
2909
|
-
type: 'string',
|
|
2910
|
-
description: 'Path to AnimationPlayer node in scene (e.g., ".", "Player/AnimationPlayer")',
|
|
2911
|
-
},
|
|
2912
|
-
animationName: {
|
|
2913
|
-
type: 'string',
|
|
2914
|
-
description: 'Name of existing animation to add track to (e.g., "walk", "idle")',
|
|
2915
|
-
},
|
|
2916
|
-
track: {
|
|
2917
|
-
type: 'object',
|
|
2918
|
-
description: 'Track configuration',
|
|
2919
|
-
properties: {
|
|
2920
|
-
type: {
|
|
2921
|
-
type: 'string',
|
|
2922
|
-
enum: ['property', 'method'],
|
|
2923
|
-
description: 'Type of track to add',
|
|
2924
|
-
},
|
|
2925
|
-
nodePath: {
|
|
2926
|
-
type: 'string',
|
|
2927
|
-
description: 'Path to the target node relative to AnimationPlayer\'s root (e.g., "Sprite2D")',
|
|
2928
|
-
},
|
|
2929
|
-
property: {
|
|
2930
|
-
type: 'string',
|
|
2931
|
-
description: 'Property name to animate (for property tracks, e.g., "position", "modulate")',
|
|
2932
|
-
},
|
|
2933
|
-
method: {
|
|
2934
|
-
type: 'string',
|
|
2935
|
-
description: 'Method name to call (for method tracks)',
|
|
2936
|
-
},
|
|
2937
|
-
keyframes: {
|
|
2938
|
-
type: 'array',
|
|
2939
|
-
description: 'Array of keyframes',
|
|
2940
|
-
items: {
|
|
2941
|
-
type: 'object',
|
|
2942
|
-
properties: {
|
|
2943
|
-
time: {
|
|
2944
|
-
type: 'number',
|
|
2945
|
-
description: 'Time position in seconds',
|
|
2946
|
-
},
|
|
2947
|
-
value: {
|
|
2948
|
-
type: 'string',
|
|
2949
|
-
description: 'Value at this keyframe (for property tracks)',
|
|
2950
|
-
},
|
|
2951
|
-
args: {
|
|
2952
|
-
type: 'array',
|
|
2953
|
-
items: { type: 'string' },
|
|
2954
|
-
description: 'Arguments to pass to the method (for method tracks, as JSON strings)',
|
|
2955
|
-
},
|
|
2956
|
-
},
|
|
2957
|
-
required: ['time'],
|
|
2958
|
-
},
|
|
2959
|
-
},
|
|
2960
|
-
},
|
|
2961
|
-
required: ['type', 'nodePath', 'keyframes'],
|
|
2962
|
-
},
|
|
2963
|
-
},
|
|
2964
|
-
required: ['projectPath', 'scenePath', 'playerNodePath', 'animationName', 'track'],
|
|
2965
|
-
},
|
|
2966
|
-
},
|
|
2967
|
-
// ============================================
|
|
2968
|
-
// Plugin Management Tools
|
|
2969
|
-
// ============================================
|
|
2970
|
-
{
|
|
2971
|
-
name: 'list_plugins',
|
|
2972
|
-
description: 'Lists all plugins in addons/ folder with enabled/disabled status. Use before enable_plugin or disable_plugin to see available plugins.',
|
|
2973
|
-
inputSchema: {
|
|
2974
|
-
type: 'object',
|
|
2975
|
-
properties: {
|
|
2976
|
-
projectPath: {
|
|
2977
|
-
type: 'string',
|
|
2978
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2979
|
-
},
|
|
2980
|
-
},
|
|
2981
|
-
required: ['projectPath'],
|
|
2982
|
-
},
|
|
2983
|
-
},
|
|
2984
|
-
{
|
|
2985
|
-
name: 'enable_plugin',
|
|
2986
|
-
description: 'Enables a plugin from addons/ folder. Updates project.godot automatically. Use list_plugins first to see available plugins.',
|
|
2987
|
-
inputSchema: {
|
|
2988
|
-
type: 'object',
|
|
2989
|
-
properties: {
|
|
2990
|
-
projectPath: {
|
|
2991
|
-
type: 'string',
|
|
2992
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
2993
|
-
},
|
|
2994
|
-
pluginName: {
|
|
2995
|
-
type: 'string',
|
|
2996
|
-
description: 'Plugin folder name in addons/ (e.g., "dialogue_manager", "scatter")',
|
|
2997
|
-
},
|
|
2998
|
-
},
|
|
2999
|
-
required: ['projectPath', 'pluginName'],
|
|
3000
|
-
},
|
|
3001
|
-
},
|
|
3002
|
-
{
|
|
3003
|
-
name: 'disable_plugin',
|
|
3004
|
-
description: 'Disables a plugin in the project. Updates project.godot automatically. Plugin files remain in addons/ folder.',
|
|
3005
|
-
inputSchema: {
|
|
3006
|
-
type: 'object',
|
|
3007
|
-
properties: {
|
|
3008
|
-
projectPath: {
|
|
3009
|
-
type: 'string',
|
|
3010
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
3011
|
-
},
|
|
3012
|
-
pluginName: {
|
|
3013
|
-
type: 'string',
|
|
3014
|
-
description: 'Plugin folder name in addons/ (e.g., "dialogue_manager", "scatter")',
|
|
3015
|
-
},
|
|
3016
|
-
},
|
|
3017
|
-
required: ['projectPath', 'pluginName'],
|
|
3018
|
-
},
|
|
3019
|
-
},
|
|
3020
|
-
// ============================================
|
|
3021
|
-
// Input Action Tools
|
|
3022
|
-
// ============================================
|
|
3023
|
-
{
|
|
3024
|
-
name: 'add_input_action',
|
|
3025
|
-
description: 'Registers a new input action in project.godot InputMap. Use to set up keyboard, mouse, or gamepad controls for player actions like jump, move, attack.',
|
|
3026
|
-
inputSchema: {
|
|
3027
|
-
type: 'object',
|
|
3028
|
-
properties: {
|
|
3029
|
-
projectPath: {
|
|
3030
|
-
type: 'string',
|
|
3031
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
3032
|
-
},
|
|
3033
|
-
actionName: {
|
|
3034
|
-
type: 'string',
|
|
3035
|
-
description: 'Action name used in code (e.g., "jump", "move_left", "attack")',
|
|
3036
|
-
},
|
|
3037
|
-
events: {
|
|
3038
|
-
type: 'array',
|
|
3039
|
-
description: 'Array of input events - each with type (key/mouse_button/joypad_button/joypad_axis) and binding details',
|
|
3040
|
-
items: {
|
|
3041
|
-
type: 'object',
|
|
3042
|
-
properties: {
|
|
3043
|
-
type: {
|
|
3044
|
-
type: 'string',
|
|
3045
|
-
enum: ['key', 'mouse_button', 'joypad_button', 'joypad_axis'],
|
|
3046
|
-
description: 'Input event type',
|
|
3047
|
-
},
|
|
3048
|
-
keycode: {
|
|
3049
|
-
type: 'string',
|
|
3050
|
-
description: 'For key: key name (e.g., "Space", "W", "Escape")',
|
|
3051
|
-
},
|
|
3052
|
-
button: {
|
|
3053
|
-
type: 'number',
|
|
3054
|
-
description: 'For mouse_button: 1=left, 2=right, 3=middle; For joypad: button number',
|
|
3055
|
-
},
|
|
3056
|
-
axis: {
|
|
3057
|
-
type: 'number',
|
|
3058
|
-
description: 'For joypad_axis: axis number (0-3)',
|
|
3059
|
-
},
|
|
3060
|
-
axisValue: {
|
|
3061
|
-
type: 'number',
|
|
3062
|
-
description: 'For joypad_axis: direction (-1 or 1)',
|
|
3063
|
-
},
|
|
3064
|
-
ctrl: {
|
|
3065
|
-
type: 'boolean',
|
|
3066
|
-
description: 'For key: require Ctrl modifier',
|
|
3067
|
-
},
|
|
3068
|
-
alt: {
|
|
3069
|
-
type: 'boolean',
|
|
3070
|
-
description: 'For key: require Alt modifier',
|
|
3071
|
-
},
|
|
3072
|
-
shift: {
|
|
3073
|
-
type: 'boolean',
|
|
3074
|
-
description: 'For key: require Shift modifier',
|
|
3075
|
-
},
|
|
3076
|
-
},
|
|
3077
|
-
required: ['type'],
|
|
3078
|
-
},
|
|
3079
|
-
},
|
|
3080
|
-
deadzone: {
|
|
3081
|
-
type: 'number',
|
|
3082
|
-
description: 'Analog stick deadzone (0-1). Default: 0.5',
|
|
3083
|
-
},
|
|
3084
|
-
},
|
|
3085
|
-
required: ['projectPath', 'actionName', 'events'],
|
|
3086
|
-
},
|
|
3087
|
-
},
|
|
3088
|
-
// ============================================
|
|
3089
|
-
// Project Search Tool
|
|
3090
|
-
// ============================================
|
|
3091
|
-
{
|
|
3092
|
-
name: 'search_project',
|
|
3093
|
-
description: 'Searches for text or regex patterns across project files. Use to find function usages, variable references, or TODOs. Returns file paths and line numbers.',
|
|
3094
|
-
inputSchema: {
|
|
3095
|
-
type: 'object',
|
|
3096
|
-
properties: {
|
|
3097
|
-
projectPath: {
|
|
3098
|
-
type: 'string',
|
|
3099
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
3100
|
-
},
|
|
3101
|
-
query: {
|
|
3102
|
-
type: 'string',
|
|
3103
|
-
description: 'Search text or regex pattern (e.g., "player", "TODO", "func.*damage")',
|
|
3104
|
-
},
|
|
3105
|
-
fileTypes: {
|
|
3106
|
-
type: 'array',
|
|
3107
|
-
items: { type: 'string' },
|
|
3108
|
-
description: 'File extensions to search. Default: ["gd", "tscn", "tres"]',
|
|
3109
|
-
},
|
|
3110
|
-
regex: {
|
|
3111
|
-
type: 'boolean',
|
|
3112
|
-
description: 'If true, treats query as regex. Default: false',
|
|
3113
|
-
},
|
|
3114
|
-
caseSensitive: {
|
|
3115
|
-
type: 'boolean',
|
|
3116
|
-
description: 'If true, case-sensitive search. Default: false',
|
|
3117
|
-
},
|
|
3118
|
-
maxResults: {
|
|
3119
|
-
type: 'number',
|
|
3120
|
-
description: 'Maximum results to return. Default: 100',
|
|
3121
|
-
},
|
|
3122
|
-
},
|
|
3123
|
-
required: ['projectPath', 'query'],
|
|
3124
|
-
},
|
|
3125
|
-
},
|
|
3126
|
-
// ============================================
|
|
3127
|
-
// 2D Tile Tools
|
|
3128
|
-
// ============================================
|
|
3129
|
-
{
|
|
3130
|
-
name: 'create_tileset',
|
|
3131
|
-
description: 'Creates a TileSet resource from texture atlases. Use for 2D tilemaps in platformers, RPGs, etc. Supports multiple atlas sources.',
|
|
3132
|
-
inputSchema: {
|
|
3133
|
-
type: 'object',
|
|
3134
|
-
properties: {
|
|
3135
|
-
projectPath: {
|
|
3136
|
-
type: 'string',
|
|
3137
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
3138
|
-
},
|
|
3139
|
-
tilesetPath: {
|
|
3140
|
-
type: 'string',
|
|
3141
|
-
description: 'Output path for TileSet (e.g., "resources/world_tiles.tres")',
|
|
3142
|
-
},
|
|
3143
|
-
sources: {
|
|
3144
|
-
type: 'array',
|
|
3145
|
-
description: 'Array of atlas sources, each with texture path and tileSize {x, y}',
|
|
3146
|
-
items: {
|
|
3147
|
-
type: 'object',
|
|
3148
|
-
properties: {
|
|
3149
|
-
texture: {
|
|
3150
|
-
type: 'string',
|
|
3151
|
-
description: 'Texture path relative to project (e.g., "sprites/tileset.png")',
|
|
3152
|
-
},
|
|
3153
|
-
tileSize: {
|
|
3154
|
-
type: 'object',
|
|
3155
|
-
description: 'Tile dimensions in pixels',
|
|
3156
|
-
properties: {
|
|
3157
|
-
x: { type: 'number', description: 'Tile width (e.g., 16, 32)' },
|
|
3158
|
-
y: { type: 'number', description: 'Tile height (e.g., 16, 32)' },
|
|
3159
|
-
},
|
|
3160
|
-
required: ['x', 'y'],
|
|
3161
|
-
},
|
|
3162
|
-
separation: {
|
|
3163
|
-
type: 'object',
|
|
3164
|
-
description: 'Optional: gap between tiles in source texture',
|
|
3165
|
-
properties: {
|
|
3166
|
-
x: { type: 'number', description: 'Horizontal gap' },
|
|
3167
|
-
y: { type: 'number', description: 'Vertical gap' },
|
|
3168
|
-
},
|
|
3169
|
-
},
|
|
3170
|
-
offset: {
|
|
3171
|
-
type: 'object',
|
|
3172
|
-
description: 'Optional: offset from texture origin',
|
|
3173
|
-
properties: {
|
|
3174
|
-
x: { type: 'number', description: 'Horizontal offset' },
|
|
3175
|
-
y: { type: 'number', description: 'Vertical offset' },
|
|
3176
|
-
},
|
|
3177
|
-
},
|
|
3178
|
-
},
|
|
3179
|
-
required: ['texture', 'tileSize'],
|
|
3180
|
-
},
|
|
3181
|
-
},
|
|
3182
|
-
},
|
|
3183
|
-
required: ['projectPath', 'tilesetPath', 'sources'],
|
|
3184
|
-
},
|
|
3185
|
-
},
|
|
3186
|
-
{
|
|
3187
|
-
name: 'set_tilemap_cells',
|
|
3188
|
-
description: 'Places tiles in a TileMap node. Use to programmatically generate levels or modify existing tilemaps.',
|
|
3189
|
-
inputSchema: {
|
|
3190
|
-
type: 'object',
|
|
3191
|
-
properties: {
|
|
3192
|
-
projectPath: {
|
|
3193
|
-
type: 'string',
|
|
3194
|
-
description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.',
|
|
3195
|
-
},
|
|
3196
|
-
scenePath: {
|
|
3197
|
-
type: 'string',
|
|
3198
|
-
description: 'Path to scene containing TileMap (e.g., "scenes/level1.tscn")',
|
|
3199
|
-
},
|
|
3200
|
-
tilemapNodePath: {
|
|
3201
|
-
type: 'string',
|
|
3202
|
-
description: 'Path to TileMap node (e.g., "World/TileMap")',
|
|
3203
|
-
},
|
|
3204
|
-
layer: {
|
|
3205
|
-
type: 'number',
|
|
3206
|
-
description: 'TileMap layer index. Default: 0',
|
|
3207
|
-
},
|
|
3208
|
-
cells: {
|
|
3209
|
-
type: 'array',
|
|
3210
|
-
description: 'Array of cells with coords {x,y}, sourceId, atlasCoords {x,y}',
|
|
3211
|
-
items: {
|
|
3212
|
-
type: 'object',
|
|
3213
|
-
properties: {
|
|
3214
|
-
coords: {
|
|
3215
|
-
type: 'object',
|
|
3216
|
-
description: 'Grid position in tilemap',
|
|
3217
|
-
properties: {
|
|
3218
|
-
x: { type: 'number', description: 'Grid X' },
|
|
3219
|
-
y: { type: 'number', description: 'Grid Y' },
|
|
3220
|
-
},
|
|
3221
|
-
required: ['x', 'y'],
|
|
3222
|
-
},
|
|
3223
|
-
sourceId: {
|
|
3224
|
-
type: 'number',
|
|
3225
|
-
description: 'TileSet source ID (0-indexed)',
|
|
3226
|
-
},
|
|
3227
|
-
atlasCoords: {
|
|
3228
|
-
type: 'object',
|
|
3229
|
-
description: 'Tile position in atlas',
|
|
3230
|
-
properties: {
|
|
3231
|
-
x: { type: 'number', description: 'Atlas X' },
|
|
3232
|
-
y: { type: 'number', description: 'Atlas Y' },
|
|
3233
|
-
},
|
|
3234
|
-
required: ['x', 'y'],
|
|
3235
|
-
},
|
|
3236
|
-
alternativeTile: {
|
|
3237
|
-
type: 'number',
|
|
3238
|
-
description: 'Optional: alternative tile variant. Default: 0',
|
|
3239
|
-
},
|
|
3240
|
-
},
|
|
3241
|
-
required: ['coords', 'sourceId', 'atlasCoords'],
|
|
3242
|
-
},
|
|
3243
|
-
},
|
|
3244
|
-
},
|
|
3245
|
-
required: ['projectPath', 'scenePath', 'tilemapNodePath', 'cells'],
|
|
3246
|
-
},
|
|
3247
|
-
},
|
|
3248
|
-
// ==================== AUDIO SYSTEM TOOLS ====================
|
|
3249
|
-
{
|
|
3250
|
-
name: 'create_audio_bus',
|
|
3251
|
-
description: 'Creates a new audio bus for mixing. Use to set up separate volume controls for music, SFX, voice, etc.',
|
|
3252
|
-
inputSchema: {
|
|
3253
|
-
type: 'object',
|
|
3254
|
-
properties: {
|
|
3255
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3256
|
-
busName: { type: 'string', description: 'Name for the audio bus (e.g., "Music", "SFX", "Voice")' },
|
|
3257
|
-
parentBusIndex: { type: 'number', description: 'Parent bus index. Default: 0 (Master)' },
|
|
3258
|
-
},
|
|
3259
|
-
required: ['projectPath', 'busName'],
|
|
3260
|
-
},
|
|
3261
|
-
},
|
|
3262
|
-
{
|
|
3263
|
-
name: 'get_audio_buses',
|
|
3264
|
-
description: 'Lists all audio buses and their configuration. Use to check current audio setup.',
|
|
3265
|
-
inputSchema: {
|
|
3266
|
-
type: 'object',
|
|
3267
|
-
properties: {
|
|
3268
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3269
|
-
},
|
|
3270
|
-
required: ['projectPath'],
|
|
3271
|
-
},
|
|
3272
|
-
},
|
|
3273
|
-
{
|
|
3274
|
-
name: 'set_audio_bus_effect',
|
|
3275
|
-
description: 'Adds or configures an audio effect on a bus. Use for reverb, delay, EQ, compression, etc.',
|
|
3276
|
-
inputSchema: {
|
|
3277
|
-
type: 'object',
|
|
3278
|
-
properties: {
|
|
3279
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3280
|
-
busIndex: { type: 'number', description: 'Bus index (0 = Master)' },
|
|
3281
|
-
effectIndex: { type: 'number', description: 'Effect slot index (0-7)' },
|
|
3282
|
-
effectType: { type: 'string', description: 'Effect type (e.g., "Reverb", "Delay", "Chorus", "Compressor")' },
|
|
3283
|
-
enabled: { type: 'boolean', description: 'Whether effect is active' },
|
|
3284
|
-
},
|
|
3285
|
-
required: ['projectPath', 'busIndex', 'effectIndex', 'effectType'],
|
|
3286
|
-
},
|
|
3287
|
-
},
|
|
3288
|
-
{
|
|
3289
|
-
name: 'set_audio_bus_volume',
|
|
3290
|
-
description: 'Sets volume for an audio bus in decibels. Use to balance audio levels.',
|
|
3291
|
-
inputSchema: {
|
|
3292
|
-
type: 'object',
|
|
3293
|
-
properties: {
|
|
3294
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3295
|
-
busIndex: { type: 'number', description: 'Bus index (0 = Master)' },
|
|
3296
|
-
volumeDb: { type: 'number', description: 'Volume in decibels (0 = unity, -80 = silent, +6 = boost)' },
|
|
3297
|
-
},
|
|
3298
|
-
required: ['projectPath', 'busIndex', 'volumeDb'],
|
|
3299
|
-
},
|
|
3300
|
-
},
|
|
3301
|
-
// ==================== NETWORKING TOOLS ====================
|
|
3302
|
-
// ==================== PHYSICS TOOLS ====================
|
|
3303
|
-
// ==================== NAVIGATION TOOLS ====================
|
|
3304
|
-
{
|
|
3305
|
-
name: 'create_navigation_region',
|
|
3306
|
-
description: 'Creates a NavigationRegion for pathfinding. Use to define walkable areas for AI navigation.',
|
|
3307
|
-
inputSchema: {
|
|
3308
|
-
type: 'object',
|
|
3309
|
-
properties: {
|
|
3310
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3311
|
-
scenePath: { type: 'string', description: 'Path to scene file' },
|
|
3312
|
-
parentPath: { type: 'string', description: 'Parent node path' },
|
|
3313
|
-
nodeName: { type: 'string', description: 'Node name (e.g., "WalkableArea")' },
|
|
3314
|
-
is3D: { type: 'boolean', description: 'If true, creates NavigationRegion3D. Default: false' },
|
|
3315
|
-
},
|
|
3316
|
-
required: ['projectPath', 'scenePath', 'parentPath', 'nodeName'],
|
|
3317
|
-
},
|
|
3318
|
-
},
|
|
3319
|
-
{
|
|
3320
|
-
name: 'create_navigation_agent',
|
|
3321
|
-
description: 'Creates a NavigationAgent for AI pathfinding. Use for enemies, NPCs that need to navigate around obstacles.',
|
|
3322
|
-
inputSchema: {
|
|
3323
|
-
type: 'object',
|
|
3324
|
-
properties: {
|
|
3325
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3326
|
-
scenePath: { type: 'string', description: 'Path to scene file' },
|
|
3327
|
-
parentPath: { type: 'string', description: 'Parent node path (usually the character)' },
|
|
3328
|
-
nodeName: { type: 'string', description: 'Node name (e.g., "NavAgent")' },
|
|
3329
|
-
is3D: { type: 'boolean', description: 'If true, creates NavigationAgent3D. Default: false' },
|
|
3330
|
-
pathDesiredDistance: { type: 'number', description: 'Distance to consider waypoint reached' },
|
|
3331
|
-
targetDesiredDistance: { type: 'number', description: 'Distance to consider target reached' },
|
|
3332
|
-
},
|
|
3333
|
-
required: ['projectPath', 'scenePath', 'parentPath', 'nodeName'],
|
|
3334
|
-
},
|
|
3335
|
-
},
|
|
3336
|
-
// ==================== RENDERING TOOLS ====================
|
|
3337
|
-
// ==================== ANIMATION TREE TOOLS ====================
|
|
3338
|
-
{
|
|
3339
|
-
name: 'create_animation_tree',
|
|
3340
|
-
description: 'Create an AnimationTree node linked to an AnimationPlayer',
|
|
3341
|
-
inputSchema: {
|
|
3342
|
-
type: 'object',
|
|
3343
|
-
properties: {
|
|
3344
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3345
|
-
scenePath: { type: 'string', description: 'Path to the scene file' },
|
|
3346
|
-
parentPath: { type: 'string', description: 'Parent node path' },
|
|
3347
|
-
nodeName: { type: 'string', description: 'Name for AnimationTree' },
|
|
3348
|
-
animPlayerPath: { type: 'string', description: 'Path to AnimationPlayer node (relative to parent)' },
|
|
3349
|
-
rootType: { type: 'string', enum: ['StateMachine', 'BlendTree', 'BlendSpace1D', 'BlendSpace2D'], description: 'Root node type' },
|
|
3350
|
-
},
|
|
3351
|
-
required: ['projectPath', 'scenePath', 'parentPath', 'nodeName', 'animPlayerPath'],
|
|
3352
|
-
},
|
|
3353
|
-
},
|
|
3354
|
-
{
|
|
3355
|
-
name: 'add_animation_state',
|
|
3356
|
-
description: 'Add a state to an AnimationTree state machine',
|
|
3357
|
-
inputSchema: {
|
|
3358
|
-
type: 'object',
|
|
3359
|
-
properties: {
|
|
3360
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3361
|
-
scenePath: { type: 'string', description: 'Path to the scene file' },
|
|
3362
|
-
animTreePath: { type: 'string', description: 'Path to AnimationTree node' },
|
|
3363
|
-
stateName: { type: 'string', description: 'Name for the state' },
|
|
3364
|
-
animationName: { type: 'string', description: 'Animation to play in this state' },
|
|
3365
|
-
stateMachinePath: { type: 'string', description: 'Path within tree to state machine (default: root)' },
|
|
3366
|
-
},
|
|
3367
|
-
required: ['projectPath', 'scenePath', 'animTreePath', 'stateName', 'animationName'],
|
|
3368
|
-
},
|
|
3369
|
-
},
|
|
3370
|
-
{
|
|
3371
|
-
name: 'connect_animation_states',
|
|
3372
|
-
description: 'Connect two states with a transition',
|
|
3373
|
-
inputSchema: {
|
|
3374
|
-
type: 'object',
|
|
3375
|
-
properties: {
|
|
3376
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3377
|
-
scenePath: { type: 'string', description: 'Path to the scene file' },
|
|
3378
|
-
animTreePath: { type: 'string', description: 'Path to AnimationTree node' },
|
|
3379
|
-
fromState: { type: 'string', description: 'Source state name' },
|
|
3380
|
-
toState: { type: 'string', description: 'Target state name' },
|
|
3381
|
-
transitionType: { type: 'string', enum: ['immediate', 'sync', 'at_end'], description: 'Transition type' },
|
|
3382
|
-
advanceCondition: { type: 'string', description: 'Condition parameter name for auto-advance' },
|
|
3383
|
-
},
|
|
3384
|
-
required: ['projectPath', 'scenePath', 'animTreePath', 'fromState', 'toState'],
|
|
3385
|
-
},
|
|
3386
|
-
},
|
|
3387
|
-
// ==================== UI/THEME TOOLS ====================
|
|
3388
|
-
{
|
|
3389
|
-
name: 'set_theme_color',
|
|
3390
|
-
description: 'Set a color in a Theme resource',
|
|
3391
|
-
inputSchema: {
|
|
3392
|
-
type: 'object',
|
|
3393
|
-
properties: {
|
|
3394
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3395
|
-
themePath: { type: 'string', description: 'Path to the theme resource' },
|
|
3396
|
-
controlType: { type: 'string', description: 'Control type (Button, Label, etc.)' },
|
|
3397
|
-
colorName: { type: 'string', description: 'Color name (font_color, etc.)' },
|
|
3398
|
-
color: { type: 'object', properties: { r: { type: 'number' }, g: { type: 'number' }, b: { type: 'number' }, a: { type: 'number' } }, description: 'Color value' },
|
|
3399
|
-
},
|
|
3400
|
-
required: ['projectPath', 'themePath', 'controlType', 'colorName', 'color'],
|
|
3401
|
-
},
|
|
3402
|
-
},
|
|
3403
|
-
{
|
|
3404
|
-
name: 'set_theme_font_size',
|
|
3405
|
-
description: 'Set a font size in a Theme resource',
|
|
3406
|
-
inputSchema: {
|
|
3407
|
-
type: 'object',
|
|
3408
|
-
properties: {
|
|
3409
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot. Use the same path across all tool calls in a workflow.' },
|
|
3410
|
-
themePath: { type: 'string', description: 'Path to the theme resource' },
|
|
3411
|
-
controlType: { type: 'string', description: 'Control type (Button, Label, etc.)' },
|
|
3412
|
-
fontSizeName: { type: 'string', description: 'Font size name' },
|
|
3413
|
-
size: { type: 'number', description: 'Font size in pixels' },
|
|
3414
|
-
},
|
|
3415
|
-
required: ['projectPath', 'themePath', 'controlType', 'fontSizeName', 'size'],
|
|
3416
|
-
},
|
|
3417
|
-
},
|
|
3418
|
-
// ==================== THEME BUILDER TOOLS ====================
|
|
3419
|
-
{
|
|
3420
|
-
name: 'apply_theme_shader',
|
|
3421
|
-
description: 'Generate and apply theme-appropriate shader to a material in a scene',
|
|
3422
|
-
inputSchema: {
|
|
3423
|
-
type: 'object',
|
|
3424
|
-
properties: {
|
|
3425
|
-
projectPath: { type: 'string', description: 'Path to the Godot project directory' },
|
|
3426
|
-
scenePath: { type: 'string', description: 'Path to the scene file (relative to project)' },
|
|
3427
|
-
nodePath: { type: 'string', description: 'Path to MeshInstance3D or Sprite node' },
|
|
3428
|
-
theme: {
|
|
3429
|
-
type: 'string',
|
|
3430
|
-
enum: ['medieval', 'cyberpunk', 'nature', 'scifi', 'horror', 'cartoon'],
|
|
3431
|
-
description: 'Visual theme to apply'
|
|
3432
|
-
},
|
|
3433
|
-
effect: {
|
|
3434
|
-
type: 'string',
|
|
3435
|
-
enum: ['none', 'glow', 'hologram', 'wind_sway', 'torch_fire', 'dissolve', 'outline'],
|
|
3436
|
-
description: 'Special effect to add (default: none)'
|
|
3437
|
-
},
|
|
3438
|
-
shaderParams: {
|
|
3439
|
-
type: 'string',
|
|
3440
|
-
description: 'Optional JSON string with custom shader parameters'
|
|
3441
|
-
},
|
|
3442
|
-
},
|
|
3443
|
-
required: ['projectPath', 'scenePath', 'nodePath', 'theme'],
|
|
3444
|
-
},
|
|
3445
|
-
},
|
|
3446
|
-
// ==================== CLASSDB INTROSPECTION TOOLS ====================
|
|
3447
|
-
{
|
|
3448
|
-
name: 'query_classes',
|
|
3449
|
-
description: 'Query available Godot classes from ClassDB with filtering. Use to discover node types, resource types, or any class before using add_node/create_resource. Categories: node, node2d, node3d, control, resource, physics, physics2d, audio, visual, animation.',
|
|
3450
|
-
inputSchema: {
|
|
3451
|
-
type: 'object',
|
|
3452
|
-
properties: {
|
|
3453
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
3454
|
-
filter: { type: 'string', description: 'Optional: substring filter for class names (case-insensitive, e.g., "light", "collision")' },
|
|
3455
|
-
category: { type: 'string', description: 'Optional: filter by category (node, node2d, node3d, control, resource, physics, physics2d, audio, visual, animation)' },
|
|
3456
|
-
instantiableOnly: { type: 'boolean', description: 'If true, only return classes that can be instantiated (default: false)' },
|
|
3457
|
-
},
|
|
3458
|
-
required: ['projectPath'],
|
|
3459
|
-
},
|
|
3460
|
-
},
|
|
3461
|
-
{
|
|
3462
|
-
name: 'query_class_info',
|
|
3463
|
-
description: 'Get detailed information about a specific Godot class: methods, properties, signals, enums. Use to discover available properties before calling add_node/create_resource/set_node_properties, or to find methods before call_runtime_method.',
|
|
3464
|
-
inputSchema: {
|
|
3465
|
-
type: 'object',
|
|
3466
|
-
properties: {
|
|
3467
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
3468
|
-
className: { type: 'string', description: 'Exact Godot class name (e.g., "CharacterBody3D", "StandardMaterial3D", "AnimationPlayer")' },
|
|
3469
|
-
includeInherited: { type: 'boolean', description: 'If true, include inherited members from parent classes (default: false — shows only class-specific members)' },
|
|
3470
|
-
},
|
|
3471
|
-
required: ['projectPath', 'className'],
|
|
3472
|
-
},
|
|
3473
|
-
},
|
|
3474
|
-
{
|
|
3475
|
-
name: 'inspect_inheritance',
|
|
3476
|
-
description: 'Inspect class inheritance hierarchy: ancestors, direct children, all descendants. Use to understand class relationships and find specialized alternatives.',
|
|
3477
|
-
inputSchema: {
|
|
3478
|
-
type: 'object',
|
|
3479
|
-
properties: {
|
|
3480
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
3481
|
-
className: { type: 'string', description: 'Exact Godot class name to inspect' },
|
|
3482
|
-
},
|
|
3483
|
-
required: ['projectPath', 'className'],
|
|
3484
|
-
},
|
|
3485
|
-
},
|
|
3486
|
-
// ==================== RESOURCE MODIFICATION TOOL ====================
|
|
3487
|
-
{
|
|
3488
|
-
name: 'modify_resource',
|
|
3489
|
-
description: 'Modify properties of an existing resource file (.tres/.res). Use to update materials, environments, themes, or any saved resource without recreating it.',
|
|
3490
|
-
inputSchema: {
|
|
3491
|
-
type: 'object',
|
|
3492
|
-
properties: {
|
|
3493
|
-
projectPath: { type: 'string', description: 'Absolute path to project directory containing project.godot.' },
|
|
3494
|
-
resourcePath: { type: 'string', description: 'Path to existing resource file relative to project (e.g., "materials/player.tres")' },
|
|
3495
|
-
properties: { type: 'string', description: 'JSON object of properties to set (e.g., {"albedo_color": {"_type": "Color", "r": 1, "g": 0, "b": 0, "a": 1}})' },
|
|
3496
|
-
},
|
|
3497
|
-
required: ['projectPath', 'resourcePath', 'properties'],
|
|
3498
|
-
},
|
|
3499
|
-
},
|
|
3500
|
-
// ==================== MULTI-SOURCE ASSET TOOLS ====================
|
|
3501
|
-
{
|
|
3502
|
-
name: 'search_assets',
|
|
3503
|
-
description: 'Search for CC0 assets across multiple sources (Poly Haven, AmbientCG, Kenney). Returns results sorted by provider priority.',
|
|
3504
|
-
inputSchema: {
|
|
3505
|
-
type: 'object',
|
|
3506
|
-
properties: {
|
|
3507
|
-
keyword: { type: 'string', description: 'Search term (e.g., "chair", "rock", "tree")' },
|
|
3508
|
-
assetType: {
|
|
3509
|
-
type: 'string',
|
|
3510
|
-
enum: ['models', 'textures', 'hdris', 'audio', '2d'],
|
|
3511
|
-
description: 'Type of asset to search (optional, searches all if not specified)'
|
|
3512
|
-
},
|
|
3513
|
-
maxResults: {
|
|
3514
|
-
type: 'number',
|
|
3515
|
-
description: 'Maximum number of results to return (default: 10)'
|
|
3516
|
-
},
|
|
3517
|
-
provider: {
|
|
3518
|
-
type: 'string',
|
|
3519
|
-
enum: ['all', 'polyhaven', 'ambientcg', 'kenney'],
|
|
3520
|
-
description: 'Specific provider to search, or "all" for multi-source (default: all)'
|
|
3521
|
-
},
|
|
3522
|
-
mode: {
|
|
3523
|
-
type: 'string',
|
|
3524
|
-
enum: ['parallel', 'sequential'],
|
|
3525
|
-
description: 'Search mode: "parallel" queries all providers, "sequential" stops at first with results (default: parallel)'
|
|
3526
|
-
},
|
|
3527
|
-
},
|
|
3528
|
-
required: ['keyword'],
|
|
3529
|
-
},
|
|
3530
|
-
},
|
|
3531
|
-
{
|
|
3532
|
-
name: 'fetch_asset',
|
|
3533
|
-
description: 'Download a CC0 asset from any supported source (Poly Haven, AmbientCG, Kenney) to your Godot project.',
|
|
3534
|
-
inputSchema: {
|
|
3535
|
-
type: 'object',
|
|
3536
|
-
properties: {
|
|
3537
|
-
projectPath: { type: 'string', description: 'Path to the Godot project directory' },
|
|
3538
|
-
assetId: { type: 'string', description: 'Asset ID from search results' },
|
|
3539
|
-
provider: {
|
|
3540
|
-
type: 'string',
|
|
3541
|
-
enum: ['polyhaven', 'ambientcg', 'kenney'],
|
|
3542
|
-
description: 'Source provider for the asset'
|
|
3543
|
-
},
|
|
3544
|
-
resolution: {
|
|
3545
|
-
type: 'string',
|
|
3546
|
-
enum: ['1k', '2k', '4k'],
|
|
3547
|
-
description: 'Resolution for download (default: 2k, only for PolyHaven/AmbientCG)'
|
|
3548
|
-
},
|
|
3549
|
-
targetFolder: {
|
|
3550
|
-
type: 'string',
|
|
3551
|
-
description: 'Target folder for download (default: downloaded_assets/<provider>)'
|
|
3552
|
-
},
|
|
3553
|
-
},
|
|
3554
|
-
required: ['projectPath', 'assetId', 'provider'],
|
|
3555
|
-
},
|
|
3556
|
-
},
|
|
3557
|
-
{
|
|
3558
|
-
name: 'list_asset_providers',
|
|
3559
|
-
description: 'List all available CC0 asset providers and their capabilities.',
|
|
3560
|
-
inputSchema: {
|
|
3561
|
-
type: 'object',
|
|
3562
|
-
properties: {},
|
|
3563
|
-
required: [],
|
|
3564
|
-
},
|
|
3565
|
-
},
|
|
3566
|
-
// Screenshot Capture Tools (runtime addon TCP port 7777)
|
|
3567
|
-
{
|
|
3568
|
-
name: 'capture_screenshot',
|
|
3569
|
-
description: 'Capture a screenshot of the running Godot game viewport. Requires the runtime addon to be active (game must be running with the MCP runtime autoload).',
|
|
3570
|
-
inputSchema: {
|
|
3571
|
-
type: 'object',
|
|
3572
|
-
properties: {
|
|
3573
|
-
width: { type: 'number', description: 'Target width in pixels (default: current viewport width)' },
|
|
3574
|
-
height: { type: 'number', description: 'Target height in pixels (default: current viewport height)' },
|
|
3575
|
-
format: { type: 'string', enum: ['png', 'jpg'], description: 'Image format (default: png)' },
|
|
3576
|
-
},
|
|
3577
|
-
},
|
|
3578
|
-
},
|
|
3579
|
-
{
|
|
3580
|
-
name: 'capture_viewport',
|
|
3581
|
-
description: 'Capture a viewport texture as base64 image from the running Godot game. Similar to capture_screenshot but captures a specific viewport by path.',
|
|
3582
|
-
inputSchema: {
|
|
3583
|
-
type: 'object',
|
|
3584
|
-
properties: {
|
|
3585
|
-
viewportPath: { type: 'string', description: 'NodePath to the target Viewport node (default: root viewport)' },
|
|
3586
|
-
width: { type: 'number', description: 'Target width in pixels' },
|
|
3587
|
-
height: { type: 'number', description: 'Target height in pixels' },
|
|
3588
|
-
},
|
|
3589
|
-
},
|
|
3590
|
-
},
|
|
3591
|
-
// Input Injection Tools (runtime addon TCP port 7777)
|
|
3592
|
-
{
|
|
3593
|
-
name: 'inject_action',
|
|
3594
|
-
description: 'Simulate a Godot input action (press/release). Requires runtime addon.',
|
|
3595
|
-
inputSchema: {
|
|
3596
|
-
type: 'object',
|
|
3597
|
-
properties: {
|
|
3598
|
-
action: { type: 'string', description: 'Action name as defined in Input Map (e.g., "ui_accept", "jump")' },
|
|
3599
|
-
pressed: { type: 'boolean', description: 'Whether to press (true) or release (false). Default: true' },
|
|
3600
|
-
strength: { type: 'number', description: 'Action strength 0.0–1.0. Default: 1.0' },
|
|
3601
|
-
},
|
|
3602
|
-
required: ['action'],
|
|
3603
|
-
},
|
|
3604
|
-
},
|
|
3605
|
-
{
|
|
3606
|
-
name: 'inject_key',
|
|
3607
|
-
description: 'Simulate a keyboard key press/release in the running Godot game. Requires runtime addon.',
|
|
3608
|
-
inputSchema: {
|
|
3609
|
-
type: 'object',
|
|
3610
|
-
properties: {
|
|
3611
|
-
keycode: { type: 'string', description: 'Key name (e.g., "A", "Space", "Escape", "Enter")' },
|
|
3612
|
-
pressed: { type: 'boolean', description: 'Press (true) or release (false). Default: true' },
|
|
3613
|
-
shift: { type: 'boolean', description: 'Shift modifier. Default: false' },
|
|
3614
|
-
ctrl: { type: 'boolean', description: 'Ctrl modifier. Default: false' },
|
|
3615
|
-
alt: { type: 'boolean', description: 'Alt modifier. Default: false' },
|
|
3616
|
-
},
|
|
3617
|
-
required: ['keycode'],
|
|
3618
|
-
},
|
|
3619
|
-
},
|
|
3620
|
-
{
|
|
3621
|
-
name: 'inject_mouse_click',
|
|
3622
|
-
description: 'Simulate a mouse click at specified position in the running Godot game. Requires runtime addon.',
|
|
3623
|
-
inputSchema: {
|
|
3624
|
-
type: 'object',
|
|
3625
|
-
properties: {
|
|
3626
|
-
x: { type: 'number', description: 'X coordinate in viewport pixels' },
|
|
3627
|
-
y: { type: 'number', description: 'Y coordinate in viewport pixels' },
|
|
3628
|
-
button: { type: 'string', enum: ['left', 'right', 'middle'], description: 'Mouse button. Default: left' },
|
|
3629
|
-
pressed: { type: 'boolean', description: 'Press (true) or release (false). Default: true' },
|
|
3630
|
-
doubleClick: { type: 'boolean', description: 'Double-click. Default: false' },
|
|
3631
|
-
},
|
|
3632
|
-
required: ['x', 'y'],
|
|
3633
|
-
},
|
|
3634
|
-
},
|
|
3635
|
-
{
|
|
3636
|
-
name: 'inject_mouse_motion',
|
|
3637
|
-
description: 'Simulate mouse movement to a position in the running Godot game. Requires runtime addon.',
|
|
3638
|
-
inputSchema: {
|
|
3639
|
-
type: 'object',
|
|
3640
|
-
properties: {
|
|
3641
|
-
x: { type: 'number', description: 'Target X coordinate in viewport pixels' },
|
|
3642
|
-
y: { type: 'number', description: 'Target Y coordinate in viewport pixels' },
|
|
3643
|
-
relativeX: { type: 'number', description: 'Relative X movement delta' },
|
|
3644
|
-
relativeY: { type: 'number', description: 'Relative Y movement delta' },
|
|
3645
|
-
},
|
|
3646
|
-
required: ['x', 'y'],
|
|
3647
|
-
},
|
|
3648
|
-
},
|
|
3649
|
-
// Editor Plugin Bridge Status
|
|
3650
|
-
{
|
|
3651
|
-
name: 'get_editor_status',
|
|
3652
|
-
description: 'Returns the connection status of the Godot Editor Plugin bridge. Use to check if the editor is connected before using scene/resource tools that require the editor plugin.',
|
|
3653
|
-
inputSchema: {
|
|
3654
|
-
type: 'object',
|
|
3655
|
-
properties: {},
|
|
3656
|
-
},
|
|
3657
|
-
},
|
|
3658
|
-
// Project Visualizer Tool
|
|
3659
|
-
{
|
|
3660
|
-
name: 'map_project',
|
|
3661
|
-
description: `Crawl the entire Godot project and build an interactive visual map of all scripts showing their structure (variables, functions, signals), connections (extends, preloads, signal connections), and descriptions. Opens an interactive browser-based visualization at localhost:${this.godotBridge.getStatus().port}.`,
|
|
3662
|
-
inputSchema: {
|
|
3663
|
-
type: 'object',
|
|
3664
|
-
properties: {
|
|
3665
|
-
projectPath: { type: 'string', description: 'Absolute path to the Godot project directory' },
|
|
3666
|
-
root: { type: 'string', description: 'Root path to start crawling from (default: res://)' },
|
|
3667
|
-
include_addons: { type: 'boolean', description: 'Whether to include scripts in addons/ folder (default: false)' },
|
|
3668
|
-
},
|
|
3669
|
-
required: ['projectPath'],
|
|
3670
|
-
},
|
|
3671
|
-
},
|
|
3672
|
-
// Godot LSP Tools (GDScript diagnostics via Godot editor LSP on port 6005)
|
|
3673
|
-
...createLSPTools(),
|
|
3674
|
-
// Godot DAP Tools (Debug Adapter Protocol via Godot editor DAP on port 6006)
|
|
3675
|
-
...createDAPTools(),
|
|
3676
|
-
];
|
|
1237
|
+
const buildToolDefinitions = () => buildToolDefinitionsForServer(this.godotBridge.getStatus().port);
|
|
3677
1238
|
this.toolDefinitionFactory = buildToolDefinitions;
|
|
3678
1239
|
this.cachedToolDefinitions = buildToolDefinitions();
|
|
3679
1240
|
this.server.setRequestHandler(ListToolsRequestSchema, async (request) => {
|
|
@@ -3900,7 +1461,7 @@ class GodotServer {
|
|
|
3900
1461
|
return await this.handleViaBridge('modify_resource', normalizedArgs);
|
|
3901
1462
|
// Editor Plugin Bridge Status
|
|
3902
1463
|
case 'get_editor_status':
|
|
3903
|
-
return { content: [{ type: 'text', text: JSON.stringify(this.
|
|
1464
|
+
return { content: [{ type: 'text', text: JSON.stringify(this.getEditorStatusPayload(), null, 2) }] };
|
|
3904
1465
|
// Project Visualizer Tool
|
|
3905
1466
|
case 'map_project':
|
|
3906
1467
|
return await this.handleMapProject(request.params.arguments);
|
|
@@ -7156,11 +4717,13 @@ class GodotServer {
|
|
|
7156
4717
|
// Bridge startup issues should not take down the stdio MCP server.
|
|
7157
4718
|
try {
|
|
7158
4719
|
await this.godotBridge.start();
|
|
4720
|
+
this.bridgeStartupError = null;
|
|
7159
4721
|
const bridgeStatus = this.godotBridge.getStatus();
|
|
7160
4722
|
console.error(`[SERVER] Godot Editor Bridge started on ${bridgeStatus.host}:${bridgeStatus.port}`);
|
|
7161
4723
|
}
|
|
7162
4724
|
catch (bridgeError) {
|
|
7163
4725
|
const bridgeMessage = bridgeError instanceof Error ? bridgeError.message : String(bridgeError);
|
|
4726
|
+
this.bridgeStartupError = bridgeMessage;
|
|
7164
4727
|
console.error(`[SERVER] Warning: Godot Editor Bridge failed to start: ${bridgeMessage}`);
|
|
7165
4728
|
console.error('[SERVER] Continuing without bridge-backed editor tools.');
|
|
7166
4729
|
}
|