@ryancardin/noaa-tides-currents-mcp-server
Version:
MCP Server that interfaces with NOAA Tides and Currents API using FastMCP
185 lines (184 loc) • 5.39 kB
TypeScript
import { z } from 'zod';
/**
* Sun event types
*/
export declare enum SunEventType {
SUNRISE = "sunrise",
SUNSET = "sunset",
DAWN = "dawn",
DUSK = "dusk",
SOLAR_NOON = "solarNoon",
NIGHT_START = "night",
NIGHT_END = "nightEnd",
GOLDEN_HOUR_START = "goldenHourStart",
GOLDEN_HOUR_END = "goldenHourEnd",
NAUTICAL_DAWN = "nauticalDawn",
NAUTICAL_DUSK = "nauticalDusk",
ASTRONOMICAL_DAWN = "astronomicalDawn",
ASTRONOMICAL_DUSK = "astronomicalDusk"
}
/**
* Sun times information
*/
export interface SunTimesInfo {
date: string;
sunrise: string | null;
sunset: string | null;
solarNoon: string | null;
dawn: string | null;
dusk: string | null;
nightStart: string | null;
nightEnd: string | null;
goldenHourStart: string | null;
goldenHourEnd: string | null;
nauticalDawn: string | null;
nauticalDusk: string | null;
astronomicalDawn: string | null;
astronomicalDusk: string | null;
dayLength: number;
}
/**
* Sun position information
*/
export interface SunPositionInfo {
date: string;
time: string;
azimuth: number;
altitude: number;
declination: number;
rightAscension: number;
}
/**
* Parameters for getting sun times
*/
export declare const SunTimesParamsSchema: z.ZodObject<{
date: z.ZodOptional<z.ZodString>;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
format: z.ZodOptional<z.ZodEnum<["json", "text"]>>;
timezone: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
latitude: number;
longitude: number;
date?: string | undefined;
format?: "text" | "json" | undefined;
timezone?: string | undefined;
}, {
latitude: number;
longitude: number;
date?: string | undefined;
format?: "text" | "json" | undefined;
timezone?: string | undefined;
}>;
export type SunTimesParams = z.infer<typeof SunTimesParamsSchema>;
/**
* Parameters for getting sun times for a date range
*/
export declare const SunTimesRangeParamsSchema: z.ZodObject<{
start_date: z.ZodString;
end_date: z.ZodString;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
format: z.ZodOptional<z.ZodEnum<["json", "text"]>>;
timezone: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
latitude: number;
longitude: number;
start_date: string;
end_date: string;
format?: "text" | "json" | undefined;
timezone?: string | undefined;
}, {
latitude: number;
longitude: number;
start_date: string;
end_date: string;
format?: "text" | "json" | undefined;
timezone?: string | undefined;
}>;
export type SunTimesRangeParams = z.infer<typeof SunTimesRangeParamsSchema>;
/**
* Parameters for getting sun position
*/
export declare const SunPositionParamsSchema: z.ZodObject<{
date: z.ZodOptional<z.ZodString>;
time: z.ZodOptional<z.ZodString>;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
format: z.ZodOptional<z.ZodEnum<["json", "text"]>>;
}, "strip", z.ZodTypeAny, {
latitude: number;
longitude: number;
time?: string | undefined;
date?: string | undefined;
format?: "text" | "json" | undefined;
}, {
latitude: number;
longitude: number;
time?: string | undefined;
date?: string | undefined;
format?: "text" | "json" | undefined;
}>;
export type SunPositionParams = z.infer<typeof SunPositionParamsSchema>;
/**
* Parameters for finding the next sun event
*/
export declare const NextSunEventParamsSchema: z.ZodObject<{
event: z.ZodNativeEnum<typeof SunEventType>;
date: z.ZodOptional<z.ZodString>;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
count: z.ZodOptional<z.ZodNumber>;
format: z.ZodOptional<z.ZodEnum<["json", "text"]>>;
timezone: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
event: SunEventType;
latitude: number;
longitude: number;
date?: string | undefined;
format?: "text" | "json" | undefined;
count?: number | undefined;
timezone?: string | undefined;
}, {
event: SunEventType;
latitude: number;
longitude: number;
date?: string | undefined;
format?: "text" | "json" | undefined;
count?: number | undefined;
timezone?: string | undefined;
}>;
export type NextSunEventParams = z.infer<typeof NextSunEventParamsSchema>;
/**
* Service for sun calculations
*/
export declare class SunService {
/**
* Get sun times for a specific date and location
* @param params Parameters for the request
* @returns Sun times information
*/
getSunTimes(params: SunTimesParams): SunTimesInfo;
/**
* Get sun times for a date range
* @param params Parameters for the request
* @returns Array of sun times information
*/
getSunTimesRange(params: SunTimesRangeParams): SunTimesInfo[];
/**
* Get sun position for a specific date, time, and location
* @param params Parameters for the request
* @returns Sun position information
*/
getSunPosition(params: SunPositionParams): SunPositionInfo;
/**
* Get the next occurrence(s) of a specific sun event
* @param params Parameters for the request
* @returns Array of dates for the next occurrences of the specified event
*/
getNextSunEvent(params: NextSunEventParams): {
date: string;
time: string;
event: string;
}[];
}