Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Control Pid Tune

control_pid_tune

Computes P, PI, or PID gains from a first-order-plus-dead-time model using Ziegler-Nichols, Cohen-Coon, IMC, or SIMC rules, then simulates the loop to report overshoot, settling time, stability, and margins.

Instructions

PID tuning from a first-order-plus-dead-time model G = K exp(-L s)/(T s + 1): rule = ziegler_nichols (open-loop reaction curve), cohen_coon, imc (lambda tuning) or simc; controller = P, PI or PID; form = standard (Kc, Ti, Td) or parallel (Kp, Ki, Kd). Returns the gains with the formulas named, what the rule is meant for, and a closed-loop simulation (delay as a Pade approximation of the stated order, derivative filter N): overshoot, rise and settling time, stability by exact pole count, and gain/phase margins with the true delay. Starting points only.

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": {
      "gain": "<gain>",
      "time_constant": "<time_constant>",
      "delay": "<delay>"
    },
    "name": "control_pid_tune"
  }
}

Input Schema

NameRequiredDescriptionDefault
formNo'standard' Kc(1 + 1/(Ti s) + Td s) (default) or 'parallel' Kp + Ki/s + Kd sstandard
gainYesProcess gain K (> 0): change of output per unit change of controller output at steady state
ruleNo'ziegler_nichols', 'cohen_coon', 'imc' or 'simc'imc
delayYesDead time L with unit, e.g. '2 s' (must be > 0; L/T between 0.01 and 100)
controllerNo'P', 'PI' or 'PID' (imc and simc: PI or PID)PI
pade_orderNoOrder n (1..10) of the (n, n) Pade approximation of the delay in the simulated loop (default 3)
lambda_timeNoIMC/SIMC closed-loop time constant with unit, e.g. '3 s'. Empty = max(L, 0.1 T)
time_constantYesProcess time constant T with unit, e.g. '10 s'
derivative_filterNoDerivative filter ratio N in Td s/(1 + Td s/N) used in the simulation (2..100, default 10)

Output Schema

NameRequiredDescriptionDefault
okYes
dataNoNon-quantity payload (reports, listings)
errorNo
valueNoPrimary quantity result
valuesNoAll named quantity results (includes the primary)
warningsNo
artifactsNo
provenanceYesWhat produced the result and from which inputs.
review_statusNounreviewed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses that gains are returned alongside named formulas, a closed-loop simulation, Pade-approximated delay of the stated order, derivative filtering, stability by exact pole count, and gain/phase margins computed with the true delay. The caveat 'Starting points only' honestly frames the reliability of the result for a control-design tool.

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?

Information is front-loaded on the model form, then the enumerations, then the return contents, so an agent can stop reading early. It is a single very dense run-on sentence plus a fragment, which is efficient but slightly hard to parse; splitting the return-behavior clause would improve it without adding words.

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 9-parameter domain-specific computation with an output schema, the description supplies what the schema cannot: the modeling assumption behind the inputs, what each rule is intended for, how the validation loop is simulated (Pade order, filter N, true delay for margins), and the reliability caveat. Nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds genuine meaning beyond the schema by naming what each rule corresponds to in practice ('ziegler_nichols (open-loop reaction curve)', 'imc (lambda tuning)') and spelling out the standard (Kc, Ti, Td) versus parallel (Kp, Ki, Kd) form semantics. This helps an agent pick values rather than just read types.

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 opens with a specific verb+resource ('PID tuning from a first-order-plus-dead-time model') and immediately enumerates the rule, controller, and form axes, so an agent can tell exactly what computation this performs and how it differs from the sibling control_analyze/control_response tools.

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 rather than stated: the FOPDT model form (K, L, T) makes clear this tool only fits when you have a first-order-plus-dead-time process model, and the closing 'Starting points only' sets expectations. However, it never says when to prefer this over control_analyze or control_frequency, offers no exclusions, and gives no prerequisite guidance.

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

Deploy Server

Other Tools