Skip to main content
Glama

Kaalshodh — Indian astronomy time machine

get_nearest_event

Read-only
Return the nearest occurrence of one event type before or after a date —
walks outward from any date in years -5000..+5000, instant.

Ideal for questions like "when is the next Kumbh Mela?", "when does Guru
go retrograde next?", "when is Makara Sankranti?" or "when was the last
total solar eclipse before 1500 CE?" without scanning a whole range.

Args:
    event_type: One of the values listed in get_astro_events (e.g.
                "kumbh_mela", "solar_eclipse", "adhik_maas", "sankranti").
    from_date:  Reference date, YYYY-MM-DD (BC years like "-0500-01-01" allowed).
    direction:  "next" (first after from_date) or "prev" (last before).
    ayanamsa:   "Lahiri" (default) or "Sayan".
    grah:       Optional grah filter for grah-specific event types.
    location:   Optional Kumbh Mela location (Haridwar/Prayagraj/Ujjain/Nashik).

Returns:
    Dict with event_type, direction, from_date, ayanamsa, valid_range, and
    `event` (null if the reference date is outside the data range).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
grahNo
ayanamsaNoLahiri
locationNo
directionNonext
from_dateYes
event_typeYes

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, and the description does not contradict that. It adds substantial behavioral context: it walks outward from any date in years -5000..+5000, is instant, returns a dict with specific fields, and explains that `event` is null if the reference date is outside the data range. This goes well beyond the annotations.

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?

The description is well-structured and front-loaded with the core purpose, followed by 'Ideal for' examples, an Args list, and a Returns section. Each sentence earns its place; the examples are informative without being verbose.

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?

Given the tool has 6 parameters, no output schema, and only high-level annotations, the description is complete. It documents all parameters, the return format, and an edge case (null event for out-of-range dates). No critical behavioral detail is missing for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden. It explains every parameter (event_type, from_date, direction, ayanamsa, grah, location) with types, defaults, allowed values, and examples. This fully compensates for the lack of schema descriptions.

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 clearly states the tool's function: 'Return the nearest occurrence of one event type before or after a date' with a specific verb, resource, and scope. It distinguishes itself from likely sibling tools (e.g., get_astro_events) by focusing on nearest occurrence rather than range scanning, reinforced by concrete example questions.

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 explicit ideal use cases ('when is the next Kumbh Mela?') and notes this is done 'without scanning a whole range', implying it is preferable to range-scanning alternatives. However, it does not explicitly name a sibling tool as the alternative or state when not to use this tool, so it falls slightly short of a perfect score.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool targets a distinct query type: planetary conjunctions, panchang date matching, event lists, nearest events, and position snapshots. Even the similar-looking get_astro_events and get_nearest_event are clearly differentiated by range vs. nearest-neighbor scope.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: find_copresence, find_matching_dates, get_astro_events, get_nearest_event, get_planetary_positions. 'find_' for search operations and 'get_' for retrieval operations, with snake_case throughout.

Tool Count5/5

Five tools is well within the ideal 3-15 range for a domain-specific server. Each tool covers a meaningful, non-redundant capability for astronomical and panchang time travel, and there is no bloat or triviality.

Completeness4/5

The set covers major workflows: positions, events, conjunctions, and panchang-based date search. The only notable gap is a direct 'panchang for a specific date' lookup, which find_matching_dates cannot handle without constraints and which is explicitly delegated to another MCP server. This is a minor workaround rather than a dead end.

Resources