create_kicad_project
Creates a new KiCad project from a blank setup or template and fills the root schematic title block; handles overwrite confirmation errors.
Instructions
Create a new KiCad project, as the project manager of the installed KiCad (8, 9 or 10) makes it.
With no template ("empty"), the project gets the files of "New Project" of KiCad: KiCad 8 and 9 copy the project file kicad.kicad_pro of KiCad and write an empty schematic and board. KiCad 10 makes the project from its template "default" (it makes that template when it is not there). With a template, the project gets the files of "New Project from Template": the files of the template with the project name in the place of the template name, then the files that are missing. KiCad does not change the files of a template. The tool then writes the title, the company and the date into the title block of the root schematic that it wrote.
When the project folder is not empty (no template), or it has files of the template, KiCad asks the user. The tool then gives an error: ask the user, then call it again with overwrite=True.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_path": "<project_path>",
"project_name": "<project_name>"
},
"name": "create_kicad_project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional title of the project. Default: project_name. | |
| company | No | Optional name of the company. | |
| template | No | "empty" (default) for a blank project, or a KiCad template: a name on the template pages of KiCad (KICAD_USER_TEMPLATE_DIR and KICAD<version>_TEMPLATE_DIR, for example "Arduino_Uno") or the path of a template folder. | empty |
| overwrite | No | True after the user confirmed: with a template, the files of the template replace the files with the same names; with no template, the tool makes the project in a folder that is not empty (the files of the folder stay, as in KiCad). | |
| project_name | Yes | Name of the project. As in the file dialog of KiCad, the extension ".kicad_pro" (or a last ".") goes: "board.kicad_pro" gives "board". | |
| project_path | Yes | The folder of the project. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |