/** * @fileoverview `ntfy_publish_message` — sends or updates a push notification * on an ntfy topic. Single tool covering all 18 publish parameters; updates * ride this tool by setting `sequence_id`. Publishes whose side effects leave * the notification drawer (`email`, `call`, `broadcast` / `http` buttons) pass * through a user-confirmation gate: the first such call returns an input * request and the publish only fires once the retried call carries an approval. * @module mcp-server/tools/definitions/ntfy-publish-message.tool */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const ntfyPublishMessage: import("@cyanheads/mcp-ts-core").ToolDefinition; message: z.ZodOptional; title: z.ZodOptional; priority: z.ZodOptional; tags: z.ZodOptional>; click: z.ZodOptional; attach: z.ZodOptional; icon: z.ZodOptional; filename: z.ZodOptional; markdown: z.ZodOptional; actions: z.ZodOptional; label: z.ZodString; url: z.ZodString; clear: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"broadcast">; label: z.ZodString; intent: z.ZodOptional; extras: z.ZodOptional>; clear: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"http">; label: z.ZodString; url: z.ZodString; method: z.ZodOptional; headers: z.ZodOptional>; body: z.ZodOptional; clear: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"copy">; label: z.ZodString; value: z.ZodString; clear: z.ZodOptional; }, z.core.$strip>], "action">>>; delay: z.ZodOptional; email: z.ZodOptional; call: z.ZodOptional; sequence_id: z.ZodOptional; cache: z.ZodOptional; firebase: z.ZodOptional; base_url: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ id: z.ZodString; time: z.ZodString; topic: z.ZodString; url: z.ZodString; expires: z.ZodOptional; sequence_id: z.ZodOptional; scheduled: z.ZodOptional; title: z.ZodOptional; message: z.ZodOptional; priority: z.ZodOptional; tags: z.ZodOptional>; click: z.ZodOptional; attachment: z.ZodOptional; size: z.ZodOptional; expires: z.ZodOptional; }, z.core.$strip>>; actions: z.ZodOptional; label: z.ZodString; url: z.ZodString; clear: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"broadcast">; label: z.ZodString; intent: z.ZodOptional; extras: z.ZodOptional>; clear: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"http">; label: z.ZodString; url: z.ZodString; method: z.ZodOptional; headers: z.ZodOptional>; body: z.ZodOptional; clear: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ action: z.ZodLiteral<"copy">; label: z.ZodString; value: z.ZodString; clear: z.ZodOptional; }, z.core.$strip>], "action">>>; }, z.core.$strip>, readonly [{ readonly reason: "consent_declined"; readonly code: JsonRpcErrorCode.Forbidden; readonly when: "The publish carried an out-of-band side effect (`email`, `call`, or a `broadcast`/`http` action button), the user was asked to confirm it, and declined, cancelled, or answered with a payload that did not parse."; readonly severity: "notice"; readonly recovery: "Confirm with the user which recipient or action they intended, or drop `email` / `call` / the action button and publish as a plain notification."; }, { readonly reason: "forbidden_topic"; readonly code: JsonRpcErrorCode.Forbidden; readonly when: "Auth required for the target topic."; readonly recovery: "Try a public topic instead; if this topic must stay protected, ask the operator to configure ntfy auth (`NTFY_AUTH_TOKEN`, or `NTFY_AUTH_USERNAME` + `NTFY_AUTH_PASSWORD`, or per-host entries in `NTFY_SERVERS`) before retrying."; readonly thrownBy: "service"; }, { readonly reason: "rate_limited"; readonly code: JsonRpcErrorCode.RateLimited; readonly when: "Upstream returned 429 after retries were exhausted."; readonly retryable: true; readonly recovery: "Wait the rate-limit window (typically minutes on ntfy.sh's free tier) before retrying, or reduce publish frequency."; readonly thrownBy: "service"; }, { readonly reason: "payload_too_large"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "Upstream returned 413, or rejected the request as too large — the message body or attachment exceeds server limits."; readonly recovery: "Shorten the message (≤4096 bytes plain) or host the long content as an external URL via `attach`."; readonly thrownBy: "service"; }, { readonly reason: "invalid_attachment"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "ntfy rejected the `attach` URL as malformed."; readonly recovery: "Pass `attach` an absolute URL (`https://host/path/file.jpg`) to an already-hosted file — the recipient device fetches it, so a local path will not work, and shortening the message will not help."; readonly thrownBy: "service"; }, { readonly reason: "unverified_contact"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "`email`/`call` set but the authenticated user has no verified address/number, or auth is missing."; readonly recovery: "Drop the `email`/`call` field and resend; if forwarding is essential, ask the operator to verify the address or number in the ntfy account settings."; readonly thrownBy: "service"; }, { readonly reason: "upstream_unreachable"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "DNS, connection, or network failure reaching the ntfy server after retries were exhausted."; readonly retryable: true; readonly recovery: "Verify the configured `NTFY_BASE_URL` (or per-call `base_url`) resolves and is reachable; check network connectivity, then retry."; readonly thrownBy: "service"; }], undefined>; //# sourceMappingURL=ntfy-publish-message.tool.d.ts.map