UNPKG

ntfy-mcp-server

Version:

An MCP (Model Context Protocol) server designed to interact with the ntfy push notification service. It enables LLMs and AI agents to send notifications to your devices with extensive customization options.

253 lines (252 loc) 7.96 kB
import { z } from 'zod'; /** * Valid priority levels for ntfy messages */ export declare const NTFY_PRIORITIES: readonly [1, 2, 3, 4, 5]; /** * Creates a Zod schema for the send_ntfy tool with current environment values * This function should be called at registration time to ensure it has the * latest configuration values from the environment * * @returns A Zod schema for the ntfy tool */ export declare function createSendNtfyToolSchema(): z.ZodObject<{ topic: z.ZodEffects<z.ZodString, string, string>; message: z.ZodString; title: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; priority: z.ZodOptional<z.ZodNumber>; click: z.ZodOptional<z.ZodString>; actions: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; label: z.ZodString; action: z.ZodString; url: z.ZodOptional<z.ZodString>; method: z.ZodOptional<z.ZodString>; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; body: z.ZodOptional<z.ZodString>; clear: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { id: string; label: string; action: string; method?: string | undefined; url?: string | undefined; headers?: Record<string, string> | undefined; body?: string | undefined; clear?: boolean | undefined; }, { id: string; label: string; action: string; method?: string | undefined; url?: string | undefined; headers?: Record<string, string> | undefined; body?: string | undefined; clear?: boolean | undefined; }>, "many">>; attachment: z.ZodOptional<z.ZodObject<{ url: z.ZodString; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; name?: string | undefined; }, { url: string; name?: string | undefined; }>>; email: z.ZodOptional<z.ZodString>; delay: z.ZodOptional<z.ZodString>; cache: z.ZodOptional<z.ZodString>; firebase: z.ZodOptional<z.ZodString>; id: z.ZodOptional<z.ZodString>; expires: z.ZodOptional<z.ZodString>; markdown: z.ZodOptional<z.ZodBoolean>; baseUrl: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { message: string; topic: string; title?: string | undefined; id?: string | undefined; priority?: number | undefined; tags?: string[] | undefined; baseUrl?: string | undefined; click?: string | undefined; actions?: { id: string; label: string; action: string; method?: string | undefined; url?: string | undefined; headers?: Record<string, string> | undefined; body?: string | undefined; clear?: boolean | undefined; }[] | undefined; attachment?: { url: string; name?: string | undefined; } | undefined; email?: string | undefined; delay?: string | undefined; cache?: string | undefined; firebase?: string | undefined; expires?: string | undefined; markdown?: boolean | undefined; }, { message: string; topic: string; title?: string | undefined; id?: string | undefined; priority?: number | undefined; tags?: string[] | undefined; baseUrl?: string | undefined; click?: string | undefined; actions?: { id: string; label: string; action: string; method?: string | undefined; url?: string | undefined; headers?: Record<string, string> | undefined; body?: string | undefined; clear?: boolean | undefined; }[] | undefined; attachment?: { url: string; name?: string | undefined; } | undefined; email?: string | undefined; delay?: string | undefined; cache?: string | undefined; firebase?: string | undefined; expires?: string | undefined; markdown?: boolean | undefined; }>; export declare const SendNtfyToolInputSchema: () => z.ZodObject<{ topic: z.ZodEffects<z.ZodString, string, string>; message: z.ZodString; title: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; priority: z.ZodOptional<z.ZodNumber>; click: z.ZodOptional<z.ZodString>; actions: z.ZodOptional<z.ZodArray<z.ZodObject<{ id: z.ZodString; label: z.ZodString; action: z.ZodString; url: z.ZodOptional<z.ZodString>; method: z.ZodOptional<z.ZodString>; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; body: z.ZodOptional<z.ZodString>; clear: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { id: string; label: string; action: string; method?: string | undefined; url?: string | undefined; headers?: Record<string, string> | undefined; body?: string | undefined; clear?: boolean | undefined; }, { id: string; label: string; action: string; method?: string | undefined; url?: string | undefined; headers?: Record<string, string> | undefined; body?: string | undefined; clear?: boolean | undefined; }>, "many">>; attachment: z.ZodOptional<z.ZodObject<{ url: z.ZodString; name: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; name?: string | undefined; }, { url: string; name?: string | undefined; }>>; email: z.ZodOptional<z.ZodString>; delay: z.ZodOptional<z.ZodString>; cache: z.ZodOptional<z.ZodString>; firebase: z.ZodOptional<z.ZodString>; id: z.ZodOptional<z.ZodString>; expires: z.ZodOptional<z.ZodString>; markdown: z.ZodOptional<z.ZodBoolean>; baseUrl: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { message: string; topic: string; title?: string | undefined; id?: string | undefined; priority?: number | undefined; tags?: string[] | undefined; baseUrl?: string | undefined; click?: string | undefined; actions?: { id: string; label: string; action: string; method?: string | undefined; url?: string | undefined; headers?: Record<string, string> | undefined; body?: string | undefined; clear?: boolean | undefined; }[] | undefined; attachment?: { url: string; name?: string | undefined; } | undefined; email?: string | undefined; delay?: string | undefined; cache?: string | undefined; firebase?: string | undefined; expires?: string | undefined; markdown?: boolean | undefined; }, { message: string; topic: string; title?: string | undefined; id?: string | undefined; priority?: number | undefined; tags?: string[] | undefined; baseUrl?: string | undefined; click?: string | undefined; actions?: { id: string; label: string; action: string; method?: string | undefined; url?: string | undefined; headers?: Record<string, string> | undefined; body?: string | undefined; clear?: boolean | undefined; }[] | undefined; attachment?: { url: string; name?: string | undefined; } | undefined; email?: string | undefined; delay?: string | undefined; cache?: string | undefined; firebase?: string | undefined; expires?: string | undefined; markdown?: boolean | undefined; }>; export type SendNtfyToolInput = z.infer<ReturnType<typeof createSendNtfyToolSchema>>; /** * Response structure for the send_ntfy tool */ export interface SendNtfyToolResponse { success: boolean; id: string; topic: string; time: number; expires?: number; message: string; title?: string; url?: string; /** Number of retries needed (if any) */ retries?: number; }