Skip to main content
Glama

Set Debug Log Api

set_debug_log_api
Destructive

Toggle the local node's debug log API so firmware streams LogRecord protobufs over StreamAPI, letting the recorder capture logs without a serial monitor or port conflict.

Instructions

Toggle security.debug_log_api_enabled on the local node.

When on, firmware streams its log lines as LogRecord protobufs over the StreamAPI, so the recorder captures them through the same connection the admin tools use, with no pio device monitor session and no port-lock conflict. send_text(wait_for_tx=True) needs it. Persists across reboot (NVS); factory_reset wipes it. Safe to leave on under traffic.

Returns {ok, debug_log_api_enabled}.

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": {
      "enabled": "<enabled>"
    },
    "name": "set_debug_log_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoSerial port or `tcp://host[:port]`; omit to auto-select the one likely Meshtastic device.
enabledYesTrue turns the log stream on, False turns it off.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: persistence across reboot via NVS, that `factory_reset` wipes it, that it avoids port-lock conflicts, and that it is safe under traffic. This is exactly the context an agent needs for a state-changing toggle, and it does not contradict the destructive/openWorld hints.

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?

Tight, front-loaded, and every sentence carries operational information; no filler. Dense stack-trace-style jargon and inline backticks make it slightly harder to scan than plain prose, but nothing is wasted.

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

Completeness5/5

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

For a two-parameter toggle with full schema coverage, an output schema, and annotations covering the safety profile, the description covers effect, persistence, lifecycle interaction, and return keys. Nothing an agent needs in order to invoke it correctly is missing.

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 100%, so both parameters are already documented, and the description mostly restates the `enabled` meaning. It adds some value by explaining the downstream effect of enabling, but nothing about the `port` argument beyond what the schema says (auto-selection when omitted). Baseline 3 applies.

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 ("Toggle `security.debug_log_api_enabled` on the local node") and then explains the concrete effect — firmware streaming LogRecord protobufs over StreamAPI so the recorder captures logs without a `pio device monitor` session. An agent can distinguish this from `logs_window` or `send_text` 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 Guidelines4/5

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

Gives a clear enabling condition ("`send_text(wait_for_tx=True)` needs it") and practical advice ("Safe to leave on under traffic"), plus the persistence caveat. It does not name an explicit alternative for viewing logs without enabling this, so it stops short of full when/when-not routing.

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