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.
36 lines (35 loc) • 1.32 kB
TypeScript
import { z } from "zod";
import { McpToolResponse } from "./mcp.js";
export declare const BaseErrorCode: {
readonly UNAUTHORIZED: "UNAUTHORIZED";
readonly FORBIDDEN: "FORBIDDEN";
readonly NOT_FOUND: "NOT_FOUND";
readonly CONFLICT: "CONFLICT";
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
readonly RATE_LIMITED: "RATE_LIMITED";
readonly TIMEOUT: "TIMEOUT";
readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE";
readonly INTERNAL_ERROR: "INTERNAL_ERROR";
readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
};
export type BaseErrorCode = typeof BaseErrorCode[keyof typeof BaseErrorCode];
export declare class McpError extends Error {
code: BaseErrorCode;
details?: Record<string, unknown> | undefined;
constructor(code: BaseErrorCode, message: string, details?: Record<string, unknown> | undefined);
toResponse(): McpToolResponse;
}
export declare const ErrorSchema: z.ZodObject<{
code: z.ZodString;
message: z.ZodString;
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
message: string;
code: string;
details?: Record<string, unknown> | undefined;
}, {
message: string;
code: string;
details?: Record<string, unknown> | undefined;
}>;
export type ErrorResponse = z.infer<typeof ErrorSchema>;