Skip to main content
Glama

Rake

Calculate watchdog register values

calc_watchdog_timeout
Read-onlyIdempotent

Computes the register values of a watchdog for a timeout, with the real timeout. Use it to set up a watchdog instead of working the prescaler and the reload value out by hand. It knows the STM32 independent watchdog (IWDG_PR and IWDG_RLR), the STM32 window watchdog (WDGTB and the counter) and the nRF watchdog (CRV). The timeout is never shorter than the one asked for.

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": {
      "watchdog": "<watchdog>",
      "timeout_ms": "<timeout_ms>"
    },
    "name": "calc_watchdog_timeout"
  }
}

Input Schema

NameRequiredDescriptionDefault
clock_hzNoThe clock of the watchdog in Hz. Default 32000 for stm32-iwdg (LSI) and 32768 for nrf-wdt. Required for stm32-wwdg: its APB clock.
watchdogYesstm32-iwdg, stm32-wwdg or nrf-wdt.
timeout_msYesThe wanted timeout in milliseconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive and closed-world, so the bar is lower; the description still adds real behavioral value by disclosing the rounding direction ('the timeout is never shorter than the one asked for') and which register set each supported family targets. It does not disclose the shape of the returned object beyond naming the registers, which keeps it from a 5.

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?

Punctuation-connective style with purpose front-loaded in the first sentence, then scope, then the rounding guarantee. Minor redundancy in the opening clause ('for a timeout, with the real timeout'), but no wasted sentences.

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?

For a 3-parameter, annotation-covered tool with no output schema, the description does enough: it names the outputs (register names) and the rounding guarantee, so an agent knows what it will get back. Missing only an explicit statement of the exact return field names.

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% and the schema already documents clock_hz defaults per family, the enum values, and the timeout bounds. The description only adds the family-to-register mapping implied by the watchdog enum, without additional syntax or unit guidance beyond what the schema provides.

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?

Specific verb ('Computes') plus resource ('register values of a watchdog for a timeout'), then enumerates exactly which registers are produced per family (IWDG_PR/IWDG_RLR, WDGTB/counter, CRV). An agent can distinguish this from lookup_register or the other calc_* timing tools immediately.

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

Usage Guidelines4/5

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

Gives clear usage context: use it to set up a watchdog rather than deriving prescaler and reload values by hand. It does not state when NOT to use it or name a sibling alternative (e.g. lookup_register for raw register semantics), so it stops short of full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources