Skip to main content
Glama

Unit conversion library with pytest tests

submit_unit_conversion_library
Idempotent

Produce a standard-library Python module that converts a quantity between named units of length, mass and temperature, plus pytest tests. Choose this when you need to convert a quantity between named units of length, mass or temperature and want the factors exact and the result reproducible, delivered as a module with tests. Do not choose this when you need a unit outside the declared set, currency conversion, or dimensional analysis over compound units such as kilograms per cubic metre: the template covers the units it names and rejects the rest rather than approximating. Example requests: Write a Python module that converts between metric and imperial units with tests. | I need a unit converter for metres, feet, kilograms and pounds that is exact. | Generate a unit-conversion module covering length, mass and temperature and prove it with pytest. | Convert units and measurements: take a quantity in metres, feet, kilograms or pounds and return it in another named unit, with tests.

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": {
      "inputs": "<inputs>",
      "authorized_by": "<authorized_by>"
    },
    "name": "submit_unit_conversion_library"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYes
quote_idNoThe quote_id returned by POST /v1/jobs. Required to authorize a priced capability; the service rejects a priced job that does not name the quote it issued.
authorized_byYesIdentifier of the human or agent authorizing this job.
accepted_priceNoThe amount accepted, exactly as quoted (for example "5.00" or 5). Checked against the stored quote, so a price that moved between quote and authorize is refused rather than silently absorbed. Optional, but sent to make the acceptance explicit.

Output Schema

NameRequiredDescriptionDefault
quoteNo
stateYes
job_idYes
artifactsNo
access_tokenNoPer-job credential. Present it as the X-Job-Token header to read the job or list it. Keep it; it is the only credential for this job.
verificationNoIndependent verification. verification.ok = false means the job failed, not a partial success.
capability_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare idempotentHint=true and destructiveHint=false, and the description adds real behavior beyond them: the unit set is fixed, out-of-set units are rejected rather than approximated, and factors are exact and reproducible. It does not explain the priced/quote authorization flow or that the job emits a module file plus tests as artifacts, leaving that to the schema's quote_id description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core statement and the when/when-not split are front-loaded and efficient. However, the four appended example requests largely restate the same scenario (metric/imperial, metres/feet/kilograms/pounds) three times over, adding bulk without new decision-relevant information.

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 priced, template-driven code-generation job with an output schema and annotated idempotency, the description covers scope, guarantees, exclusions and sample intents adequately. The only material omission is any mention that submission is quote-authorized and billed, though the schema's quote_id field describes that requirement.

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 75%, so the nested inputs object (template, module_name, function_name) is already documented, giving a baseline of 3. The description does add meaning the schema lacks by bounding what the template will actually implement (length, mass, temperature only; no compound or currency units), which helps the agent populate the template field correctly.

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 opens with a specific verb and deliverable: produce a standard-library Python module converting between named units of length, mass and temperature, plus pytest tests. It distinguishes itself from the many code-generation siblings (submit_python_utility_module, submit_text_parser_module) by naming the exact domain and the exact/template-verified guarantee.

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

Usage Guidelines5/5

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

It gives both a positive selection rule ("Choose this when you need to convert a quantity between named units... and want the factors exact") and explicit exclusions (units outside the declared set, currency conversion, compound units like kg/m³). An agent can route between this and adjacent converters such as submit_fx_rate_normaliser without inference.

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