Skip to main content
Glama
Train Horn SPL MCP

Train Horn SPL MCP

distance_for_target_spl

Estimate the free-field distance where sound-pressure level drops to a target value, using inverse-square spreading and optional ISO 9613-1 atmospheric absorption.

Instructions

Estimate the free-field distance at which SPL equals a target level.

Solves the inverse of spl_at_distance numerically. Same model and caveats:
inverse-square spreading, plus ISO 9613-1 absorption when frequency_hz is
set.

Args:
    source_spl_db: Free-field sound-pressure level at the reference
        distance, in decibels.
    ref_distance_m: Distance at which source_spl_db applies, in metres.
    target_spl_db: Desired sound-pressure level, in decibels.
    frequency_hz: Pure-tone frequency for ISO 9613-1 absorption. Leave
        unset to apply spreading only.
    temperature_c: Air temperature in degrees Celsius (default 20).
    humidity_pct: Relative humidity in percent (default 70).
    pressure_kpa: Atmospheric pressure in kilopascals (default 101.325).

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": {
      "source_spl_db": "<source_spl_db>",
      "ref_distance_m": "<ref_distance_m>",
      "target_spl_db": "<target_spl_db>"
    },
    "name": "distance_for_target_spl"
  }
}

Input Schema

NameRequiredDescriptionDefault
frequency_hzNo
humidity_pctNo
pressure_kpaNo
source_spl_dbYes
target_spl_dbYes
temperature_cNo
ref_distance_mYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose the underlying model: inverse-square spreading plus optional ISO 9613-1 absorption when frequency_hz is set. It also documents defaults, but it does not enumerate the referenced caveats or cases such as target levels that cannot be reached.

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 front-loaded with the core purpose, then structured into model notes and an Args block for the seven parameters. Every sentence contributes either behavioral context or parameter semantics, with no redundant or filler text.

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 seven-parameter physics calculation with an output schema, the description is nearly complete: it explains the model, optional absorption, and all parameter meanings. The main remaining gap is that it references 'same model and caveats' without enumerating those caveats, but that is minor for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: every one of the seven parameters is explained with meaning, units, and defaults. In particular, it clarifies that source_spl_db is tied to ref_distance_m and that frequency_hz enables ISO 9613-1 absorption.

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 result: estimate the free-field distance at which SPL equals a target level. It also explicitly frames the tool as the inverse of sibling spl_at_distance, so an agent can distinguish it without opening the schema.

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 inverse relationship to spl_at_distance gives clear usage context: use this when distance is unknown and target SPL is known. It does not spell out explicit exclusions or edge cases, but the intended usage is easy to infer from the first sentence and the sibling reference.

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