Skip to main content
Glama
ethan-hub26

embedcalc-mcp

by ethan-hub26

I2C Timing & Pull-Up Calculator

embedcalc_i2c_timing
Read-onlyIdempotent

Compute I2C pull-up resistor range, verify SCL high/low timing margins, and estimate STM32 TIMINGR register from bus parameters.

Instructions

Compute I2C pull-up resistor range (Rp min from sink current, Rp max from rise time vs bus capacitance), SCL high/low budget, and an STM32 I2C TIMINGR register estimate.

Args:

  • mode: 'ls' (10k), 'sm' (100k), 'fm' (400k), 'fmp' (1M, 20mA sink), 'hs' (3.4M).

  • vdd (V, default 3.3), bus_capacitance_pf (default 100).

  • stm32_clock_mhz (default 16): I2CCLK kernel clock for the TIMINGR estimate.

Returns (structured): rp_min_ohm / rp_max_ohm, scl high/low vs spec minimums, rise/fall limits, stm32 { presc, scll, sclh, sdadel, scldel, timingr_hex }. The TIMINGR value is an estimate per RM formulas — verify on scope for production. Example: Fast-mode, 3.3V, 100pF -> Rp between ~967Ω and ~3.5kΩ (use 2.2k).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vddNoBus supply voltage in volts
modeNoBus speed mode: ls=10kHz, sm=100kHz, fm=400kHz, fmp=1MHz, hs=3.4MHzsm
stm32_clock_mhzNoSTM32 I2C kernel clock (I2CCLK) in MHz for TIMINGR estimate
bus_capacitance_pfNoTotal bus capacitance in pF (spec max 400 pF)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stm32Yes
rp_max_ohmYes
rp_min_ohmYes
scl_low_usYes
scl_high_usYes
t_fall_max_nsYes
t_rise_max_nsYes
target_freq_hzYes
scl_low_min_spec_usYes
scl_high_min_spec_usYes
Behavior4/5

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

Annotations already indicate readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description reinforces this by describing a pure computation and adds context about the estimate nature and verification recommendation, which is valuable beyond structured fields.

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 well-structured with clear sections for Args, Returns, and an Example. It is reasonably concise, though slightly verbose in listing Args compared to schema. Every sentence adds value.

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?

Given the complexity of I2C timing calculations and the presence of an output schema, the description fully explains inputs, outputs, and an example. It is complete for an agent to correctly invoke the tool and understand its results.

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 description coverage is 100%, so the baseline is 3. The description rephrases parameters and adds an example with typical values, providing slight additional value over the schema. It does not introduce entirely new semantics.

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 clearly states it computes I2C pull-up resistor range, SCL timing budget, and STM32 TIMINGR register estimate. The verb 'Compute' and specific resources ('Rp min/max', 'SCL high/low', 'TIMINGR') make the purpose unambiguous. Among sibling calculators, this is distinct as the only I2C timing tool.

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?

The description provides an example, lists arguments, and notes that the TIMINGR value is an estimate requiring production verification. However, it does not explicitly state when not to use this tool or compare to other calculators, which is acceptable for a specialized calculator.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ethan-hub26/embedcalc-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server