Skip to main content
Glama
lamaalrajih

KiCad MCP Server

by lamaalrajih

open_project

Open a KiCad project to access and work with electronic design files for PCB development and analysis.

Instructions

Open a KiCad project in KiCad.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'open_project' tool, decorated with @mcp.tool() and delegating to the helper function open_kicad_project.
    @mcp.tool()
    def open_project(project_path: str) -> Dict[str, Any]:
        """Open a KiCad project in KiCad."""
        return open_kicad_project(project_path)
  • Top-level registration call in the main server creation that registers all project tools, including 'open_project', via register_project_tools.
    register_project_tools(mcp)
  • Supporting utility function that executes the subprocess command to open the KiCad project in the appropriate application based on the operating system.
    def open_kicad_project(project_path: str) -> Dict[str, Any]:
        """Open a KiCad project using the KiCad application.
        
        Args:
            project_path: Path to the .kicad_pro file
            
        Returns:
            Dictionary with result information
        """
        if not os.path.exists(project_path):
            return {"success": False, "error": f"Project not found: {project_path}"}
        
        try:
            cmd = []
            if sys.platform == "darwin":  # macOS
                # On MacOS, use the 'open' command to open the project in KiCad
                cmd = ["open", "-a", config.KICAD_APP_PATH, project_path]
            elif sys.platform == "linux": # Linux
                # On Linux, use 'xdg-open'
                cmd = ["xdg-open", project_path]
            else:
                # Fallback or error for unsupported OS
                return {"success": False, "error": f"Unsupported operating system: {sys.platform}"}
    
            result = subprocess.run(cmd, capture_output=True, text=True)
            
            return {
                "success": result.returncode == 0,
                "command": " ".join(cmd),
                "output": result.stdout,
                "error": result.stderr if result.returncode != 0 else None
            }
        
        except Exception as e:
            return {"success": False, "error": str(e)}
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does not disclose behavioral traits such as whether opening a project requires specific permissions, if it modifies the project, what happens on failure, or if it has side effects like locking files. The description is minimal and lacks critical operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with a single sentence, 'Open a KiCad project in KiCad.', which is efficient. However, it is under-specified rather than optimally concise, as it lacks necessary details for a tool with no annotations and low schema coverage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple operation with one parameter), no annotations, and an output schema present, the description is incomplete. It does not explain what 'open' means operationally or what the output might contain, relying on the output schema. For a tool with no annotations, more context is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, but it adds no meaning beyond the schema. The parameter 'project_path' is not explained in the description—no details on format, valid paths, or examples. With one parameter and no schema descriptions, the baseline is 3 as it does not add value but also does not mislead.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Open a KiCad project in KiCad' states the verb ('Open') and resource ('KiCad project'), but is vague about what 'open' entails—whether it loads for editing, viewing, or analysis. It does not distinguish from siblings like 'list_projects' or 'get_project_structure', which are related but different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it does not specify if this should be used before analysis tools like 'analyze_project_circuit_patterns' or if 'list_projects' is a prerequisite. The description lacks context about prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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