Skip to main content
Glama
mcp-gnu-units

mcp-gnu-units

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
infoA

Discovery / health-check entrypoint: report availability and version info.

Returns seven keys: status ("available"), name, version (package version), python (runtime version), mcp_sdk (MCP SDK version, or "unknown"), toolsets (empty until the GNU units engine lands), and units_db — the bundled GNU units database's source, data_version, and data_updated (§2.4.6 / §5.4), read from the shipped file's own header so it can't drift. Example: {"status":"available","name":"mcp-gnu-units","version":"0.0.1", "python":"3.12.3","mcp_sdk":"2.3.0","toolsets":[], "units_db":{"source":"GNU units","data_version":"3.26","data_updated":"2026-02-25"}}

find_unitsA

Search the GNU units database for units whose name or definition contains a keyword.

Basic substring search over the 3000+ unit GNU units database (TODO §14.1). A hit is any unit whose name OR definition text contains query (case-insensitive); prefixes are excluded. Results are returned in the database's native order and capped at limit. Use this to discover the exact spelling of a unit before calling a conversion tool.

Returns: query (echoed), count (number of results returned), and results, a list of objects each carrying:

  • name : the unit's name.

  • definition : its definition text (the source line with the leading name token removed, so the name is not repeated).

  • kind : "unit" | "primitive" | "function" | "table".

  • dimension : the unit reduced to base-unit signature, e.g. "kg m^2 / s^3" for power — use it to check whether two units are conformable without a second call. Omitted for hits that do not reduce (functions, tables).

  • base_value : the unit reduced to base/primitive units, coefficient included, e.g. "745.699 kg m^2 / s^3". Omitted alongside dimension when the hit does not reduce.

Enriching each hit lets you search AND triage in a single call instead of a follow-up lookup per unit. Example: find_units("horsepower") -> {"query":"horsepower","count":9,"results":[{"name":"horsepower", "definition":"550 foot pound force / sec","kind":"unit", "dimension":"kg m^2 / s^3","base_value":"745.7 kg m^2 / s^3"}, ...]}

convertA

Convert a value or unit expression from one unit to another (GNU units engine, TODO §16).

The universal conversion core: one tool covers every category (length, mass, time, temperature, area, volume, energy, power, speed, data, …) plus compound expressions like kW*h or acre*ft. Linear conversions return the ratio of coefficients; a nonlinear target (e.g. tempF) applies that unit's inverse.

Returns: from and to (echoed), result (the converted magnitude WITH the target unit, e.g. "1.609344 km" — the primary human-readable answer), value (the same magnitude as a bare float for programmatic use), and exact (true when the result is exact, false when it was rounded). Errors cleanly (isError) when a unit is unknown, an expression is malformed, or the two sides are not conformable. Example: convert("1 mile", "km") -> {"from":"1 mile","to":"km","result":"1.609344 km","value":1.609344,"exact":true}

convert_to_siA

Reduce a value or unit expression to its SI base units (GNU units engine, TODO §17).

Rewrites any expression in terms of the database's primitive/base units — kg, m, s, A, K, mol, cd, and the like — collapsing all derived and prefixed units. This is how you see what a quantity really is dimensionally: kW*hour becomes 3600000 kg m^2 / s^2 (3.6 MJ), newton becomes 1 kg m / s^2. Use it to compare or sanity-check units, or to get a magnitude in coherent SI.

Returns: expr (echoed), result (the reduced quantity WITH its base-unit signature, e.g. "3600000 kg m^2 / s^2" — the primary human-readable answer), value (the same magnitude as a bare float for programmatic use), dimension (just the base-unit signature, e.g. "kg m^2 / s^2", or "1" when dimensionless), and exact (true when the result is exact, false when it was rounded). Errors cleanly (isError) when a unit is unknown, an expression is malformed, or it is a nonlinear unit with no linear base form (e.g. tempF). Example: convert_to_si("kWhour") -> {"expr":"kWhour","result":"3600000 kg m^2 / s^2","value":3600000.0, "dimension":"kg m^2 / s^2","exact":true}

define_unitA

Show a single unit/prefix/constant's definition, kind, dimension, and base value (TODO §13).

Looks up one name in the GNU units database and reports exactly what it is and what it reduces to — the inspect/"define" counterpart to convert. Works for ordinary units, SI/binary prefixes, physical constants, nonlinear function units (tempF), and piecewise tables (brwiregauge).

Returns an object with:

  • name : echoed.

  • kind : "unit" | "primitive" | "prefix" | "function" | "table".

  • definition : the database definition text (source line, leading name token removed). "!" marks a primitive/base unit.

  • dimension : base-unit signature, e.g. "kg m^2 / s^3" for power; "1" when dimensionless. Omitted for hits that do not reduce.

  • base_value : the unit reduced to base units with its coefficient, e.g. "745.699871582 kg m^2 / s^3". Omitted alongside dimension.

  • function : for nonlinear units only — {signature, input_dimensions, output_dimension} describing the conversion function.

Errors cleanly (isError) when the name is not defined in the database. Example: define_unit("newton") -> {"name":"newton","kind":"unit","definition":"kg m / s^2", "base_value":"1 kg m / s^2","dimension":"kg m / s^2"}

list_prefixesA

List every SI and binary prefix in the GNU units database with its multiplier (TODO §13).

Enumerates all defined prefixes — the SI decimal ladder (quetta…quecto and their symbols Q…q) plus the binary/IEC prefixes (kibi/Ki, mebi/Mi, …) — sorted by descending magnitude. Useful for discovering the exact prefix spelling to use in a convert or convert_to_si expression, or for seeing a prefix's exact numeric value.

Returns: count (number of prefixes) and prefixes, a list of objects each with name (the prefix, without its trailing hyphen) and multiplier (its value as a string, exact where the value is an exact integer, e.g. kibi -> "1024", mega -> "1000000"). Example: list_prefixes() -> {"count":125,"prefixes":[{"name":"quetta","multiplier":"1000000000000000000000000000000"}, ...,{"name":"kibi","multiplier":"1024"}, ...]}

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: info for metadata, convert for arbitrary unit conversion, convert_to_si for SI base reduction, define_unit for single-unit inspection, find_units for database search, and list_prefixes for prefix enumeration. The only potential overlap is convert vs convert_to_si, but their outputs and use cases are explicitly differentiated.

Naming Consistency4/5

Three tools follow a clear verb_noun pattern (define_unit, find_units, list_prefixes) and two more are related verb phrases (convert, convert_to_si), but info is a noun outlier and convert is a bare verb. The set is still mostly consistent and readable.

Tool Count5/5

Six tools is well within the ideal 3–15 range for a unit conversion and database inspection server. Each tool covers a distinct core capability and none feels redundant or missing.

Completeness4/5

The surface covers conversion, SI reduction, single-unit definition, keyword search, prefix listing, and service metadata. Minor gaps exist, such as no direct way to list all units or browse by dimension, but agents can approximate these via find_units with broad queries.

Maintenance

ActivityMaintained
ResponsivenessNo issues