Skip to main content
Glama

pio_project_init

Initialize a new PlatformIO project or add an environment to an existing one by specifying project directory and board, with optional framework and platformio.ini options.

Instructions

Create a new PlatformIO project (or add an environment to an existing one) with pio project init. Give an absolute project_dir, a board id from pio_list_boards, and optionally a framework (arduino, espidf, stm32cube, zephyr, ...). project_options are extra platformio.ini keys like 'monitor_speed=115200' or 'lib_deps=bblanchon/ArduinoJson'. Never hand-write platformio.ini for a new project; use this.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardYes
frameworkNo
project_dirYes
project_optionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

No annotations are present, so the description must carry full behavioral disclosure. It states it creates projects or adds environments and that it writes platformio.ini, but it does not mention side effects (e.g., whether existing files are overwritten), required permissions, network access for board definitions, or error handling. This is a moderate gap for a tool with no annotation safety hints.

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

Conciseness5/5

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

Two sentences, both dense and front-loaded. The first sentence states the purpose and the command, the second explains parameters and gives a directive. No wasted words, every sentence earns its place.

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

Completeness4/5

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

For an initialization tool with an output schema, it covers the main purpose, parameters, and usage. It references the board source and gives parameter examples. It could add notes about existing directories or error cases, but it is largely complete for an agent to call it correctly.

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

Parameters5/5

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

Schema description coverage is 0%, but the description explicitly explains all four parameters: project_dir (absolute path), board (from pio_list_boards), framework (with example list), and project_options (with concrete examples like 'monitor_speed=115200'). This fully compensates for the schema's lack of descriptions.

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

Purpose5/5

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

States a specific verb and resource: 'Create a new PlatformIO project (or add an environment to an existing one)'. It distinguishes from siblings by naming the underlying CLI command ('pio project init') and explicitly forbidding manual platformio.ini writing, which sets it apart from build, upload, and monitor tools.

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

Usage Guidelines4/5

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

Provides a clear directive: 'Never hand-write platformio.ini for a new project; use this.' It also tells the agent to get board ids from pio_list_boards, which is a sibling tool. It doesn't explicitly list when not to use it (e.g., for editing existing configs without adding an environment), but the primary use case is clear.

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