Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Control Frequency

control_frequency

Compute Bode magnitude and phase, gain/phase/delay margins, bandwidth, and resonant peak for continuous or discrete SISO transfer functions, with closed-loop pole-count stability checks.

Instructions

Frequency response of a SISO transfer function (coefficient lists in descending powers or polynomial text; continuous, or domain='discrete' + sample_time). Returns Bode data (magnitude dB, unwrapped phase deg) on a log grid as a CSV artifact, DC gain, gain and phase margins with crossover frequencies, delay margin, -3 dB bandwidth and resonant peak. With closed_loop_check (default) it treats the input as an OPEN loop L with unity negative feedback and counts the closed-loop poles exactly; it states when the margins disagree with the pole count (conditionally stable or open-loop unstable loops), in which case trust the pole count.

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": {
      "numerator": "<numerator>",
      "denominator": "<denominator>"
    },
    "name": "control_frequency"
  }
}

Input Schema

NameRequiredDescriptionDefault
domainNo'continuous' (variable s, default) or 'discrete' (variable z; needs 'sample_time')continuous
pointsNoNumber of table points, 10 to 20000 (default 300)
numeratorYesNumerator polynomial: JSON list of coefficients in DESCENDING powers, e.g. '[1, 3]' for s+3, or text such as 's + 3'.
denominatorYesDenominator polynomial, same formats, e.g. '[1, 3, 2]' or 's^2 + 3 s + 2'. The leading coefficient must not be 0. Order at most 40, coefficients 1e-12..1e12 in magnitude.
sample_timeNoSample time with unit, e.g. '0.1 s'. Only with domain='discrete'; refused for a continuous model.
frequency_maxNoHighest table frequency in rad/s; 0 = automatic (discrete: up to the Nyquist frequency pi/T)
frequency_minNoLowest table frequency in rad/s; 0 = automatic from the poles and zeros
closed_loop_checkNoTreat the input as an open loop L and check unity-negative-feedback stability by counting characteristic-polynomial roots (default true)

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

A3.9/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose meaningful behavior: the result is a CSV artifact on a log grid, closed-loop pole counting is exact via the characteristic polynomial, and disagreement between margins and pole count indicates conditionally stable or open-loop unstable loops. It does not say how/where the CSV artifact is delivered or comment on runtime cost, so the disclosure stops short of complete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single dense paragraph is front-loaded with what the tool computes, then what it returns, then the closed_loop_check caveat, and every clause carries information. No filler or repeated name restatement.

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 complex 8-parameter analysis tool with an output schema and full schema coverage, the description covers purpose, output content, and the tricky interpretive caveat an agent would otherwise get wrong. Remaining details (numeric defaults, error conditions like 'leading coefficient must not be 0') live in the schema, where they belong.

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 all eight parameters are already documented in structured form; the description largely restates them (descending-power coefficient lists or polynomial text, discrete + sample_time, closed-loop check). It adds only modest meaning beyond the schema, chiefly the OPEN-loop/unity-feedback interpretation of the input, which is the appropriate baseline-3 level.

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 opens with a specific verb+resource: frequency response of a SISO transfer function, and enumerates exactly what is computed (Bode magnitude/phase, DC gain, gain/phase/delay margins, -3 dB bandwidth, resonant peak). It does not name any sibling (control_analyze, control_response) as an alternative, so an agent gets a clear purpose but must infer sibling differentiation on its own.

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?

It gives real guidance on one decision point: closed_loop_check defaults on and treats the input as an OPEN loop under unity negative feedback, and when margins disagree with the pole count, 'trust the pole count.' However, there is no when-to-use/when-not-to-use framing against the many sibling control_* tools (e.g., step/impulse response vs frequency response), so selection guidance is only implied.

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