Skip to main content
Glama

engineering.pid_discrete_output

Read-onlyIdempotent

Computes the next discrete PID controller output by calculating the incremental change from the previous output using proportional, integral, and derivative terms.

Instructions

속도형(velocity form) 이산 PID의 새 출력 u_k=u_{k-1}+Δu를 구한다. Δu=Kp·Δe+Ki·e·Ts+Kd·(Δe−Δe_prev)/Ts. kp, ki, kd, sample_time Ts(0 초과), error_curr, error_prev, error_prev2, output_prev 는 Decimal 문자열. 반환: output, delta_u, p_term, i_term, d_term. 적분항은 현재 오차 e에 Ts를 곱하는 방식이며 출력 포화와 anti-windup은 없다.

Input Schema

NameRequiredDescriptionDefault
kdYes
kiYes
kpYes
error_currYes
error_prevYes
error_prev2Yes
output_prevYes
sample_timeYes

Output Schema

NameRequiredDescriptionDefault
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
d_termYes
i_termYes
outputYes
p_termYes
delta_uYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent), so the bar is lower; the description adds real behavioral context by disclosing that the integral term uses current error e·Ts and that output saturation and anti-windup are intentionally absent. That limitation is exactly what an agent needs to avoid misapplying the result.

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?

Front-loads the goal and formula, then packs param types, return fields, and caveats into tight sentences. Dense but no filler; every clause carries information.

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?

An output schema exists, yet the description still names the returned fields, and it fully specifies 8 undocumented params plus the no-saturation limitation. Complete enough to call correctly; only the when-to-use dimension remains thin.

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 0%, so the description must carry param meaning, and it does: all inputs are Decimal strings, Ts must be > 0, and the e/e_prev/e_prev2/output_prev roles are clear from the formula context. Slightly short on distinguishing error_prev vs error_prev2 for Kd's second difference.

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 (compute) and resource (new output u_k of a velocity-form discrete PID) and gives the defining formula, so the operation is unambiguous. No sibling competes for this function.

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?

Implies usage through the formula and the explicit 'no anti-windup/saturation' caveat, but never states when to pick this over, say, a positional PID or other engineering tools. Guidance is inferred rather than declared.

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