Skip to main content
Glama

get_nearest_sensor

Finds the closest working air quality sensor for given latitude and longitude coordinates and returns its current reading.

Instructions

Given latitude/longitude, find the closest working sensor and return its current reading.

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": {
      "lat": "<lat>",
      "lon": "<lon>"
    },
    "name": "get_nearest_sensor"
  }
}

Input Schema

NameRequiredDescriptionDefault
latYesLatitude
lonYesLongitude

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does add real behavioral information: the search is restricted to working sensors and returns a current reading rather than a historical series. It does not disclose the search radius, what happens when no sensor is nearby, or the units/coordinate reference system expected.

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?

A single front-loaded sentence with no wasted wording. The input condition comes first, followed by the operation and the return, which is ideal ordering for an agent skimming definitions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read tool with no annotations and no output schema, the description covers the core contract. Gaps remain on the radius of 'closest', the no-match behavior, and what fields the 'current reading' contains, which an agent would need to interpret results correctly.

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 description coverage is 100% and both parameters are required numbers, so the baseline is 3. The description adds only the notion that the pair designates a search origin; it gives no additional detail on coordinate system, precision, or valid ranges beyond what the schema states.

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 specific verb and resource — find the closest working sensor and return its current reading — and the 'given latitude/longitude' framing makes clear this is a geospatial lookup rather than a device-id lookup, which distinguishes it from siblings like get_device_current or get_device_history.

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

Usage Guidelines3/5

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

Usage is implied by the input contract: an agent with coordinates rather than a device identifier should use this tool. However, no sibling is named, and there is no explicit guidance on when-not to use it (e.g., when a device id is already known, or when historical rather than current data is wanted).

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