Skip to main content
Glama

pio_check

Run static analysis on PlatformIO firmware to detect code defects grouped and sorted by severity, returning file, line, CWE, and messages for targeted fixes.

Instructions

Static analysis (pio check, cppcheck by default; clangtidy/pvs-studio if configured). Returns defects grouped and sorted by severity with file, line, CWE, and message. severity is the minimum level to report (low|medium|high).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pio_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
toolNo
patternNo
severityNomedium
llm_modelNoThe model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics.
project_dirNo
skip_packagesNo
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.

Output Schema

NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.9.0
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as \"a customer\". Do not quote the user or include names, emails, or other personal details.",
      -  "type": "string"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "context"
      -]
  2. Changed5 schema fields changedv0.6.2
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as \"a customer\". Do not quote the user or include names, emails, or other personal details.",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The model identifier you are running as, for example \"claude-opus-4-8\" or \"gpt-5.2\". Pass \"unknown\" if you are not certain. Recorded for the server developer's analytics.",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "context"
      +]
    • addedOutput schema / properties
      Added value: +{
      +  "_mcp_instructions": {
      +    "description": "Server-issued metadata for this conversation.",
      +    "properties": {
      +      "conversation_id": {
      +        "description": "The server-issued conversation identifier.",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +}
  3. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the analyzer backend, the severity-based grouping/sorting, and the defect fields returned (file, line, CWE, message). It omits whether the run writes artifacts or requires a prior build, how long it may take, and any failure/empty-result behavior — meaningful gaps for a tool with zero annotation coverage.

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?

Three dense sentences with the core identity front-loaded, followed by return shape and the severity semantic. No filler or repetition of the tool name.

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?

An output schema exists, so return values need only light coverage, and the description handles the analyzer and severity dimensions well. However, for an 8-parameter tool with 0 required params and sparse schema descriptions, the unexplained scoping parameters (env, pattern, project_dir, skip_packages) leave the agent guessing how to narrow the analysis.

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 coverage is only 25% across 8 parameters, so the description must compensate. It adds real value for `tool` (default cppcheck, alternatives) and `severity` (spells out low|medium|high even though the schema declares no enum), but leaves env, pattern, project_dir, and skip_packages entirely unexplained in both places.

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?

The description names a specific verb+resource: static analysis via `pio check`, with the default analyzer (cppcheck) and configured alternatives (clangtidy, pvs-studio). 'Static analysis' is clearly distinct from the build/flash siblings in the catalog, so an agent can select it without opening the schema.

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

Usage Guidelines3/5

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

Usage is implied by the tool's nature (run it to surface code defects), but there is no explicit when-to-use/when-not guidance and no reference to alternatives such as pio_build or pio_deps_check. An agent must infer that this is the linting step rather than part of a compile pipeline.

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