Skip to main content
Glama

Daylight hours

get_daylight_hours
Read-onlyIdempotent

Calculates the length of daylight at a place on a date, with sunrise and sunset in UTC, for the UTC day from midnight to midnight. A place is one of the website's 20 cities or a latitude with an optional longitude.

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_daylight_hours"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoUTC date as YYYY-MM-DD, from 1900 to 2100. Defaults to today in UTC.
placeNoCity, one of Anchorage, Auckland, Buenos Aires, Cape Town, Dubai, Johannesburg, Lima, London, Los Angeles, Mexico City, Moscow, Mumbai, Nairobi, New York, Perth, Santiago, São Paulo, Singapore, Sydney or Tokyo. Not needed when a latitude is given.
latitudeNoLatitude in degrees, north positive: -90 to 90.
longitudeNoLongitude in degrees, east positive: -180 to 180. Defaults to 0 when only a latitude is given; it sets the UTC sunrise and sunset times.

Output Schema

NameRequiredDescriptionDefault
itemYes
viewYes
requestYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior, so the bar is lower; the description still adds real substance by pinning results to a UTC midnight-to-midnight day and noting sunrise/sunset are reported in UTC. It also discloses the bounded place model (20 named cities), which reinforces the closed-world hint. It does not mention edge cases such as polar day/night where no sunrise or sunset occurs.

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 sentences, front-loaded with the core action and scope, and the input model follows immediately. No filler or redundancy.

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?

An output schema covers the return values and annotations cover the safety profile, so the description only needs to explain the calculation's framing and inputs — which it does, including the UTC-day convention that would otherwise be a likely source of misinterpretation.

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 the schema already documents date format/range, the city list, and coordinate ranges. The description restates the place-vs-latitude model and the longitude default, which is a useful summary but adds little meaning beyond the structured fields.

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?

States a specific verb and resource ('Calculates the length of daylight') plus the exact scope: the UTC day from midnight to midnight, at a place or coordinate, on a date. It is clearly distinguishable from a point-in-time tool like get_sun_position, though it never names a sibling to route against.

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 scope statement (day-level daylight totals rather than instant sun position), and the 'place or latitude' clause tells the agent which two input modes exist. There is no explicit when-to-use/when-not-to-use guidance or reference to the alternative tools in the catalog.

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.