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 code structure in Godot game engine projects.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the get_project_root tool logic. It returns the current project root directory path and the count of indexed GDScript files if a project root has been set, otherwise returns a message indicating no project root is 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, )
  • Defines the schema for the 'get_project_root' tool, specifying its name, description, and empty input schema (no parameters required). This is part of the tools list returned by get_tools().
    Tool( name="get_project_root", description="Get the current project root directory and count of indexed GDScript files.", inputSchema={ "type": "object", "properties": {}, "required": [], }, ),
  • Registers the tool handler in the central dispatch method handle_tool_call by routing calls to 'get_project_root' to the _get_project_root implementation.
    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