Skip to main content
Glama

sun_moon

Read-onlyIdempotent

Compute sunrise, sunset, twilight, moon phase, and shadow-length ratio for any location. Supports offline calculations for shadow studies, solar analysis, and photography timing.

Instructions

Get sunrise, sunset, twilight, golden hour and moon phase for a location.

Computed offline from astronomical formulas -- no network needed.

Includes the shadow-length ratio, which is what construction shadow studies, right-to-light assessments and solar-panel shading analysis actually need: a 10 m object at 30 degrees solar elevation casts a 17.3 m shadow. Also used for photography scheduling, crop modelling, delivery windows before dusk, and retail daylight-hours analysis.

Inside the polar circles, events that do not occur are returned as null with an explanation rather than as an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
on_dateNoDate as YYYY-MM-DD. Defaults to today (UTC).
locationYesPosition, as coordinates or a place name.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sunYes
dateYes
metaYes
moonYes
latitudeYes
timezoneYes
longitudeYes
position_nowNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering safety. The description adds valuable behavior: 'Computed offline from astronomical formulas -- no network needed' and the crucial edge-case handling 'Inside the polar circles, events that do not occur are returned as null with an explanation rather than as an error.' This goes beyond annotations to disclose surprising behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main purpose and then provides behavioral context and use cases. It is somewhat verbose (multiple paragraphs) but each sentence adds value; the edge-case explanation is useful. It could be trimmed slightly, but it's well-structured.

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

Completeness5/5

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

The description covers the core function, the offline computation method, the shadow-length ratio with an example, multiple use cases, and the polar-circle null behavior. Since an output schema exists, return-value details are not needed. Nothing essential for calling this tool correctly is missing.

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%, so both parameters (location and on_date) are already documented. The description does not add any parameter-specific meaning beyond the schema, so the baseline of 3 applies.

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 opens with a specific verb-resource statement: 'Get sunrise, sunset, twilight, golden hour and moon phase for a location.' It also names the shadow-length ratio, a distinct deliverable. This clearly differentiates it from sibling tools like env_weather or time_at_location, even without explicit comparison.

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 description provides rich usage context—'construction shadow studies, right-to-light assessments, solar-panel shading analysis, photography scheduling, crop modelling, delivery windows before dusk, and retail daylight-hours analysis'—and notes it works offline. However, it does not explicitly state when to prefer this over alternatives or when not to use it, 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.