Skip to main content
Glama

Get sunrise and sunset

get_sunrise_sunset
Read-only

Sunrise and sunset on one day (date, or today) at one place: sunrise_utc and sunset_utc, sunrise_local and sunset_local on the clock of localZone (the place's time zone), and the place used (locationUsed). place is a city name, with the region or country when needed ("Lisbon Portugal"), by default where the user is (their Default location in AstroProcessor, else their time zone's main city): with no place known it answers place_needed, and a name that matches several cities returns the candidates (place_ambiguous), which find_city looks up. Used for sunrise, sunset or day length, a birth day at the birth place included; the Moon's phase and sign are get_moon_data's. Each call counts toward one metered message (unlimited on a paid plan; on the Free plan a daily free message, then credits, as get_balance shows) and toward the account's per-minute and per-hour call limits; a call refused for either returns an error result, runs nothing and charges nothing.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_sunrise_sunset"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoThe day (YYYY-MM-DD is enough). ISO 8601: YYYY-MM-DD for a day, YYYY-MM-DDTHH:MM for a time on the local clock (24-hour), or a time with an offset or Z (2026-11-15T14:00+01:00, 2026-11-15T13:00Z) for an exact instant. A time without an offset is on the clock of `place` when one is given, else the user's own time zone. Words (now, today, next month) are not accepted. Omitted: TODAY.
placeNoThe city to compute for (the birth city, for a birth day). Omitted: where the user is (their Default location in AstroProcessor, else their time zone's main city). A city name as the user said it, with the region or country when they gave one ("Lisbon Portugal", "Valencia Spain", "Springfield Illinois"); a city name, not coordinates. A name that matches several cities is refused with the candidates (place_ambiguous).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the read-only annotations, the description discloses metering (one message per call, free-plan quotas), per-minute and per-hour call limits, and that refused calls return an error without running or charging. It also describes place_needed and place_ambiguous outcomes, which the annotations alone do not cover.

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 core operation and output shape, and every block contributes useful context. It is still a dense single paragraph with several parentheticals and some repetition of schema-stated defaults, so it is not maximally concise.

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?

With no output schema, the description compensates by enumerating the returned fields and the key error outcomes (place_needed, place_ambiguous, refused calls). Billing and rate-limit behavior are also covered, making the definition complete for correct invocation.

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 coverage is 100%, and the schema already documents the date format/default and the place city-name/default/ambiguity behavior. The description largely restates those semantics and adds only the pointer that find_city resolves ambiguous names, so it does not substantially extend parameter meaning beyond the schema.

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 computation: sunrise and sunset on one day at one place, and names the returned fields (sunrise_utc, sunset_utc, local values, localZone, locationUsed). It also distinguishes the scope from get_moon_data, which handles the Moon's phase and sign.

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

Usage Guidelines5/5

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

The description explicitly says the tool is used for sunrise, sunset, or day length, including a birth day at the birth place, and routes Moon phase/sign queries to get_moon_data. It also names find_city as the lookup path when a place name is ambiguous.

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