Skip to main content
Glama

Ideal gas law

ideal_gas_law
Read-only

Solves PV = nRT for the one omitted value from pressure, volume, temperature, or moles, returning pressure in the selected atm or kPa unit.

Instructions

Solve the ideal gas law PV = nRT for the one value you leave out. Pressure is in atm or kPa, volume in liters, temperature in kelvin and amount in moles. The answer comes back in the same pressure unit you used.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ideal_gas_law"
  }
}

Input Schema

NameRequiredDescriptionDefault
molesNoAmount of gas in moles.
kelvinNoTemperature in kelvin (K). Convert from Celsius first by adding 273.15.
litersNoVolume of the gas in liters (L).
pressureNoPressure of the gas, in the unit given by pressureUnit.
pressureUnitNoUnit for pressure, atm or kPa. Defaults to atm.

Output Schema

NameRequiredDescriptionDefault
molesYes
kelvinYes
litersYes
solvedYes
pressureYes
pressureUnitYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.3

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, closed-world calculation. The description adds useful behavioral detail: supported pressure units, required volume and temperature units, and that the returned pressure uses the same pressure unit supplied. It does not mention what happens if zero or multiple values are omitted, which prevents a 5.

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?

Three tight sentences with no filler. The core operation is front-loaded, followed by unit constraints and return behavior.

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 tool has an output schema, so return-value details need not be explained, and all five parameters are schema-documented. The description is nearly complete, but it could state that exactly one of the four physical quantities should be omitted and what happens otherwise.

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 description coverage is 100%, so parameter definitions are already strong. The description adds meaning beyond the schema by explaining the omission pattern and the answer's pressure-unit behavior, though it does not explicitly restate the pressureUnit default or describe edge cases around omitted parameters.

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 states a specific verb and resource: solving the ideal gas law PV = nRT for the omitted value. This clearly distinguishes the tool from siblings such as stoichiometry or molar_mass, which perform different chemistry calculations.

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?

It clearly says to leave out the value being solved for, which is the key usage condition. It does not explicitly name alternatives or when not to use it, but among the sibling tools the purpose is distinct enough that this is a minor gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.