Skip to main content
Glama
minami110

GDScript Code Analyzer

by minami110

get_project_root

Locate the project root directory and count indexed GDScript files to analyze Godot game engine code structure efficiently.

Instructions

Get the current project root directory and count of indexed GDScript files.

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • The _get_project_root method that executes the logic of the 'get_project_root' tool, returning JSON with the project root path and GDScript files count if set, or a message if not set.
    def _get_project_root(self) -> CallToolResult: """Get the current project root. Returns: CallToolResult with project root info """ try: if not self.project_root: return CallToolResult( content=[TextContent(type="text", text="No project root set")], isError=False, ) result = { "project_root": str(self.project_root), "gdscript_files_count": len(self._gdscript_files), } return CallToolResult( content=[TextContent(type="text", text=json.dumps(result, indent=2))], isError=False, ) except Exception as e: return CallToolResult( content=[TextContent(type="text", text=f"Error getting project root: {str(e)}")], isError=True, )
  • Registration of the 'get_project_root' tool in the get_tools() method, including its name, description, and empty input schema.
    Tool( name="get_project_root", description="Get the current project root directory and count of indexed GDScript files.", inputSchema={ "type": "object", "properties": {}, "required": [], }, ),
  • Dispatch in handle_tool_call method that routes calls to the 'get_project_root' tool to its handler method.
    elif tool_name == "get_project_root": return self._get_project_root()

Latest Blog Posts

MCP directory API

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

curl -X GET 'https://glama.ai/api/mcp/v1/servers/minami110/mcp-gdscript'

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