Skip to main content
Glama
Gearotons

servomotor-mcp

set_pid_constants

Adjust PID gains (kP, kI, kD) for a motor to tune its control loop and maintain motion trajectory. Correct gains prevent violent oscillation.

Instructions

Set PID constants for the control loop that will try to maintain the motion trajectory. [Firmware command "Set PID constants", group: Configuration.] NOTE: Bad gains can make the motor oscillate violently. Parameters:

  • kP: The proportional term constant (P)

  • kI: The integral term constant (I)

  • kD: The differential term constant (D) Returns: success confirmation. motor: an alias number (e.g. 88), a 16-hex-digit unique ID (e.g. "0123456789ABCDEF"), or "all" to broadcast to every motor on the bus (broadcasts get no responses back).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kDYes
kIYes
kPYes
motorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral burden. It does add an important safety warning ('Bad gains can make the motor oscillate violently') and clarifies that broadcasting to 'all' receives no responses. However, it omits details about whether the constants are applied immediately, whether the change is persistent, or what other side effects might occur on the motion loop.

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?

The description is separated into logical lines: intent, firmware metadata, safety note, parameter list, return note, and motor argument detail. Each sentence contributes a necessary piece of information and nothing is redundant. It is a bit longer than strictly needed, but the structure makes it well suited for an agent to parse.

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?

Given that there is no output schema and no annotations, the description covers the important pitfalls: return value, motor selector variants, and the no-response behavior on broadcasts. It also warns about dangerous gains. While it does not mention whether constants apply immediately or if there are command prerequisites, these gaps do not block a typical invocation of this configuration tool.

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

Parameters4/5

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

Schema description coverage is 0%, so the description provides the entire parameter semantics for all four fields. It explains what kP, kI, and kD stand for, and it expands the motor parameter with concrete forms (alias/decimal ID/id, 'all') and the broadcast no-response behavior. This goes well beyond the bare type/title information in the schema, though it remains silent on value ranges or units.

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 uses a specific verb and resource: 'Set PID constants for the control loop that will try to maintain the motion trajectory.' It clearly communicates the tool's effect and distinguishes it from the many other set_* siblings by explicitly targeting PID parameters. It doesn't name a sibling alternative, but the resource name is specific enough to prevent confusion.

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 explicit guidance about when to use this tool instead of other configuration tools (e.g. set_maximum_velocity, set_maximum_acceleration, set_max_allowable_position_deviation), nor any exclusion conditions. The context is implied only by the phrase 'control loop' and the warning about bad gains, so the description does not help an agent decide between alternatives.

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