Skip to main content
Glama

Godot Sentinel MCP

by Snack-JPG
test-full-functionality.shโ€ข4.54 kB
#!/bin/bash echo "๐ŸŽฏ Testing Full Sentinel Functionality" echo "=====================================" # Check prerequisites if [ ! -d "../test-game" ]; then echo "โŒ Test game project not found. Run ./create-test-project.sh first" exit 1 fi if [ ! -f ".env" ]; then echo "โš ๏ธ Creating .env file..." cp .env.example .env sed -i.bak 's|GODOT_PROJECT_ROOT=../game|GODOT_PROJECT_ROOT=../test-game|' .env echo "โœ… Updated .env with test project path" fi echo "1. Testing CLI compilation..." npm run build if [ $? -ne 0 ]; then echo "โŒ Build failed" exit 1 fi echo "2. Testing CLI link..." npm link echo "โœ… CLI linked globally" echo "3. Testing project map functionality..." echo "Getting project structure..." node -e " const { Context } = require('./dist/adapters/context'); const context = new Context('../test-game'); context.getProjectMap().then(map => { console.log('๐Ÿ“ Scripts found:', map.scripts.length); console.log('๐Ÿ“ Scenes found:', map.scenes.length); console.log('๐Ÿ“ Data files found:', map.data.length); if (map.scripts.length > 0) { console.log('โœ… Project mapping works'); } else { console.log('โŒ No scripts found'); process.exit(1); } }).catch(err => { console.log('โŒ Project mapping failed:', err.message); process.exit(1); }); " echo "4. Testing context reading..." echo "Reading context around the error..." node -e " const { Context } = require('./dist/adapters/context'); const context = new Context('../test-game'); context.getContext('res://scripts/combat/fighter.gd', 9, 5).then(result => { if (result.valid_path) { console.log('โœ… Context reading works'); console.log('๐Ÿ“„ File:', result.file); console.log('๐Ÿ“ Line:', result.line); console.log('๐Ÿ“ Context lines:', result.numbered_lines.length); result.numbered_lines.forEach(line => console.log(line)); } else { console.log('โŒ Could not read file context'); process.exit(1); } }).catch(err => { console.log('โŒ Context reading failed:', err.message); process.exit(1); }); " echo "5. Testing log parsing..." echo "Parsing mock Godot error output..." node -e " const { ParserGodot4 } = require('./dist/adapters/parser_godot4'); const parser = new ParserGodot4(); const mockLog = \`=== Mock gdUnit4 Test Runner === Running tests... Loading test scene: res://scenes/test_scene.tscn ERROR: Invalid call. Nonexistent function 'get_damage_value' in base 'Node'. At: res://scripts/combat/fighter.gd:9 @ _ready() Test Results: 1 test failed 0 tests passed === Test Run Complete ===\`; const error = parser.parseFirstError(mockLog); if (error) { console.log('โœ… Error parsing works'); console.log('๐Ÿ› Found error in:', error.file + ':' + error.line); console.log('๐Ÿ“ Message:', error.message); console.log('๐Ÿ” Type:', error.type); } else { console.log('โŒ Failed to parse error'); process.exit(1); } " echo "6. Testing moveset operations..." echo "Reading moveset data..." sentinel moveset list echo "" sentinel moveset read basic_attacks echo "7. Testing MCP server (background)..." timeout 10s npm start & SERVER_PID=$! sleep 3 echo "Testing MCP tools..." curl -s -X POST http://localhost:8787/mcp \ -H "Content-Type: application/json" \ -d '{"method":"tools/list","id":"test"}' | jq '.result.tools[].name' 2>/dev/null || echo "jq not available, raw response:" echo "" echo "Testing context tool via MCP..." curl -s -X POST http://localhost:8787/mcp \ -H "Content-Type: application/json" \ -d '{ "method": "get_context", "params": { "file": "res://scripts/combat/fighter.gd", "line": 9, "radius": 3 }, "id": "test" }' | head -10 kill $SERVER_PID 2>/dev/null echo "" echo "8. Testing CLI commands..." echo "Running sentinel ctx command..." sentinel ctx res://scripts/combat/fighter.gd 9 3 echo "" echo "๐ŸŽ‰ Full functionality test completed!" echo "" echo "๐Ÿ”ง What we've verified:" echo " โœ… TypeScript compilation and CLI linking" echo " โœ… Project structure reading" echo " โœ… File context extraction" echo " โœ… Godot error log parsing" echo " โœ… Moveset JSON operations" echo " โœ… MCP server HTTP/tool protocol" echo " โœ… CLI command execution" echo "" echo "๐Ÿš€ Ready to test with real Godot project!" echo "๐Ÿ“ Next steps for full testing:" echo " 1. Point to real Godot project: edit .env" echo " 2. Install gdUnit4 in your project" echo " 3. Run: sentinel test" echo " 4. Run: sentinel fix (needs ANTHROPIC_API_KEY)"

MCP directory API

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

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Snack-JPG/Godot-Sentinel-MCP'

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