redditapis-mcp 0.14.1 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.0 (2026-11-04)
4
+
5
+ ### Reddit ads library search
6
+
7
+ One new tool.
8
+
9
+ - `reddit_ads_search` (`GET /api/reddit/ads/search`): search the promoted posts advertisers run on Reddit. Each ad carries its advertiser, title, landing page, call to action, media, every subreddit it appeared in, first and last seen dates and sightings. Reddit's own house ads are excluded. Optional filters: `q` (title or advertiser text, up to 200 characters), `advertiser` (a `u/` prefix is stripped), `domain` (landing page hostname), `subreddit` (an `r/` prefix is stripped), `campaign_id`, `since` (ads last seen on or after it) and `until` (ads first seen on or before it), with `limit` 1 to 100 (default 25). Newest first; pass the previous response's `after` as `cursor` for the next page. Returns `{ ads, count, after, has_more }`. Billed at the read rate, the same as `reddit_search`.
10
+
11
+ 60 tools, 33 of them Reddit reads.
12
+
13
+ ## 0.15.0 (2026-10-25)
14
+
15
+ ### Post flairs, and posts and comments scheduled for later
16
+
17
+ Four new tools.
18
+
19
+ - `reddit_subreddit_flairs` (`GET /api/reddit/sub/{name}/flairs`): a subreddit's post flair templates, each with the `id` a post takes as `flair_id`, its `text`, whether it is `editable`, its colours and whether it is `mod_only`. Reddit lists flairs only to signed-in accounts, so it reads as the connected Reddit session; with none it answers 503 `SESSION_REQUIRED` and is not charged. Billed at the read rate otherwise.
20
+ - `reddit_scheduled_create` (`POST /api/reddit/schedule`): schedule a post or a comment, 60 seconds to 30 days ahead. It runs as the connected session at `run_at`. Free to schedule; billed at the write rate only when the run succeeds.
21
+ - `reddit_scheduled_list` (`GET /api/reddit/schedule`): the account's scheduled actions with status, result or error, and whether each was billed. Free.
22
+ - `reddit_scheduled_cancel` (`POST /api/reddit/schedule/cancel`): cancel an action that has not run. Free. Marked destructive.
23
+
24
+ None of the four takes a cookie or a proxy, so a host built with `inlineCredentials: false` lists all of them. A 503 `session_required` now reads as "no Reddit session is connected, not charged" instead of an upstream error, and a 404 from the schedule routes names the scheduled action instead of a subreddit or post.
25
+
3
26
  ## 0.14.1 (2026-10-25)
4
27
 
