Skip to main content
Glama

get_openocd_command_mode

Determine whether an OpenOCD command must run in configuration or runtime mode so you can issue it in the correct phase and avoid mode-related errors.

Instructions

Ask the running OpenOCD instance whether a command is config or runtime mode.

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": {
      "command_name": "<command_name>"
    },
    "name": "get_openocd_command_mode"
  }
}

Input Schema

NameRequiredDescriptionDefault
command_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does add one useful prerequisite ('the running OpenOCD instance'), but it never states that the lookup is read-only, what happens if the instance is not started, or what happens when command_name is unknown or ambiguous. For a query tool with zero annotation coverage, that leaves key behavior undisclosed.

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?

A single short sentence with no wasted words, and the action is front-loaded. It is efficient, though it is brief to the point of leaving gaps.

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?

The tool itself is simple (one string in, a mode classification out) and there is no output schema, so the description should at least say what the returned values are (config vs runtime) and how the query behaves on failure. It gestures at the return concept but does not fully specify it.

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

Parameters2/5

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

Schema coverage is 0% and the single required parameter command_name is undocumented in the schema. The description only implies the parameter names a command, without stating whether it should be a bare name, a namespaced path, or whether arguments are allowed. The description therefore fails to compensate for the schema gap.

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

Purpose4/5

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

The description names a specific verb ('ask ... whether') and a precise resource ('command is config or runtime mode'), so an agent knows this is a mode-lookup query rather than an execution or search tool. It does not explicitly name a sibling for contrast, but the resource is distinct enough to separate it from execute_openocd_command and search_openocd_commands.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no mention of alternatives. An agent must infer on its own that this is a pre-flight check worth doing before running a command, and must infer whether config-mode commands behave differently.

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