Skip to main content
Glama

get_project_structure

Retrieve the file structure and organization of a KiCad electronic design project to understand its components and layout.

Instructions

Get the structure and files of a KiCad project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the get_project_structure tool logic, retrieving project files and metadata.
    @mcp.tool() def get_project_structure(project_path: str) -> Dict[str, Any]: """Get the structure and files of a KiCad project.""" if not os.path.exists(project_path): return {"error": f"Project not found: {project_path}"} project_dir = os.path.dirname(project_path) project_name = os.path.basename(project_path)[:-10] # Remove .kicad_pro extension # Get related files files = get_project_files(project_path) # Get project metadata metadata = {} project_data = load_project_json(project_path) if project_data and "metadata" in project_data: metadata = project_data["metadata"] return { "name": project_name, "path": project_path, "directory": project_dir, "files": files, "metadata": metadata }
  • The call to register_project_tools which registers the get_project_structure tool (among others) to the MCP server.
    register_project_tools(mcp)

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/lamaalrajih/kicad-mcp'

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