{"at":"2026-11-23T00:30:05.251Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T00:30:05.980Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T00:30:06.080Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T00:30:06.783Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"protocolVersion":"2025-11-25","serverInfo":{"name":"platformio-mcp-server","version":"3.1.0"}}}}
{"at":"2026-11-23T00:30:06.783Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T00:30:06.783Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T00:30:06.786Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Deps Check"},"description":"Audit declared and installed project dependencies, with optional separately authorized build and LDF graph evidence.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"maxLength":256,"type":"string"},"build":{"default":false,"type":"boolean"},"buildApprovalId":{"maxLength":256,"type":"string"},"configurationApprovalId":{"maxLength":256,"type":"string"},"environment":{"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_.-]{0,49}$","type":"string"},"inventoryApprovalId":{"maxLength":256,"type":"string"},"projectDir":{"maxLength":32768,"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"},"name":"deps_check"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Project Envs"},"description":"List resolved project environments, inherited board/framework/port settings and configured defaults without running build scripts.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"projectDir":{"maxLength":32768,"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"},"name":"project_envs"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Project Metadata"},"description":"Generate bounded build metadata for selected or all environments. Requires build permission; may execute project scripts or install dependencies.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"environment":{"maxLength":50,"minLength":1,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$","type":"string"},"projectDir":{"maxLength":32768,"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"},"name":"project_metadata"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Coredump"},"description":"Inspect an ESP core dump from a file or explicitly authorized device partition read, optionally analyzing it against an explicit ELF. Device reads can reset hardware and require separate device and host-command grants.","inputSchema":{"additionalProperties":false,"oneOf":[{"not":{"required":["device"]},"required":["dumpPath"]},{"not":{"required":["dumpPath"]},"required":["device"]}],"properties":{"analyze":{"default":true,"type":"boolean"},"approvalId":{"maxLength":256,"type":"string"},"commandApprovalId":{"maxLength":256,"type":"string"},"device":{"additionalProperties":false,"properties":{"approvalId":{"maxLength":256,"type":"string"},"commandApprovalId":{"maxLength":256,"type":"string"},"partitionName":{"maxLength":16,"minLength":1,"type":"string"},"port":{"maxLength":512,"minLength":1,"type":"string"},"table":{"additionalProperties":false,"properties":{"approvalId":{"maxLength":256,"type":"string"},"boardApprovalId":{"maxLength":256,"type":"string"},"buildMetadata":{"default":false,"type":"boolean"},"configApprovalId":{"maxLength":256,"type":"string"},"environment":{"type":"string"},"flashSize":{"maximum":4294967296,"minimum":1,"type":"integer"},"format":{"default":"csv","enum":["csv","binary"],"type":"string"},"metadataApprovalId":{"maxLength":256,"type":"string"},"projectDir":{"minLength":1,"type":"string"},"sdkconfigPath":{"type":"string"},"systemApprovalId":{"maxLength":256,"type":"string"},"tableOffset":{"maximum":4294963200,"minimum":0,"type":"integer"},"tablePath":{"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"}},"required":["port","table"],"type":"object"},"dumpPath":{"maxLength":32768,"minLength":1,"type":"string"},"elfPath":{"maxLength":32768,"minLength":1,"type":"string"},"encrypted":{"default":false,"type":"boolean"},"expectedElfSha256":{"pattern":"^[a-fA-F0-9]{64}$","type":"string"},"expectedInputSha256":{"pattern":"^[a-fA-F0-9]{64}$","type":"string"},"exportApprovalId":{"maxLength":256,"type":"string"},"format":{"default":"raw","enum":["raw","base64"],"type":"string"},"outPath":{"maxLength":32768,"minLength":1,"type":"string"},"projectDir":{"maxLength":32768,"minLength":1,"type":"string"},"retainDump":{"default":false,"description":"Save the device partition in private managed storage with 24-hour expiry; requires export permission.","type":"boolean"}},"required":["projectDir"],"type":"object"},"name":"coredump"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Partition Table"},"description":"Inspect ESP partition artifacts and firmware fit. Optional buildMetadata requires build permission and can execute project scripts. Optional readDevice resets/reads an explicitly selected serial device with separate permissions.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"maxLength":256,"type":"string"},"boardApprovalId":{"maxLength":256,"type":"string"},"buildMetadata":{"default":false,"description":"Generate build metadata under build permission; may execute project scripts.","type":"boolean"},"commandApprovalId":{"maxLength":256,"type":"string"},"configApprovalId":{"maxLength":256,"type":"string"},"environment":{"maxLength":50,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$","type":"string"},"firmwarePath":{"maxLength":32768,"minLength":1,"type":"string"},"flashSize":{"maximum":4294967296,"minimum":1,"type":"integer"},"format":{"default":"csv","enum":["csv","binary"],"type":"string"},"metadataApprovalId":{"maxLength":256,"type":"string"},"observedTablePath":{"maxLength":32768,"minLength":1,"type":"string"},"port":{"maxLength":512,"minLength":1,"type":"string"},"projectDir":{"maxLength":32768,"minLength":1,"type":"string"},"readApprovalId":{"maxLength":256,"type":"string"},"readDevice":{"default":false,"description":"Read the partition sector from an explicit serial port; may reset hardware and requires separate device and host-command permissions.","type":"boolean"},"sdkconfigPath":{"maxLength":32768,"minLength":1,"type":"string"},"systemApprovalId":{"maxLength":256,"type":"string"},"tableOffset":{"maximum":4294963200,"minimum":0,"type":"integer"},"tablePath":{"maxLength":32768,"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"},"name":"partition_table"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Run Target"},"description":"Run a named PlatformIO target with effect-based permissions. Serial upload targets coordinate owned monitors and endpoint custody; network/probe destinations require their dedicated workflow.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"configApprovalId":{"type":"string"},"environment":{"type":["string","null"]},"projectDir":{"maxLength":32768,"minLength":1,"type":"string"},"selectionApprovalId":{"type":"string"},"stopOpenSessions":{"default":false,"type":"boolean"},"target":{"maxLength":4096,"minLength":1,"type":"string"},"uploadPort":{"type":["string","null"]}},"required":["projectDir","target"],"type":"object"},"name":"run_target"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"List Targets"},"description":"List structured target metadata for selected or all environments. Requires build permission; does not execute the listed targets.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"environment":{"maxLength":50,"minLength":1,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$","type":"string"},"projectDir":{"maxLength":32768,"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"},"name":"list_targets"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Pkg Search"},"description":"Search PlatformIO library, platform or tool registry packages by type and page.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"kind":{"default":"library","enum":["library","platform","tool"],"type":"string"},"page":{"default":1,"maximum":100000,"minimum":1,"type":"integer"},"query":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"pkg_search"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Pkg Install"},"description":"Install a library, platform or tool in a project and save dependencies through PlatformIO.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"environment":{"maxLength":50,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$","type":"string"},"kind":{"default":"library","enum":["library","platform","tool"],"type":"string"},"projectDir":{"minLength":1,"type":"string"},"spec":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["projectDir","spec"],"type":"object"},"name":"pkg_install"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Pkg Uninstall"},"description":"Remove a library, platform or tool from a project and its declared dependencies.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"environment":{"maxLength":50,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$","type":"string"},"kind":{"default":"library","enum":["library","platform","tool"],"type":"string"},"projectDir":{"minLength":1,"type":"string"},"spec":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["projectDir","spec"],"type":"object"},"name":"pkg_uninstall"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Pkg List"},"description":"List project packages and environments. Requires build permission because PlatformIO loads platform code.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"environment":{"maxLength":50,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$","type":"string"},"projectDir":{"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"},"name":"pkg_list"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Pkg Outdated"},"description":"Report outdated project packages. Requires build permission because PlatformIO loads platform code.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"environment":{"maxLength":50,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$","type":"string"},"projectDir":{"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"},"name":"pkg_outdated"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Pkg Update"},"description":"Update project dependencies within declared version constraints, with retained output and configuration change hashes.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"environment":{"maxLength":50,"pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$","type":"string"},"projectDir":{"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"},"name":"pkg_update"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Decode Backtrace"},"description":"Decode crash addresses against the selected current or retained ELF. Requires build permission for metadata; does not prove flashed-device identity.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"archivedElfSha256":{"description":"Retained ELF hash from this environment source path, for an earlier build.","pattern":"^[a-fA-F0-9]{64}$","type":"string"},"environment":{"description":"Explicit build environment; metadata collection can execute project scripts.","maxLength":50,"minLength":1,"type":"string"},"expectedElfSha256":{"pattern":"^[a-fA-F0-9]{64}$","type":"string"},"includeAllHex":{"type":"boolean"},"projectDir":{"description":"Explicit PlatformIO project directory.","type":"string"},"text":{"description":"Crash output, at most 1 MiB UTF-8.","minLength":1,"type":"string"}},"required":["projectDir","environment","text"],"type":"object"},"name":"decode_backtrace"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Size Report"},"description":"Report GNU symbols and PlatformIO memory accounting for one environment. Metadata and size checks require build permission and may execute project scripts.","inputSchema":{"additionalProperties":false,"properties":{"approvalId":{"type":"string"},"environment":{"description":"Explicit build environment; metadata collection can execute project scripts.","maxLength":50,"minLength":1,"type":"string"},"expectedElfSha256":{"pattern":"^[a-fA-F0-9]{64}$","type":"string"},"filter":{"description":"Case-insensitive bounded regex applied to symbol names or source paths.","maxLength":4096,"type":"string"},"projectDir":{"description":"Explicit PlatformIO project directory.","type":"string"},"top":{"default":25,"maximum":1000,"minimum":1,"type":"integer"}},"required":["projectDir","environment"],"type":"object"},"name":"size_report"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List Boards"},"description":"Lists all available PlatformIO boards with optional filtering by platform, framework, or MCU. Supports 1000+ boards across 30+ platforms.","inputSchema":{"properties":{"filter":{"description":"Optional filter by platform (e.g., \"espressif32\"), framework (e.g., \"arduino\"), or MCU name","type":"string"}},"type":"object"},"name":"list_boards"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get Board Info"},"description":"Gets detailed information about a specific board including MCU, frequency, flash, RAM, and supported frameworks.","inputSchema":{"properties":{"boardId":{"description":"Board ID (e.g., \"esp32dev\", \"uno\", \"nucleo_f401re\")","type":"string"}},"required":["boardId"],"type":"object"},"name":"get_board_info"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List Devices"},"description":"Lists all connected serial devices that can be used for firmware upload and monitoring.","inputSchema":{"properties":{},"type":"object"},"name":"list_devices"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Init Project"},"description":"Initializes a new PlatformIO project with the specified board and optional framework. Creates project structure with src/, include/, lib/, and test/ directories.","inputSchema":{"properties":{"board":{"description":"Board ID for the project","type":"string"},"framework":{"description":"Optional framework (e.g., \"arduino\", \"espidf\", \"mbed\")","type":"string"},"platformOptions":{"description":"Optional platform-specific configuration options","type":"object"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"}},"required":["board","projectDir"],"type":"object"},"name":"init_project"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Build Project"},"description":"Compiles the project and generates the firmware binary via PlatformIO. PREFERRED over running `pio run` directly in a shell — this tool integrates with the hardware lock, the content-hash build cache (skips toolchain work when src/ is unchanged), and a structured-error parser that returns `structuredErrors` + `nextSteps` alongside the raw log. Returns immediately on a cache hit (no compilation). Set `verbose=true` only when you need the full log; otherwise the response stays compact. Use `background=true` for very long first-time builds to avoid MCP timeouts and poll with `check_task_status`.","inputSchema":{"properties":{"background":{"description":"If true, dispatches the compilation to the background and returns immediately to prevent MCP timeouts. You must poll status subsequently.","type":"boolean"},"environment":{"description":"Optional specific environment to build from platformio.ini","type":"string"},"forceExecution":{"description":"Run a fresh build even when inputs match the cache","type":"boolean"},"jobs":{"description":"Optional parallel build jobs","maximum":1024,"minimum":1,"type":"integer"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"},"sessionId":{"description":"Agent session ID for pipeline lock validation","type":"string"},"verbose":{"description":"If true, returns the complete verbose build log in the result instead of truncating it on success","type":"boolean"}},"required":["projectDir"],"type":"object"},"name":"build_project"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Clean Project"},"description":"Removes build artifacts and compiled files from the project.","inputSchema":{"properties":{"background":{"description":"If true, dispatches the long-running execution to the background and returns immediately to prevent MCP timeouts. You must poll status subsequently.","type":"boolean"},"environment":{"description":"Optional environment to clean","pattern":"^[a-zA-Z0-9_-]{1,50}$","type":"string"},"full":{"description":"Also remove downloaded build dependencies using fullclean","type":"boolean"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"},"sessionId":{"description":"Agent session ID for pipeline lock validation","type":"string"}},"required":["projectDir"],"type":"object"},"name":"clean_project"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Upload Filesystem"},"description":"Builds and uploads a SPIFFS/LittleFS filesystem image to the connected device. PREFERRED over `pio run --target uploadfs` in a shell — same hardware-lock and port-auto-detect benefits as `upload_firmware`. Supports `start_monitor=true` to re-attach serial after upload.","inputSchema":{"properties":{"automationKey":{"description":"Stable scheduled-run key. Supplying this activates unattended automation policy.","maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$","type":"string"},"background":{"description":"If true, dispatches the compilation to the background and returns immediately to prevent MCP timeouts. You must poll status subsequently.","type":"boolean"},"environment":{"description":"Optional specific environment from platformio.ini","type":"string"},"maxRunDurationSeconds":{"description":"Required finite execution budget for an unattended write.","maximum":900,"minimum":1,"type":"integer"},"port":{"description":"Optional upload port (auto-detected if not specified)","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"},"sessionId":{"description":"Agent session ID for pipeline lock validation","type":"string"},"start_monitor":{"description":"If true, automatically starts the background serial monitor after a successful upload, handling OS-level port re-enumeration.","type":"boolean"},"targetBinding":{"description":"Short-lived exact target binding returned by agent_resolve_target.","properties":{"board":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"deviceFingerprint":{"maxLength":64,"minLength":64,"type":"string"},"digest":{"maxLength":64,"minLength":64,"type":"string"},"environment":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"port":{"type":"string"},"projectDir":{"type":"string"}},"required":["digest","projectDir","environment","board","port","deviceFingerprint","createdAt","expiresAt"],"type":"object"},"verbose":{"description":"If true, returns the complete verbose upload log in the result instead of truncating it","type":"boolean"}},"required":["projectDir"],"type":"object"},"name":"upload_filesystem"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Upload Firmware"},"description":"Uploads compiled firmware to a connected device. PREFERRED over `pio run --target upload` in a shell — this tool routes through the hardware lock to serialize port access, auto-detects the port, and (with `start_monitor=true`) re-attaches the serial monitor after the device re-enumerates. Automatically rebuilds via `build_project` semantics if the cache is cold.","inputSchema":{"properties":{"automationKey":{"description":"Stable scheduled-run key. Supplying this activates unattended automation policy.","maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$","type":"string"},"background":{"description":"If true, dispatches the compilation to the background and returns immediately to prevent MCP timeouts. You must poll status subsequently.","type":"boolean"},"environment":{"description":"Optional specific environment from platformio.ini","type":"string"},"maxRunDurationSeconds":{"description":"Required finite execution budget for an unattended write.","maximum":900,"minimum":1,"type":"integer"},"port":{"description":"Optional upload port (auto-detected if not specified)","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"},"sessionId":{"description":"Agent session ID for pipeline lock validation","type":"string"},"start_monitor":{"description":"If true, automatically starts the background serial monitor after a successful upload, handling OS-level port re-enumeration.","type":"boolean"},"targetBinding":{"description":"Short-lived exact target binding returned by agent_resolve_target.","properties":{"board":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"deviceFingerprint":{"maxLength":64,"minLength":64,"type":"string"},"digest":{"maxLength":64,"minLength":64,"type":"string"},"environment":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"port":{"type":"string"},"projectDir":{"type":"string"}},"required":["digest","projectDir","environment","board","port","deviceFingerprint","createdAt","expiresAt"],"type":"object"},"verbose":{"description":"If true, returns the complete verbose upload log in the result instead of truncating it","type":"boolean"}},"required":["projectDir"],"type":"object"},"name":"upload_firmware"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Acquire Lock"},"description":"Explicitly claim the hardware queue lock for multi-step tasks. Throws if already held.","inputSchema":{"properties":{"reason":{"description":"Reason for locking","type":"string"},"sessionId":{"description":"Your active Session ID","type":"string"}},"required":["sessionId"],"type":"object"},"name":"acquire_lock"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Release Lock"},"description":"Release the explicit queue lock matching your session ID.","inputSchema":{"properties":{"sessionId":{"description":"Your active Session ID","type":"string"}},"required":["sessionId"],"type":"object"},"name":"release_lock"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get Lock Status"},"description":"Reveals who currently owns the hardware queue lock.","inputSchema":{"properties":{},"type":"object"},"name":"get_lock_status"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":true,"readOnlyHint":true,"title":"Search Libraries"},"description":"Searches the PlatformIO library registry for available libraries by name, keywords, or description.","inputSchema":{"properties":{"limit":{"description":"Maximum number of results (default: 20)","type":"number"},"query":{"description":"Search query (library name, keyword, or description)","type":"string"}},"required":["query"],"type":"object"},"name":"search_libraries"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Install Library"},"description":"Installs a library from the PlatformIO registry either globally or to a specific project. Supports version specification.","inputSchema":{"properties":{"global":{"description":"If true, performs the operation globally. Defaults to false.","type":"boolean"},"library":{"description":"Library name or ID to install","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"},"version":{"description":"Optional specific version (e.g., \"1.0.0\", \"^2.1.0\")","type":"string"}},"required":["library"],"type":"object"},"name":"install_library"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List Installed Libraries"},"description":"Lists all installed libraries either globally or for a specific project.","inputSchema":{"properties":{"global":{"description":"If true, performs the operation globally. Defaults to false.","type":"boolean"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"}},"type":"object"},"name":"list_installed_libraries"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Start Monitor"},"description":"Manually start or restart the background serial-to-disk spooler for a specific device.","inputSchema":{"properties":{"baudRate":{"description":"Optional baud rate. Defaults to 115200.","type":"number"},"environment":{"description":"Optional PlatformIO environment context.","type":"string"},"port":{"description":"Optional COM path. Falls back to default.","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"}},"type":"object"},"name":"start_monitor"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Stop Monitor"},"description":"Kills the active background serial listener and unlocks the UART.","inputSchema":{"properties":{"port":{"description":"COM port to stop listening on.","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"}},"required":["port"],"type":"object"},"name":"stop_monitor"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Query Logs"},"description":"Scans the latest active background serial trace spool, returning a filtered string block.","inputSchema":{"properties":{"lines":{"description":"Fetch this many tail lines from the end of the log (default: 100)","type":"number"},"port":{"description":"Specific COM port to query logs for.","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"},"searchPattern":{"description":"Optional Regex pattern to filter the spool for specific keywords.","type":"string"}},"type":"object"},"name":"query_logs"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Reset Server State"},"description":"Forcefully cleans all server locks and terminates any tracked daemon or compilation PIDs globally or locally.","inputSchema":{"properties":{"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"}},"type":"object"},"name":"reset_server_state"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Check Task Status"},"description":"Polls the status of an ongoing background task. Returns a JSON object where `status` indicates the success of the polling operation itself, and `targetStatus` (running, failed, completed) indicates the state of the actual background task.","inputSchema":{"properties":{"logPath":{"description":"Optional relative log path to check.","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"},"taskId":{"description":"Optional task ID to check status.","type":"string"}},"type":"object"},"name":"check_task_status"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get Dashboard Url"},"description":"Retrieves the address and auth token for the MCP Web Dashboard. Automatically starts the web server on demand if offline.","inputSchema":{"properties":{"open":{"description":"If true, automatically opens the authenticated GUI link natively in the system's browser.","type":"boolean"}},"type":"object"},"name":"get_dashboard_url"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get Project Context"},"description":"Returns a compact pre-flight snapshot of a PlatformIO project: declared environments, source files under src/, `lib_deps`, build-cache state, firmware artifact path, connected serial devices, and a `nextSteps` checklist. Call this FIRST when starting work on a project instead of issuing several read_file/list_devices/cat-log calls — it collapses that ritual into a single deterministic response. Pure I/O, no toolchain invocation; safe to call repeatedly.","inputSchema":{"properties":{"includeBuildHistory":{"description":"If true, include the most recent build/upload status summary from the workspace log directory.","type":"boolean"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"}},"required":["projectDir"],"type":"object"},"name":"get_project_context"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get Project Config"},"description":"Dumps platformio.ini JSON.","inputSchema":{"properties":{"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"}},"required":["projectDir"],"type":"object"},"name":"get_project_config"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Agent Validate Project"},"description":"Agent-oriented pre-flight validation for a PlatformIO project. Reports environments, board IDs, source-file presence, config gaps, connected devices, and recommended next actions.","inputSchema":{"properties":{"projectDir":{"description":"Path to the PlatformIO project directory.","type":"string"}},"required":["projectDir"],"type":"object"},"name":"agent_validate_project"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Agent Build Diagnose"},"description":"Runs build_project and returns rich structured diagnostics with error taxonomy, evidence, severity, retry-safety, and resource usage (RAM/Flash).","inputSchema":{"properties":{"background":{"description":"If true, dispatches build to background and returns a pending diagnostic status.","type":"boolean"},"environment":{"description":"Optional specific environment from platformio.ini.","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory.","type":"string"},"verbose":{"description":"If true, preserves verbose build output.","type":"boolean"}},"required":["projectDir"],"type":"object"},"name":"agent_build_diagnose"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Agent Safe Pin Audit"},"description":"Heuristic static pin audit for board-specific GPIO risks (ESP32 strapping/input-only/flash pins).","inputSchema":{"properties":{"boardId":{"description":"Target PlatformIO board ID.","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory.","type":"string"}},"required":["projectDir","boardId"],"type":"object"},"name":"agent_safe_pin_audit"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Agent Flash Monitor Verify"},"description":"Builds (optionally), flashes firmware with monitor restart, then verifies runtime serial output against expected/rejected patterns and stability criteria.","inputSchema":{"properties":{"autoBuild":{"description":"If true, builds before flashing when firmware artifact is missing.","type":"boolean"},"automationKey":{"description":"Stable scheduled-run key. Supplying this activates unattended automation policy.","maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$","type":"string"},"environment":{"description":"Optional specific environment from platformio.ini.","type":"string"},"expect_all":{"description":"Serial markers expected to appear.","items":{"type":"string"},"type":"array"},"maxRunDurationSeconds":{"description":"Required finite execution budget for an unattended write.","maximum":900,"minimum":1,"type":"integer"},"port":{"description":"Optional upload port.","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory.","type":"string"},"reject_patterns":{"description":"Serial patterns that must not appear.","items":{"type":"string"},"type":"array"},"stabilityWindowSeconds":{"description":"Required quiet window in seconds (default 10).","type":"number"},"targetBinding":{"description":"Short-lived exact target binding returned by agent_resolve_target.","properties":{"board":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"deviceFingerprint":{"maxLength":64,"minLength":64,"type":"string"},"digest":{"maxLength":64,"minLength":64,"type":"string"},"environment":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"port":{"type":"string"},"projectDir":{"type":"string"}},"required":["digest","projectDir","environment","board","port","deviceFingerprint","createdAt","expiresAt"],"type":"object"},"timeoutSeconds":{"description":"Verification window in seconds (default 45).","type":"number"}},"required":["projectDir"],"type":"object"},"name":"agent_flash_monitor_verify"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Agent Get Last Report"},"description":"Returns the last persisted agent report from .pio-mcp-workspace/lastAgentReport.json.","inputSchema":{"properties":{"projectDir":{"description":"Path to the PlatformIO project directory.","type":"string"}},"required":["projectDir"],"type":"object"},"name":"agent_get_last_report"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Agent Generate Board Report"},"description":"Generates a compact board intelligence report and caches it in .pio-mcp-workspace/boardReport.json.","inputSchema":{"properties":{"boardId":{"description":"Target PlatformIO board ID.","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory.","type":"string"}},"required":["projectDir","boardId"],"type":"object"},"name":"agent_generate_board_report"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Get Policy Status"},"description":"Returns the active policy profile and allowed/approval-required/denied operations.","inputSchema":{"properties":{"projectDir":{"description":"Optional project directory to resolve local policy profile context.","type":"string"}},"type":"object"},"name":"get_policy_status"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Resolve PlatformIO Target"},"description":"Resolves exactly one PlatformIO environment, board, and attached physical device. Returns ambiguity instead of guessing and issues a short-lived binding for write workflows.","inputSchema":{"properties":{"bindingTtlSeconds":{"maximum":900,"minimum":30,"type":"integer"},"environment":{"description":"Optional declared PlatformIO environment.","type":"string"},"port":{"description":"Optional exact attached serial port.","type":"string"},"projectDir":{"description":"Exact PlatformIO project directory.","type":"string"}},"required":["projectDir"],"type":"object"},"name":"agent_resolve_target"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Inspect Serial Monitor"},"description":"Reports active, inactive, or stale serial monitor state with a bounded incremental cursor.","inputSchema":{"properties":{"port":{"description":"Optional exact serial port.","type":"string"},"projectDir":{"description":"Optional exact PlatformIO project directory.","type":"string"}},"type":"object"},"name":"get_monitor_status"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Capture Serial Window"},"description":"Acquires a bounded serial-monitor lease, captures redacted incremental output, and restores or releases resources on every exit path.","inputSchema":{"properties":{"automationKey":{"description":"Stable scheduled-run key. Supplying this activates unattended automation policy.","maxLength":80,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$","type":"string"},"baudRate":{"maximum":2000000,"minimum":1,"type":"integer"},"cursor":{"maxLength":512,"type":"string"},"durationSeconds":{"maximum":60,"minimum":1,"type":"integer"},"environment":{"type":"string"},"maxBytes":{"maximum":65536,"minimum":256,"type":"integer"},"port":{"type":"string"},"projectDir":{"type":"string"},"targetBinding":{"description":"Short-lived exact target binding returned by agent_resolve_target.","properties":{"board":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"deviceFingerprint":{"maxLength":64,"minLength":64,"type":"string"},"digest":{"maxLength":64,"minLength":64,"type":"string"},"environment":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"port":{"type":"string"},"projectDir":{"type":"string"}},"required":["digest","projectDir","environment","board","port","deviceFingerprint","createdAt","expiresAt"],"type":"object"}},"required":["projectDir"],"type":"object"},"name":"capture_serial_window"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Evaluate Serial Health"},"description":"Resolves one device, performs a bounded serial capture, evaluates health markers, and persists change-only automation state when automationKey is provided.","inputSchema":{"properties":{"automationKey":{"maxLength":80,"type":"string"},"baudRate":{"maximum":2000000,"minimum":1,"type":"integer"},"captureDurationSeconds":{"maximum":60,"minimum":1,"type":"integer"},"cursor":{"maxLength":512,"type":"string"},"environment":{"type":"string"},"expectedMarkers":{"items":{"maxLength":128,"type":"string"},"maxItems":20,"type":"array"},"failureThreshold":{"maximum":10,"minimum":1,"type":"integer"},"maxBytes":{"maximum":65536,"minimum":256,"type":"integer"},"port":{"type":"string"},"projectDir":{"type":"string"},"rejectedPatterns":{"items":{"maxLength":128,"type":"string"},"maxItems":20,"type":"array"}},"required":["projectDir"],"type":"object"},"name":"agent_monitor_health"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Cancel PlatformIO Task"},"description":"Idempotently cancels one known background task and releases only resources proven to be owned by that task.","inputSchema":{"properties":{"projectDir":{"type":"string"},"taskId":{"maxLength":128,"type":"string"}},"required":["taskId"],"type":"object"},"name":"cancel_task"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List PlatformIO Tasks"},"description":"Returns compact project-scoped task history after reconciling stale tracked processes.","inputSchema":{"properties":{"limit":{"maximum":100,"minimum":1,"type":"integer"},"projectDir":{"type":"string"},"status":{"enum":["inactive","running","success","error","terminated"],"type":"string"}},"required":["projectDir"],"type":"object"},"name":"list_task_history"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Inspect Approval Request"},"description":"Reads one approval request and expiry without exposing approve or deny mutations to the agent.","inputSchema":{"properties":{"approvalId":{"maxLength":128,"type":"string"},"projectDir":{"type":"string"}},"required":["approvalId"],"type":"object"},"name":"get_approval_request"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List Pending Approvals"},"description":"Lists pending project-scoped approval requests without exposing any approval mutation.","inputSchema":{"properties":{"limit":{"maximum":100,"minimum":1,"type":"integer"},"projectDir":{"type":"string"}},"type":"object"},"name":"list_pending_approvals"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"System Info"},"description":"Gets sys diagnostic path output.","inputSchema":{"properties":{},"type":"object"},"name":"system_info"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Check Project"},"description":"Static analysis validation.","inputSchema":{"properties":{"background":{"description":"Run slow analysis in background","type":"boolean"},"environment":{"description":"Specific environment to check","type":"string"},"pattern":{"description":"Source file pattern","maxLength":4096,"minLength":1,"type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"},"severity":{"description":"Minimum defect severity","enum":["low","medium","high"],"type":"string"},"skipPackages":{"description":"Exclude dependency source files","type":"boolean"},"structuredReport":{"description":"Request JSON analysis and return structured defects for foreground calls","type":"boolean"},"tool":{"description":"Configured analysis tool","maxLength":4096,"minLength":1,"type":"string"}},"required":["projectDir"],"type":"object"},"name":"check_project"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Run Tests"},"description":"Validates unit tests locally/remote.","inputSchema":{"properties":{"background":{"description":"Run testing in background","type":"boolean"},"compileOnly":{"description":"Compile tests without uploading or executing them. Enforced by build_only policy.","type":"boolean"},"environment":{"description":"Specific environment to test","type":"string"},"filter":{"description":"Include matching test suites","maxLength":4096,"minLength":1,"type":"string"},"ignore":{"description":"Exclude matching test suites","maxLength":4096,"minLength":1,"type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"},"structuredReport":{"description":"Include per-case results for foreground runs; cannot be combined with background","type":"boolean"},"uploadPort":{"description":"Explicit test upload port","maxLength":512,"minLength":1,"type":"string"},"verbose":{"description":"Verbose test output","type":"boolean"},"withoutBuilding":{"description":"Use existing test artifacts; incompatible with compile-only","type":"boolean"},"withoutUploading":{"description":"Skip upload; test execution may still access hardware","type":"boolean"}},"required":["projectDir"],"type":"object"},"name":"run_tests"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Uninstall Library"},"description":"Removes target library.","inputSchema":{"properties":{"global":{"description":"If true, performs the operation globally. Defaults to false.","type":"boolean"},"library":{"description":"Library name or ID to uninstall","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"}},"required":["library"],"type":"object"},"name":"uninstall_library"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Update Library"},"description":"Upgrades library versions.","inputSchema":{"properties":{"global":{"description":"If true, performs the operation globally. Defaults to false.","type":"boolean"},"library":{"description":"Library name or ID to update","type":"string"},"projectDir":{"description":"Path to the PlatformIO project directory. Agents SHOULD ALWAYS explicitly provide this to ensure operations execute in the correct workspace, unless explicitly instructed otherwise.","type":"string"}},"required":["library"],"type":"object"},"name":"update_library"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Start Monitor"},"description":"Start an owned serial monitor using explicit arguments, resolved project settings, or an unambiguous device candidate. Opening requires hardware authorization and exclusive device ownership.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"type":"string"},"baud":{"maximum":4000000,"minimum":1,"type":["integer","null"]},"config_approval_id":{"type":"string"},"discovery_approval_id":{"type":"string"},"env":{"type":["string","null"]},"max_lines":{"default":5000,"maximum":10000,"minimum":1,"type":"integer"},"port":{"maxLength":512,"type":["string","null"]},"project_dir":{"type":["string","null"]},"selection_approval_id":{"type":"string"}},"type":"object"},"name":"serial_session_start"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Read Monitor"},"description":"Read an owned monitor with cursors and bounded Python-compatible regex matching on completed lines. Maximum wait 120 seconds; response and storage byte limits apply.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"maxLength":256,"type":"string"},"cursor":{"default":0,"minimum":0,"type":"integer"},"max_lines":{"default":200,"maximum":10000,"minimum":1,"type":"integer"},"session_id":{"maxLength":256,"minLength":1,"type":"string"},"timeout_s":{"default":10,"type":"number"},"wait_for":{"maxLength":4096,"type":["string","null"]}},"required":["session_id"],"type":"object"},"name":"serial_session_read"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Write Monitor"},"description":"Write UTF-8 text to an owned serial session after payload-bound hardware authorization. Limited to 64 KiB including the optional newline.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"maxLength":256,"type":"string"},"newline":{"default":true,"type":"boolean"},"session_id":{"maxLength":256,"minLength":1,"type":"string"},"text":{"maxLength":65536,"type":"string"}},"required":["session_id","text"],"type":"object"},"name":"serial_session_write"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"Inspect Serial Monitor"},"description":"List this connection's authorized monitor sessions.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"type":"string"}},"type":"object"},"name":"serial_session_list"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false,"title":"Stop Monitor"},"description":"Close an owned monitor session, retaining device ownership until closure is confirmed.","inputSchema":{"additionalProperties":false,"properties":{"session_id":{"type":"string"}},"required":["session_id"],"type":"object"},"name":"serial_session_stop"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Capture Monitor"},"description":"Open, read and close an owned serial monitor. Both opening and reading must be authorized before startup; unconfirmed closure retains device ownership.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"type":"string"},"baud":{"maximum":4000000,"minimum":1,"type":["integer","null"]},"config_approval_id":{"type":"string"},"discovery_approval_id":{"type":"string"},"env":{"type":["string","null"]},"max_lines":{"default":500,"maximum":10000,"minimum":1,"type":"integer"},"port":{"maxLength":512,"type":["string","null"]},"project_dir":{"type":["string","null"]},"read_approval_id":{"maxLength":256,"type":"string"},"seconds":{"default":5,"type":"number"},"selection_approval_id":{"type":"string"},"until":{"maxLength":4096,"type":["string","null"]}},"type":"object"},"name":"monitor_capture"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Watch Memory"},"description":"Collect bounded heap/stack telemetry from an owned session or an authorized temporary monitor. Reports sample-window trends, explicit unknown units and incomplete collection; does not prove a memory leak.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"type":"string"},"baud":{"maximum":4000000,"minimum":1,"type":["integer","null"]},"config_approval_id":{"type":"string"},"discovery_approval_id":{"type":"string"},"env":{"type":["string","null"]},"max_lines":{"default":5000,"maximum":10000,"minimum":1,"type":"integer"},"pattern":{"maxLength":4096,"type":["string","null"]},"port":{"maxLength":512,"type":["string","null"]},"project_dir":{"type":["string","null"]},"read_approval_id":{"maxLength":256,"type":"string"},"seconds":{"default":15,"type":"number"},"selection_approval_id":{"type":"string"},"session_id":{"type":["string","null"]},"stack_unit":{"enum":["bytes","words"],"type":"string"},"stack_warn_bytes":{"default":512,"minimum":0,"type":"integer"},"stack_word_bytes":{"maximum":16,"minimum":1,"type":"integer"}},"type":"object"},"name":"memory_watch"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"List Devices"},"description":"Inspect serial-port presence, permissions and observed holders without opening or closing the device. Missing holder evidence does not prove availability.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"maxLength":256,"type":"string"},"config_approval_id":{"maxLength":256,"type":"string"},"env":{"maxLength":50,"type":["string","null"]},"monitor_approval_id":{"maxLength":256,"type":"string"},"port":{"maxLength":512,"type":["string","null"]},"project_dir":{"maxLength":32768,"type":["string","null"]},"selection_approval_id":{"maxLength":256,"type":"string"}},"type":"object"},"name":"port_diagnose"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"power_profile"},"description":"Collect bounded serial current samples or PPK2 meter windows. PPK2 requires explicit mode, voltage/current limits, DUT port plus configured PIO_MCP_PPK2_ENV. An omitted meter port selects one matching PPK2 USB endpoint; ambiguous endpoints require explicit selection. Source mode requires independent power permission. operation=list/cleanup inspects or retries this connection's retained meter cleanup. An owned serial trigger retains DUT custody through meter cleanup. Explicit multi-interface selection pins the observed interface set and retains whole-device exclusion; physical acceptance is pending.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"maxLength":256,"type":"string"},"baud":{"default":115200,"maximum":4000000,"minimum":1,"type":"integer"},"buckets":{"default":20,"maximum":1000,"minimum":0,"type":"integer"},"config_approval_id":{"maxLength":256,"type":"string"},"current_limit_ma":{"exclusiveMinimum":0,"maximum":1000,"type":"number"},"discovery_approval_id":{"maxLength":256,"type":"string"},"dut_port":{"maxLength":512,"type":"string"},"env":{"type":["string","null"]},"host_approval_id":{"maxLength":256,"type":"string"},"max_lines":{"maximum":10000,"minimum":1,"type":"integer"},"mode":{"enum":["ampere","source"],"type":"string"},"operation":{"default":"profile","enum":["profile","list","cleanup"],"type":"string"},"pattern":{"maxLength":4096,"type":["string","null"]},"port":{"maxLength":512,"type":["string","null"]},"power_approval_id":{"maxLength":256,"type":"string"},"power_operation_id":{"format":"uuid","type":"string"},"profile_approval_id":{"maxLength":256,"type":"string"},"project_dir":{"maxLength":32768,"type":["string","null"]},"provenance":{"enum":["firmware_estimate","external_meter","unspecified_serial"],"type":"string"},"read_approval_id":{"maxLength":256,"type":"string"},"seconds":{"default":10,"exclusiveMinimum":0,"maximum":600,"type":"number"},"selection_approval_id":{"maxLength":256,"type":"string"},"sleep_threshold_ma":{"maximum":1000000000,"minimum":-1000000000,"type":["number","null"]},"source":{"default":"serial","enum":["serial","ppk2"],"type":"string"},"trigger":{"maxLength":4096,"type":["string","null"]},"trigger_approval_id":{"maxLength":256,"type":"string"},"trigger_seconds":{"description":"Trigger wait limit; defaults to seconds when omitted.","exclusiveMinimum":0,"maximum":600,"type":"number"},"trigger_session_id":{"maxLength":256,"type":["string","null"]},"voltage_mv":{"exclusiveMinimum":0,"maximum":1000000000,"type":["number","null"]}},"type":"object"},"name":"power_profile"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"debug_start"},"description":"Build and start a connection-owned GDB session using PlatformIO's generated initialization, an identified USB probe and a local OpenOCD or J-Link backend. Host execution and target effects require separate permissions. Probe custody remains held until owned descendant groups close.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"maxLength":256,"minLength":1,"type":"string"},"backend_host_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"backend_target_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"build_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"config_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"discovery_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"env":{"type":["string","null"]},"image_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"initialization_host_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"initialization_target_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"load":{"default":true,"type":"boolean"},"probe":{"additionalProperties":false,"properties":{"product_id":{"pattern":"^(?:0x)?[a-fA-F0-9]{4}$","type":"string"},"serial_number":{"maxLength":256,"minLength":1,"type":"string"},"vendor_id":{"pattern":"^(?:0x)?[a-fA-F0-9]{4}$","type":"string"}},"type":"object"},"project_dir":{"type":["string","null"]},"request_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"resolution_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"system_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"timeout_s":{"default":90,"maximum":600,"minimum":0.001,"type":"number"}},"required":[],"type":"object"},"name":"debug_start"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"debug_cmd"},"description":"Send a classified GDB/MI or console command to this connection's session. Inspection, target mutation and privileged host commands are authorized separately. Timeout does not halt a running target.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"maxLength":256,"minLength":1,"type":"string"},"command":{"maxLength":65536,"minLength":1,"type":"string"},"request_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"session_id":{"format":"uuid","type":"string"},"target_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"timeout_s":{"default":30,"maximum":600,"minimum":0.001,"type":"number"}},"required":["session_id","command"],"type":"object"},"name":"debug_cmd"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"debug_stop"},"description":"Run the configured reset/run hook with host and target permissions, then close owned GDB/backend process groups and release probe custody. Set process_only for recovery without target commands; failed cleanup retains the session for retry.","inputSchema":{"additionalProperties":false,"properties":{"host_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"process_only":{"default":false,"type":"boolean"},"request_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"session_id":{"format":"uuid","type":"string"},"target_approval_id":{"maxLength":256,"minLength":1,"type":"string"},"timeout_s":{"default":30,"maximum":600,"minimum":0.001,"type":"number"}},"required":["session_id"],"type":"object"},"name":"debug_stop"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true,"title":"debug_list"},"description":"List this connection's debugger sessions, observed target state and pending cleanup. Does not enumerate another connection's sessions or contact hardware.","inputSchema":{"additionalProperties":false,"properties":{"request_approval_id":{"maxLength":256,"minLength":1,"type":"string"}},"required":[],"type":"object"},"name":"debug_list"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false,"title":"Upload Firmware"},"description":"Upload ESP32/ESP8266 firmware or filesystem images over ArduinoOTA using a fixed network target, immutable image and private credentials. Build and uploader permissions are separate; transfer success does not verify runtime health.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"maxLength":256,"type":"string"},"auth":{"default":null,"maxLength":1024,"type":["string","null"]},"build":{"default":true,"type":"boolean"},"build_approval_id":{"maxLength":256,"type":"string"},"command_approval_id":{"maxLength":256,"type":"string"},"config_approval_id":{"maxLength":256,"type":"string"},"elf_path":{"maxLength":32768,"minLength":1,"type":"string"},"env":{"default":null,"type":["string","null"]},"expected_image_sha256":{"pattern":"^[a-fA-F0-9]{64}$","type":"string"},"filesystem":{"default":false,"type":"boolean"},"host":{"maxLength":253,"minLength":1,"type":"string"},"image_approval_id":{"maxLength":256,"type":"string"},"image_path":{"type":"string"},"port":{"default":null,"maximum":65535,"minimum":1,"type":["integer","null"]},"project_dir":{"default":null,"type":["string","null"]},"resolve_approval_id":{"maxLength":256,"type":"string"},"system_approval_id":{"maxLength":256,"type":"string"},"timeout_s":{"default":180,"maximum":600,"minimum":0.001,"type":"number"},"verify_reachable":{"default":true,"type":"boolean"}},"required":["host"],"type":"object"},"name":"upload_ota"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Agent Flash Monitor Verify"},"description":"Build and upload firmware, verify fresh owned serial boot output, and decode crashes when authorized. Preserves quiet-window/crash checks; reports incomplete evidence and unverified firmware identity explicitly.","inputSchema":{"additionalProperties":false,"properties":{"approval_id":{"maxLength":256,"type":"string"},"baud":{"default":null,"maximum":4000000,"minimum":1,"type":["integer","null"]},"config_approval_id":{"maxLength":256,"type":"string"},"decode_approval_id":{"maxLength":256,"type":"string"},"decode_config_approval_id":{"maxLength":256,"type":"string"},"discovery_approval_id":{"maxLength":256,"type":"string"},"env":{"default":null,"type":["string","null"]},"expect":{"default":"setup done|ready|started|Booting|loop","maxLength":4096,"type":"string"},"fail_on":{"default":"Guru Meditation|panic'ed|abort\\(\\) was called|assert failed|HardFault|Hard Fault|BusFault|UsageFault|MemManage|stack overflow|Task watchdog|Brownout|CORRUPT HEAP|Backtrace:|rst:0x[0-9a-f]+ \\((?:SW_CPU_RESET|TG\\dWDT_SYS_RESET|RTCWDT_RTC_RESET|PANIC)","maxLength":4096,"type":"string"},"manifest_approval_id":{"maxLength":256,"type":"string"},"max_lines":{"default":500,"maximum":10000,"minimum":1,"type":"integer"},"monitor_approval_id":{"maxLength":256,"type":"string"},"monitor_port":{"default":null,"type":["string","null"]},"preflight_discovery_approval_id":{"maxLength":256,"type":"string"},"project_dir":{"default":null,"type":["string","null"]},"read_approval_id":{"maxLength":256,"type":"string"},"resume_id":{"format":"uuid","type":"string"},"selection_approval_id":{"maxLength":256,"type":"string"},"settle_s":{"default":1.5,"maximum":20,"minimum":0,"type":"number"},"stability_window_s":{"default":10,"maximum":60,"minimum":0,"type":"number"},"stop_open_sessions":{"default":false,"type":"boolean"},"system_approval_id":{"maxLength":256,"type":"string"},"timeout_s":{"default":30,"maximum":300,"minimum":0,"type":"number"},"upload_port":{"default":null,"type":["string","null"]},"workflow_approval_id":{"maxLength":256,"type":"string"}},"required":[],"type":"object"},"name":"flash_verification"}]}}}
