Skip to main content
Glama

Sunrise and sunset

astronomi_sun
Read-onlyIdempotent

Compute sunrise, sunset, solar noon, and day length for a given latitude, longitude, and date (NOAA/USNO formulas). Handles polar night / midnight sun.

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": "astronomi_sun"
  }
}

Input Schema

NameRequiredDescriptionDefault
tzNoISO timezone offset e.g. +07:00. Defaults to +00:00.
latYesDecimal latitude (-90..90), e.g. -6.2 for Jakarta
lonYesDecimal longitude (-180..180), e.g. 106.8 for Jakarta
tanggalNoDate YYYY-MM-DD. Defaults to today.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile needs no repetition. The description adds genuine value by citing the NOAA/USNO formula basis and warning that polar night / midnight sun are handled — flagging that results may be degenerate at high latitudes. It does not say how those cases appear in the response, which limits the practical benefit.

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?

Two compact sentences, front-loaded with the computation and its outputs, then the edge case. No filler, no repetition of annotation data.

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 no output schema, the description helpfully enumerates the four returned quantities and notes the polar edge case, which is the main thing an agent could get wrong. It stops short of stating return types/units or the timezone behavior of results, a small but real gap for a no-output-schema tool.

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 lat/lon ranges, tz format, and tanggal format all documented in the schema, so the baseline is 3. The description only restates the lat/lon/date triple and adds nothing beyond it, saying nothing about how tz (default +00:00) affects the returned times.

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?

Names a specific computational verb and enumerates the four outputs (sunrise, sunset, solar noon, day length) plus the required inputs (latitude, longitude, date). It is clearly distinct from astronomi_moon and astronomi_gerhana by subject matter, but no sibling is named explicitly to route the agent (e.g. astronomi_twilight for civil/nautical twilight).

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 statement of when to call this versus astronomi_twilight or astronomi_moon, nor any prerequisite or exclusion. The only contextual note is an edge-case behavior (polar night / midnight sun), which describes output conditions rather than when-to-use guidance.

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.

Resources