Skip to main content
Glama

Sunrise, sunset and hours of sun

sun_times
Read-onlyIdempotent

Sunrise, solar noon, sunset and day length on a date for a flat horizon; with terrain=True, also the hours of direct sun once hills are taken into account.

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": {
      "latitude": "<latitude>",
      "longitude": "<longitude>",
      "date": "<date>"
    },
    "name": "sun_times"
  }
}

Input Schema

NameRequiredDescriptionDefault
tzNoIANA time zone, e.g. Australia/Melbourne; default UTC
dateYesLocal date, YYYY-MM-DD
terrainNoAlso count hours of direct sun above the terrain horizon (reads the DEM; ~10-60 s)
latitudeYesLatitude in degrees (WGS84)
longitudeYesLongitude in degrees (WGS84)

Output Schema

NameRequiredDescriptionDefault
dateYes
unitsNoUnit of each numeric field
methodYes
statusNook
sunsetYes
sunriseYes
warningsNoCaveats to tell the user
time_zoneYes
provenanceNoSource, licence, attribution, retrieval time and method
solar_noonYes
day_length_hYes
terrain_hoursNoHours of direct sun above the terrain horizon
last_direct_sunNo
first_direct_sunNo
solar_noon_elevation_degYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld, so the bar is lower, and the description still adds real context by flagging that the default assumes a flat horizon while terrain=True accounts for hills. That is a behavioural caveat an agent would otherwise miss; only the DEM read cost is left to the schema.

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 sentence that front-loads the returned quantities and appends the conditional terrain mode. No filler, no restatement of the title.

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?

With an output schema present, return values need not be explained, and all parameters are covered by the schema. What remains thin is the relationship to sibling tools, which matters given a 21-tool geospatial set containing sun_position and terrain_horizon.

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%, with all five parameters documented including tz format, date format and the terrain DEM cost, so the baseline is 3. The description reiterates the terrain meaning but adds no format or edge-case detail (e.g. polar day/night behaviour) beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the concrete outputs (sunrise, solar noon, sunset, day length) plus the terrain variant, which is more specific than the title alone. It does not name the neighbouring tools (sun_position for angles, terrain_horizon for horizon profiles) that an agent might confuse it with, so sibling differentiation is implicit rather than stated.

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

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing says to pick this over sun_position when the agent wants an angle rather than times, or over terrain_horizon. The terrain=True clause hints at a mode choice but frames it as a feature, not a condition for selecting the tool.

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.