Skip to main content
Glama
ethan-hub26

embedcalc-mcp

by ethan-hub26

Ring Buffer / DMA Size Calculator

embedcalc_ring_buffer_size
Read-onlyIdempotent

Calculate the required ring buffer size from data rate, worst-case consumer latency, and a safety factor, rounding up to a power of two.

Instructions

Size a ring buffer (or DMA buffer) from data rate, worst-case consumer latency, and a safety factor, rounded up to a power of two. Args: data_rate_bytes_per_sec, latency_ms (worst-case time before the consumer drains), safety_factor (default 2). Returns (structured): { bytes_needed, recommended_pow2 }. Example: 102400 B/s, 10 ms, ×2 -> 2048 bytes -> use 2048 (2^11).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latency_msYesWorst-case consumer latency in milliseconds
safety_factorNoHeadroom multiplier (default 2)
data_rate_bytes_per_secYesIncoming data rate in bytes/second

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bytes_neededYes
recommended_pow2YesNext power of two >= bytes_needed (fast masking index math)
Behavior4/5

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

The description adds behavioral context beyond the annotations: it discloses that the result is rounded up to a power of two and provides a computed example. The annotations already indicate idempotent, read-only, non-destructive behavior, so the description complements them well without contradiction.

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 4 sentences, beginning with the core purpose, followed by parameters and an example. It is front-loaded and every sentence contributes meaning. No wasted words.

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?

The description explains the computation, input parameters, and output structure. The output schema exists and covers return fields, so the description is complete for a calculator tool with this complexity.

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 the baseline is 3. The description repeats parameter explanations but adds a concrete example demonstrating usage, which provides slight added value.

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 uses a specific verb ('Size') and resource ('ring buffer / DMA buffer'), and clearly distinguishes from sibling calculators by stating the computation formula. It is unambiguous and directly states the tool's function.

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 implies the tool should be used for sizing buffers from data rate and latency, and the sibling tools are all different calculators, so there is no confusion. However, it does not explicitly state when not to use it or mention alternatives, which prevents a 5.

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