5
28
  - `reddit_monitor_health`: the description now explains the per-feed health fields: `consecutive_errors`, `last_poll_error.detail` (why a feed's checks are failing: `HTTP_403`, `HTTP_429` or `network_error`), and `retry_within_s` (the longest a failing feed waits for its next check). No code change.
package/README.md CHANGED
@@ -104,7 +104,7 @@ Authentication is a Bearer token: the server sends `Authorization: Bearer <REDDI
104
104
 
105
105
  ## Tools
106
106
 
107
- 55 tools and 3 playbook resources: 31 Reddit reads, 7 Reddit account tools (connect, status, disconnect, comment, submit, vote, DM), 10 monitor/webhook management tools, `reddit_set_watch` (one call that stands up a whole watch), `reddit_explain` (where the rows you are holding came from), 3 feedback tools, and 2 account tools (`reddit_account_me`, which is also where the credit balance lives, and `reddit_account_payments`, the top-up history). Reddit writes (commenting, posting, voting, DMs) act as YOUR Reddit account and only after you connect it with `reddit_connect`; each is marked as a write so your client asks before it runs. Monitor/webhook tools configure your OWN redditapis.com account (an alerting subscription), never Reddit itself, and the feedback tools send a report to the redditapis.com team, never to Reddit. Every read works with just your API key; the 6 monitor/webhook writes additionally need an active monitoring plan (see Monitoring below). The feedback tools are free and need only your key.
107
+ 60 tools and 3 playbook resources: 33 Reddit reads, 10 Reddit account tools (connect, status, disconnect, comment, submit, vote, DM, and schedule, list or cancel a post or comment for later), 10 monitor/webhook management tools, `reddit_set_watch` (one call that stands up a whole watch), `reddit_explain` (where the rows you are holding came from), 3 feedback tools, and 2 account tools (`reddit_account_me`, which is also where the credit balance lives, and `reddit_account_payments`, the top-up history). Reddit writes (commenting, posting, voting, DMs) act as YOUR Reddit account and only after you connect it with `reddit_connect`; each is marked as a write so your client asks before it runs. Monitor/webhook tools configure your OWN redditapis.com account (an alerting subscription), never Reddit itself, and the feedback tools send a report to the redditapis.com team, never to Reddit. Every read works with just your API key; the 6 monitor/webhook writes additionally need an active monitoring plan (see Monitoring below). The feedback tools are free and need only your key.
108
108
 
109
109
  A few conventions across the catalog:
110
110
 
@@ -123,6 +123,7 @@ A few conventions across the catalog:
123
123
  | `reddit_search_media` | `GET /api/reddit/search/media` | Search posts filtered to media, narrowed by `kind` (`image`, `video`, `gif`, `all`). |
124
124
  | `reddit_search_communities` | `GET /api/reddit/search/communities` | Find subreddits by name or topic (title, subscribers, description, NSFW flag). |
125
125
  | `reddit_search_users` | `GET /api/reddit/search/users` | Find redditors by name or keyword (username, karma, account age). |
126
+ | `reddit_ads_search` | `GET /api/reddit/ads/search` | Search the Reddit ads library: promoted posts with advertiser, title, landing page, call to action, media, every subreddit each ad appeared in, first and last seen dates and sightings. Filter by `q`, `advertiser`, `domain`, `subreddit`, `campaign_id`, `since` and `until`. Reddit's own house ads are excluded. Newest first; page with `cursor` (the previous response's `after`). Returns `ads`, `count`, `after` and `has_more`. Billed at the read rate, the same as `reddit_search`. |
126
127
 
127
128
  ### Subreddits
128
129
 
@@ -137,6 +138,7 @@ A few conventions across the catalog:
137
138
  | `reddit_subreddit_about` | `GET /api/reddit/sub/{name}/about` | A subreddit's public metadata: title, description, subscriber and active-user counts, type, NSFW flag. |
138
139
  | `reddit_subreddit_rules` | `GET /api/reddit/sub/{name}/rules` | A subreddit's posting rules plus Reddit's site-wide rules. |
139
140
  | `reddit_subreddit_moderators` | `GET /api/reddit/sub/{name}/moderators` | A subreddit's moderator team, each with permissions, flair, and when they joined. |
141
+ | `reddit_subreddit_flairs` | `GET /api/reddit/sub/{name}/flairs` | A subreddit's post flair templates (`id`, `text`, `editable`, colours, `mod_only`), so a post can carry the `flair_id` the community requires. Reddit lists flairs only to signed-in accounts, so it reads as your connected Reddit session; with none connected it answers 503 `SESSION_REQUIRED` and is not charged. |
140
142
  | `reddit_subreddit_wiki` | `GET /api/reddit/sub/{name}/wiki/{page}` | A subreddit's wiki page by name and `page` (markdown + HTML, revision metadata). |
141
143
 
142
144
  ### Posts and comments
@@ -218,7 +220,7 @@ The bodies are documentation and name the calls they are recipes for, which is t
218
220
  { "method": "resources/read", "params": { "uri": "playbook://subreddit-audit" } }
219
221
  ```
220
222
 
221
- ### Your Reddit account: connect once, then comment, post, vote and DM
223
+ ### Your Reddit account: connect once, then comment, post, vote, DM and schedule
222
224
 
223
225
  `reddit_connect` stores your Reddit session on our side, encrypted (AES-256-GCM, the key held only by the API), against this API key's account, after checking it with Reddit. Every write after that sends no cookies, so they never sit in your agent's tool calls or transcript. Each write acts publicly as you, so it is marked as a write and your client asks before it runs. Connecting, status and disconnecting are free.
224
226
 
@@ -231,6 +233,9 @@ The bodies are documentation and name the calls they are recipes for, which is t
231
233
  | `reddit_submit` | `POST /api/reddit/submit` | Submit a text or link post to a subreddit as you. |
232
234
  | `reddit_vote` | `POST /api/reddit/vote` | Upvote, downvote or clear a vote on a post or comment as you. |
233
235
  | `reddit_dm` | `POST /api/reddit/dm` | Send a private chat message as you. |
236
+ | `reddit_scheduled_create` | `POST /api/reddit/schedule` | Schedule a post or a comment for later (`run_at` 60 seconds to 30 days ahead). It runs as your connected session at that time. Free to schedule; billed at the write rate only when the run succeeds. |
237
+ | `reddit_scheduled_list` | `GET /api/reddit/schedule` | Your scheduled posts and comments, newest first, with each one's `status`, `result` or `error`, and whether it was `billed`. Free. |
238
+ | `reddit_scheduled_cancel` | `POST /api/reddit/schedule/cancel` | Cancel a scheduled post or comment that has not run yet. A cancelled action never runs and is not charged. Free. |
234
239
 
235
240
  ### Feedback: tell the team what broke, after you review the draft
236
241
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "redditapis-mcp",
3
- "version": "0.14.1",
3
+ "version": "0.16.0",
4
4
  "mcpName": "io.github.redditapis/redditapis-mcp",
5
- "description": "Official MCP server for redditapis.com. Search Reddit posts, comments, communities, users and media; read subreddits, comment trees, top posts and profiles; create and manage monitors and webhooks. Native tools for Claude, Cursor and any MCP client.",
5
+ "description": "Official MCP server for redditapis.com. Search Reddit posts, comments, communities, users and media; read subreddits, comment trees and profiles; search the Reddit ads library; manage monitors and webhooks. Works with Claude, Cursor and any MCP client.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/redditapis/redditapis-mcp.git"
@@ -31,7 +31,7 @@
31
31
  "scripts": {
32
32
  "start": "node src/index.js",
33
33
  "check": "node --check src/index.js && node --check src/tools.js && node --check src/feedback.js && node --check src/server.js && node --check src/watch.js && node --check src/watch-text.js && node --check src/provenance.js && node --check src/playbooks.js && node --check src/annotations.js",
34
- "test": "node test/tools.test.mjs && node test/watch.test.mjs && node test/watch-invariants.test.mjs && node test/provenance.test.mjs && node test/playbooks.test.mjs && node test/description-compliance.test.mjs && node test/inline-credentials.test.mjs && node test/feedback.test.mjs && node test/index-lasterror.test.mjs && node test/scannable-without-key.test.mjs && node test/per-caller-state.test.mjs && node test/paywall.test.mjs && node test/remote-host.test.mjs && node test/hub-parity.test.mjs && node test/version-parity.test.mjs && node test/readme-opening.test.mjs && node test/annotations.test.mjs && node test/read-price.test.mjs",
34
+ "test": "node test/tools.test.mjs && node test/watch.test.mjs && node test/watch-invariants.test.mjs && node test/provenance.test.mjs && node test/playbooks.test.mjs && node test/description-compliance.test.mjs && node test/inline-credentials.test.mjs && node test/feedback.test.mjs && node test/index-lasterror.test.mjs && node test/scannable-without-key.test.mjs && node test/per-caller-state.test.mjs && node test/paywall.test.mjs && node test/remote-host.test.mjs && node test/hub-parity.test.mjs && node test/version-parity.test.mjs && node test/readme-opening.test.mjs && node test/annotations.test.mjs && node test/read-price.test.mjs && node test/flairs-schedule.test.mjs && node test/ads-search.test.mjs",
35
35
  "prepublishOnly": "node scripts/prepublish-tenant-check.mjs",
36
36
  "postpublish": "node scripts/postpublish.mjs",
37
37
  "check:registry-drift": "node scripts/registry-drift.mjs",
@@ -42,6 +42,7 @@ export const TOOL_ANNOTATIONS = {
42
42
  reddit_deep_comment_search: { title: "Deep Comment Search", ...READ_REDDIT },
43
43
  reddit_search_media: { title: "Search Media Posts", ...READ_REDDIT },
44
44
  reddit_search_users: { title: "Search Users", ...READ_REDDIT },
45
+ reddit_ads_search: { title: "Search Reddit Ads", ...READ_REDDIT },
45
46
  reddit_subreddit_top: { title: "Top Subreddit Posts", ...READ_REDDIT },
46
47
  reddit_post: { title: "Get Post", ...READ_REDDIT },
47
48
  reddit_user_profile: { title: "Get User Profile", ...READ_REDDIT },
@@ -56,6 +57,7 @@ export const TOOL_ANNOTATIONS = {
56
57
  reddit_subreddit_about: { title: "Get Subreddit Info", ...READ_REDDIT },
57
58
  reddit_subreddit_rules: { title: "Get Subreddit Rules", ...READ_REDDIT },
58
59
  reddit_subreddit_moderators: { title: "List Subreddit Moderators", ...READ_REDDIT },
60
+ reddit_subreddit_flairs: { title: "List Subreddit Post Flairs", ...READ_REDDIT },
59
61
  reddit_subreddit_wiki: { title: "Subreddit Wiki Page", ...READ_REDDIT },
60
62
  reddit_by_id: { title: "Get Posts by ID", ...READ_REDDIT },
61
63
  reddit_subreddits_popular: { title: "List Popular Subreddits", ...READ_REDDIT },
@@ -94,6 +96,14 @@ export const TOOL_ANNOTATIONS = {
94
96
  reddit_submit: { title: "Submit Post", readOnly: false, destructive: false, idempotent: false, openWorld: true },
95
97
  reddit_vote: { title: "Vote", readOnly: false, destructive: false, idempotent: true, openWorld: true },
96
98
  reddit_dm: { title: "Send Direct Message", readOnly: false, destructive: false, idempotent: false, openWorld: true },
99
+
100
+ // Scheduled posts and comments. create is openWorld: the call itself only stores the action,
101
+ // but its effect is a post or comment on Reddit at run_at, so a client weighs it like submit.
102
+ // cancel discards a pending action (destructive), repeating it changes nothing (idempotent),
103
+ // and it reaches only this service. list reads this account's own state.
104
+ reddit_scheduled_create: { title: "Schedule Reddit Action", readOnly: false, destructive: false, idempotent: false, openWorld: true },
105
+ reddit_scheduled_list: { title: "List Scheduled Actions", ...READ_OWN },
106
+ reddit_scheduled_cancel: { title: "Cancel Scheduled Action", readOnly: false, destructive: true, idempotent: true, openWorld: false },
97
107
  };
98
108
 
99
109
  /**
package/src/server.js CHANGED
@@ -43,6 +43,7 @@ export const DEFAULT_TIMEOUT_MS = 30000;
43
43
  const NOT_FOUND_HINTS = [
44
44
  [/^\/feedback/, " (not found. No feedback report with that id on this account, and an id from another account will not resolve here. Use the id returned by reddit_feedback_send action=send.)"],
45
45
  [/^\/account/, " (not found. That account resource does not exist for this key.)"],
46
+ [/^\/api\/reddit\/schedule/, " (not found. No scheduled action with that id on this account; reddit_scheduled_list shows the ids this account has.)"],
46
47
  ];
47
48
  const DEFAULT_NOT_FOUND_HINT =
48
49
  " (not found. The subreddit, post id, user, or permalink may be wrong or deleted)";
@@ -140,6 +141,11 @@ export function hintFor(status, path, error) {
140
141
  // (0.11.0). Both get the "did not complete in time" hint, keyed on the error.
141
142
  if (status === 408 || (status === 503 && error === "upstream_timeout")) return " (the read did not complete in time; retry after the retry_after seconds)";
142
143
  if (status === 429) return " (slow down: wait the retry_after seconds, keep this key's reads in flight under the limit the message names, then retry)";
144
+ // A read Reddit serves only to a signed-in account (post flairs, moderators), asked with no
145
+ // Reddit session connected: the API answers 503 session_required before Reddit is asked, and
146
+ // does not charge it. Retrying cannot help, so it is named rather than called an upstream error.
147
+ // No tool is named: a host built without inline credentials does not list the connect tool.
148
+ if (status === 503 && error === "session_required") return " (Reddit serves this only to a signed-in account and no Reddit session is connected for this API key, so Reddit was not asked. Not charged. Connecting the Reddit account (POST /api/reddit/session) and retrying answers it.)";
143
149
  if (status >= 500) return " (upstream API error. Retry in a moment; if persistent, contact https://www.redditapis.com)";
144
150
  return "";
145
151
  }
package/src/tools.js CHANGED
@@ -394,6 +394,28 @@ export const TOOLS = [
394
394
  "Searches for Reddit users (redditors) by name or keyword. Returns matching accounts with username, karma, and account age. Example: q='spez'.",
395
395
  shape: { ...QUERY, ...AFTER, ...NSFW, ...LIMIT },
396
396
  },
397
+ {
398
+ // The ads library: an index of promoted posts, read at the read rate like
399
+ // reddit_search. Paged with `cursor` (the previous page's `after`), not
400
+ // `after`, because that is the query param the endpoint takes.
401
+ name: "reddit_ads_search",
402
+ path: "/api/reddit/ads/search",
403
+ description:
404
+ "Search the Reddit ads library: promoted posts advertisers run on Reddit, with advertiser, title, landing page, call to action, media, every subreddit each ad appeared in, first and last seen dates and sightings. Reddit's own house ads are excluded. Newest first; page with cursor. Billed at the read rate, the same as a post search.",
405
+ shape: {
406
+ q: z.string().max(200).optional().describe("Text to find in the ad title or the advertiser name, up to 200 characters."),
407
+ advertiser: z.string().optional().describe("Advertiser username. A u/ prefix is stripped."),
408
+ domain: z.string().optional().describe("Landing page hostname, e.g. shop.example.com."),
409
+ subreddit: z.string().optional().describe("Subreddit the ad was seen in. An r/ prefix is stripped."),
410
+ campaign_id: z.string().optional().describe("Reddit campaign id, as returned in an ad's `campaign_id`."),
411
+ since: z.string().optional().describe("ISO 8601 date: only ads last seen on or after it."),
412
+ until: z.string().optional().describe("ISO 8601 date: only ads first seen on or before it."),
413
+ limit: z.number().int().min(1).max(100).optional().describe("Number of ads to return, 1 to 100 (default 25)."),
414
+ cursor: z.string().optional().describe(
415
+ "Pagination cursor: the previous response's `after` value, passed back exactly. A null `after` (has_more false) means there is no next page. Absent on the opening page.",
416
+ ),
417
+ },
418
+ },
397
419
  {
398
420
  name: "reddit_subreddit_top",
399
421
  path: "/api/reddit/sub/{name}/top",
@@ -580,6 +602,24 @@ export const TOOLS = [
580
602
  ),
581
603
  },
582
604
  },
605
+ {
606
+ // POST FLAIR TEMPLATES (GET /api/reddit/sub/:name/flairs). Reddit lists these
607
+ // only to a signed-in account, so the API reads them as the session stored for
608
+ // this key (or as session headers, which this tool deliberately does not take:
609
+ // a cookie argument would hide the tool on a host built without inline
610
+ // credentials). With no session the API answers an unbilled 503
611
+ // SESSION_REQUIRED before Reddit is asked; hintFor in src/server.js turns that
612
+ // into a sentence the caller can act on.
613
+ name: "reddit_subreddit_flairs",
614
+ path: "/api/reddit/sub/{name}/flairs",
615
+ description:
616
+ "Lists a subreddit's post (link) flair templates by name: the flairs a new post in that community can carry. Returns `subreddit`, `count` and `flairs`, each with `id` (the value a post submission takes as flair_id), `text`, `editable` (true when a custom flair_text is accepted with that id), `type` (text or richtext), `background_color`, `text_color`, `css_class`, `mod_only`, `max_emojis`, `allowable_content` and `richtext`. Many subreddits remove a post that has no flair. Reddit lists flairs only to signed-in accounts, so the read runs as the Reddit session connected for this API key; with none connected it answers 503 SESSION_REQUIRED before Reddit is asked, and that answer is not charged. A moderator's session sees every template, mod-only ones included; any other account sees the templates it can post with, listed with mod_only false. A subreddit with no post flairs returns an empty list. Billed at the read rate, including a 403 or 404 from Reddit. Example: name='SaaS'.",
617
+ shape: {
618
+ name: z.string().min(1).max(21).describe(
619
+ "Subreddit name WITHOUT the r/ prefix (e.g. 'SaaS'), 1 to 21 letters, digits or underscores. Required (path parameter).",
620
+ ),
621
+ },
622
+ },
583
623
  {
584
624
  name: "reddit_subreddit_wiki",
585
625
  path: "/api/reddit/sub/{name}/wiki/{page}",
@@ -931,6 +971,67 @@ export const TOOLS = [
931
971
  message: z.string().min(1).describe("Plain-text message body."),
932
972
  },
933
973
  },
974
+
975
+ // ── SCHEDULED POSTS AND COMMENTS (POST/GET /api/reddit/schedule, POST /api/reddit/schedule/cancel) ──
976
+ // An action is the body the live submit or comment route takes, stored and replayed through
977
+ // that same route at run_at as the account's STORED session (the one reddit_connect saves).
978
+ // Scheduling, listing and cancelling are free; a run that succeeds is billed at the write rate,
979
+ // a failed or cancelled one is not. The request carries no cookies and no proxy: the API refuses
980
+ // both with SESSION_FIELDS_NOT_STORED, so none appear in this schema either, and the tools stay
981
+ // listed on a host built without inline credentials.
982
+ {
983
+ name: "reddit_scheduled_create",
984
+ path: "/api/reddit/schedule",
985
+ method: "POST",
986
+ write: true,
987
+ description:
988
+ "Schedules a Reddit post or comment to be made later as the connected account, at `run_at` (60 seconds to 30 days ahead). At that time the stored request runs through the same path a live post submission or comment takes, as the Reddit session connected when it runs, so a session logged out in between makes the run fail without a charge. A public action on Reddit under the customer's name, marked as a write so a client can ask before it runs; a subreddit's rules decide whether a post stays up. Due actions are picked up every 30 seconds and run one at a time, normally within about a minute of `run_at`. A failed run is not retried: it is recorded as failed with Reddit's reason. Up to 100 actions can wait per account (409 SCHEDULE_LIMIT_REACHED past that). Scheduling is free; a run that succeeds is billed at the write rate to this API key, and a failed or cancelled one is not charged. With no connected session it answers 400 SESSION_NOT_CONNECTED. Returns 201 with `action`: `id`, `type`, `status` (scheduled), `run_at`, the stored `request`, `created_at`, `finished_at`, `result`, `error` and `billed`.",
989
+ shape: {
990
+ type: z.enum(["post", "comment"]).describe("post = a new post in a subreddit, comment = a comment on a post."),
991
+ run_at: z.union([z.string().min(1), z.number().int().positive()]).describe(
992
+ "When it runs: an ISO 8601 timestamp with a time zone (e.g. '2026-10-21T15:00:00Z' or '2026-10-21T17:00:00+02:00') or Unix seconds. 60 seconds to 30 days ahead. A timestamp without a zone is refused.",
993
+ ),
994
+ request: z.object({
995
+ subreddit: z.string().min(1).optional().describe("Post: subreddit name, without r/. Required for a post."),
996
+ kind: z.enum(["self", "link"]).optional().describe("Post: self = text post, link = URL post. Required for a post."),
997
+ title: z.string().min(1).max(300).optional().describe("Post: title, up to 300 characters. Required for a post."),
998
+ url: z.string().optional().describe("Post: target URL, for kind link."),
999
+ flair_id: z.string().optional().describe("Post: post flair template id, for subreddits that require flair."),
1000
+ flair_text: z.string().optional().describe("Post: post flair text, when the flair template allows editing it."),
1001
+ nsfw: z.boolean().optional().describe("Post: mark the post NSFW."),
1002
+ spoiler: z.boolean().optional().describe("Post: mark the post as a spoiler."),
1003
+ sendreplies: z.boolean().optional().describe("Post: send inbox replies to the account."),
1004
+ post_url: z.string().min(1).optional().describe("Comment: the reddit.com post URL to comment on. Required for a comment."),
1005
+ text: z.string().optional().describe("Post: body text, for kind self. Comment: the comment text, up to 10,000 characters, required."),
1006
+ }).describe(
1007
+ "The body the live route takes, without cookies or a proxy. A post takes subreddit, kind and title, plus text or url and the optional flair and flag fields; a comment takes post_url and text. A field that does not belong to the type is refused with a 400 naming it.",
1008
+ ),
1009
+ },
1010
+ },
1011
+ {
1012
+ name: "reddit_scheduled_list",
1013
+ path: "/api/reddit/schedule",
1014
+ description:
1015
+ "Lists this account's scheduled posts and comments, newest first. Returns `actions` and `count`. Each action carries `id`, `type`, `status` (scheduled, running, succeeded, failed or cancelled), `run_at`, the stored `request`, `created_at`, `finished_at`, `result` (what the post or comment returned, when the run succeeded), `error` (`code`, `message` and `http_status`, when the run failed) and `billed`: true for a run that succeeded, false for one that failed with an answer or was cancelled, null when the outcome was not confirmed (error EXECUTION_UNCONFIRMED or EXECUTION_INTERRUPTED, where the post or comment may still have been made and charged). Free.",
1016
+ shape: {
1017
+ status: z.enum(["scheduled", "running", "succeeded", "failed", "cancelled"]).optional().describe(
1018
+ "Only actions in this status. Absent, every status is listed.",
1019
+ ),
1020
+ limit: z.number().int().min(1).max(100).optional().describe("Maximum actions returned, 1 to 100. Default 50."),
1021
+ },
1022
+ },
1023
+ {
1024
+ name: "reddit_scheduled_cancel",
1025
+ path: "/api/reddit/schedule/cancel",
1026
+ method: "POST",
1027
+ write: true,
1028
+ destructive: true,
1029
+ description:
1030
+ "Cancels a scheduled post or comment by its id, while it has not run yet. Returns `cancelled`, the `action` and a `message`. An action that was still scheduled comes back with cancelled true: it will not run and is not charged. An action that already ran, or is running, comes back with cancelled false and its current status, and nothing changes. 404 NOT_FOUND when the id is not a scheduled action on this account. Free.",
1031
+ shape: {
1032
+ id: z.string().uuid().describe("The action id, as returned when the action was scheduled or listed."),
1033
+ },
1034
+ },
934
1035
  {
935
1036
  // ONE CALL INSTEAD OF THREE. Standing up a watch today means composing a
936
1037
  // webhook registration, a monitor creation and a test delivery, each with