Skip to main content
Glama

MaCalculatriceEnLigne

Calculate Density

calculate_density
Read-onlyIdempotent

Compute density, mass, or volume given the other two. ρ=m/V. Use for materials, chemistry, fluid dynamics. Inputs: any 2 of (mass, volume, density). Returns the third. See list_bundles for related 'science' calculators.

Input Schema

NameRequiredDescriptionDefault
densityNokg/m³
mass_kgNoMass kg
volume_m3NoVolume m³

Output Schema

NameRequiredDescriptionDefault
resultNoComputed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools).
sourceNoAuthoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21").
formulaNoHuman-readable formula or method used (e.g. "I=P·r·t", "Magnus formula").
reference_urlNoLink to a calcul2 page documenting the calculation in detail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare a read-only, idempotent, non-destructive, closed-world calculation, so the safety burden is lifted. The description adds genuine behavioral value by disclosing the solve-for-the-missing-variable contract (supply any two, get the third) and the exact formula, though it says nothing about units consistency or what happens if all three or only one input is supplied.

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?

Five short clauses, front-loaded with the core action and formula, followed by use cases, the input contract, and a cross-reference. No filler and no repetition of schema content.

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?

An output schema exists so return values need no explanation, and the description covers purpose, inputs, and domains adequately. It is slightly thin on edge behavior (unit consistency, handling of zero or three supplied inputs), which matters for a formula tool with all-optional parameters.

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% and the schema documents each parameter with units (kg/m³, kg, m³), so the baseline would be 3. The description goes beyond the schema by explaining the 2-of-3 input contract and the returned third value, which is not derivable from three optional numeric properties.

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?

States a precise verb (Compute) and the three interchangeable target quantities, and gives the governing relation ρ=m/V so the agent immediately knows the math. This clearly distinguishes it from siblings like calculate_density_convert (unit conversion) and calculate_volume (geometry).

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?

Names concrete application domains (materials, chemistry, fluid dynamics) and points to list_bundles for the related 'science' calculator group, which gives the agent routing context. It does not explicitly state when NOT to use it, e.g. versus calculate_density_convert for unit changes, so it stops short of a 5.

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.