UNPKG

@ryancardin/noaa-tides-currents-mcp-server

Version:

MCP Server that interfaces with NOAA Tides and Currents API using FastMCP

123 lines (122 loc) 4.04 kB
import { z } from 'zod'; /** * Moon phase names and their approximate ranges */ export declare enum MoonPhaseName { NEW_MOON = "New Moon", WAXING_CRESCENT = "Waxing Crescent", FIRST_QUARTER = "First Quarter", WAXING_GIBBOUS = "Waxing Gibbous", FULL_MOON = "Full Moon", WANING_GIBBOUS = "Waning Gibbous", LAST_QUARTER = "Last Quarter", WANING_CRESCENT = "Waning Crescent" } /** * Moon phase information */ export interface MoonPhaseInfo { date: string; phase: number; phaseName: MoonPhaseName; illumination: number; age: number; distance: number; diameter: number; isWaxing: boolean; } /** * Parameters for getting moon phase */ export declare const MoonPhaseParamsSchema: z.ZodObject<{ date: z.ZodOptional<z.ZodString>; latitude: z.ZodOptional<z.ZodNumber>; longitude: z.ZodOptional<z.ZodNumber>; format: z.ZodOptional<z.ZodEnum<["json", "text"]>>; }, "strip", z.ZodTypeAny, { date?: string | undefined; format?: "text" | "json" | undefined; latitude?: number | undefined; longitude?: number | undefined; }, { date?: string | undefined; format?: "text" | "json" | undefined; latitude?: number | undefined; longitude?: number | undefined; }>; export type MoonPhaseParams = z.infer<typeof MoonPhaseParamsSchema>; /** * Parameters for getting moon phases for a date range */ export declare const MoonPhasesRangeParamsSchema: z.ZodObject<{ start_date: z.ZodString; end_date: z.ZodString; latitude: z.ZodOptional<z.ZodNumber>; longitude: z.ZodOptional<z.ZodNumber>; format: z.ZodOptional<z.ZodEnum<["json", "text"]>>; }, "strip", z.ZodTypeAny, { start_date: string; end_date: string; format?: "text" | "json" | undefined; latitude?: number | undefined; longitude?: number | undefined; }, { start_date: string; end_date: string; format?: "text" | "json" | undefined; latitude?: number | undefined; longitude?: number | undefined; }>; export type MoonPhasesRangeParams = z.infer<typeof MoonPhasesRangeParamsSchema>; /** * Parameters for getting next moon phase */ export declare const NextMoonPhaseParamsSchema: z.ZodObject<{ phase: z.ZodEnum<[MoonPhaseName.NEW_MOON, MoonPhaseName.FIRST_QUARTER, MoonPhaseName.FULL_MOON, MoonPhaseName.LAST_QUARTER]>; date: z.ZodOptional<z.ZodString>; count: z.ZodOptional<z.ZodNumber>; format: z.ZodOptional<z.ZodEnum<["json", "text"]>>; }, "strip", z.ZodTypeAny, { phase: MoonPhaseName.NEW_MOON | MoonPhaseName.FIRST_QUARTER | MoonPhaseName.FULL_MOON | MoonPhaseName.LAST_QUARTER; date?: string | undefined; format?: "text" | "json" | undefined; count?: number | undefined; }, { phase: MoonPhaseName.NEW_MOON | MoonPhaseName.FIRST_QUARTER | MoonPhaseName.FULL_MOON | MoonPhaseName.LAST_QUARTER; date?: string | undefined; format?: "text" | "json" | undefined; count?: number | undefined; }>; export type NextMoonPhaseParams = z.infer<typeof NextMoonPhaseParamsSchema>; /** * Service for moon phase calculations */ export declare class MoonPhaseService { /** * Get the moon phase for a specific date * @param params Parameters for the request * @returns Moon phase information */ getMoonPhase(params: MoonPhaseParams): MoonPhaseInfo; /** * Get moon phases for a date range * @param params Parameters for the request * @returns Array of moon phase information */ getMoonPhasesRange(params: MoonPhasesRangeParams): MoonPhaseInfo[]; /** * Get the next occurrence(s) of a specific moon phase * @param params Parameters for the request * @returns Array of dates for the next occurrences of the specified phase */ getNextMoonPhase(params: NextMoonPhaseParams): { date: string; phase: string; }[]; /** * Get the name of the moon phase based on the phase value * @param phase Phase value (0-1) * @returns Moon phase name */ private getMoonPhaseName; }