Skip to main content
Glama
ethan-hub26

embedcalc-mcp

by ethan-hub26

Q-Format Fixed-Point Converter

embedcalc_qformat_convert
Read-onlyIdempotent

Encode floating-point numbers to signed Qm.n fixed-point integers or decode them back, with format validation, quantization error, and clamping.

Instructions

Convert between float and signed Qm.n fixed point (1 sign + m integer + n fractional bits; e.g. Q0.15 = 16-bit "Q15").

Args:

  • m (int >= 0), n (int >= 0): format; m+n+1 <= 32.

  • value (float) OR raw_int (stored integer): provide exactly one.

Returns (structured): { format, total_bits, scale, range_min, range_max, raw_int, hex, bin, actual, error, clamped }. hex/bin are two's complement in the format's bit width. Examples: 0.5 in Q0.15 -> 16384 = 0x4000; raw 0x8000 (-32768) in Q0.15 -> -1.0. Do not round by hand — quantization error matters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mYesInteger bits (excluding sign)
nYesFractional bits
valueNoFloat value to encode (provide this OR raw_int)
raw_intNoStored fixed-point integer to decode (provide this OR value)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
binYes
hexYes
errorYes|input - actual| (0 when decoding raw_int)
scaleYes2^n
actualYesValue actually represented after quantization
formatYes
clampedYes
raw_intYes
range_maxYes
range_minYes
total_bitsYes
Behavior5/5

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

Annotations already indicate read-only, idempotent, non-destructive behavior. The description adds valuable detail: the return structure with quantization error, clamping, and two's complement representations. It also warns against manual rounding, disclosing important behavioral traits.

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 description is concise and well-structured: intro, parameter list, return format, examples. Every sentence serves a purpose without redundancy, fitting the tool's complexity.

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?

With a comprehensive output schema and clear examples, the description fully equips an agent to understand inputs, outputs, and constraints. It covers conversion direction, format rules, and important notes like quantization error.

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 100% with descriptions. The description adds value by stating the constraint m+n+1 <= 32 and reinforcing the exclusive choice between value and raw_int, which goes beyond the schema's individual min/max constraints.

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 'Convert between float and signed Qm.n fixed point', specifying the verb, resource, and format. It distinguishes itself from sibling tools like IEEE754 converter by focusing on Q-format, making the purpose unambiguous.

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 clear context on the conversion direction and requirement to provide exactly one of value or raw_int. Examples further clarify usage. However, it does not explicitly address when to use this tool versus alternatives (e.g., for other fixed-point or floating-point conversions), though the name and title already imply its niche.

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