@xreplyai/mcp 0.3.11 → 0.3.17

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/README.md CHANGED
@@ -1,16 +1,17 @@
1
1
  # @xreplyai/mcp
2
2
 
3
- MCP server for [XreplyAI](https://xreplyai.com) — plan, generate, and schedule tweets in your voice. Browse viral content for inspiration, manage your post queue, and publish to X/Twitter from any AI agent.
3
+ MCP server for [XreplyAI](https://xreplyai.com) — plan, generate, and schedule posts in your voice. Manage your post queue and publish to X/Twitter from any AI agent.
4
4
 
5
5
  ## Features
6
6
 
7
- 13 tools covering the full posts workflow:
7
+ 29 tools covering the full posts workflow across 8 platforms:
8
8
 
9
- - **Discovery** — Browse the viral tweet library filtered by niche
10
- - **Generation** — Generate single posts or batches in your voice
11
- - **Post management** — Create, edit, delete posts
12
- - **Publishing** — Publish immediately or schedule to X/Twitter
13
- - **Context** — Check billing, voice profile, preferences, and custom rules
9
+ - **Generation** — Generate single posts, threads, batches, or LinkedIn carousels in your voice
10
+ - **Post management** — Create, edit, delete, and list posts
11
+ - **Publishing** — Publish immediately or schedule to any connected platform
12
+ - **Media uploads** — Images and video for X, LinkedIn, Instagram, Threads, Bluesky, Pinterest, TikTok, and YouTube
13
+ - **Context** — Billing status, voice profile, preferences, platform styles, and custom rules
14
+ - **Accounts & communities** — List connected social accounts, X communities, and Pinterest boards
14
15
 
15
16
  ## Requirements
16
17
 
@@ -37,7 +38,7 @@ Add to your Claude Desktop config file:
37
38
  "mcpServers": {
38
39
  "xreply": {
39
40
  "command": "npx",
40
- "args": ["@xreplyai/mcp@0.3.9"],
41
+ "args": ["@xreplyai/mcp@0.3.17"],
41
42
  "env": {
42
43
  "XREPLY_TOKEN": "your-jwt-token-here"
43
44
  }
@@ -51,7 +52,7 @@ Add to your Claude Desktop config file:
51
52
  Run this command:
52
53
 
53
54
  ```bash
54
- claude mcp add xreply -e XREPLY_TOKEN=your-jwt-token-here -- npx @xreplyai/mcp@0.3.9
55
+ claude mcp add xreply -e XREPLY_TOKEN=your-jwt-token-here -- npx @xreplyai/mcp@0.3.17
55
56
  ```
56
57
 
57
58
  Then run `claude mcp list` to confirm it's registered.
@@ -63,7 +64,7 @@ Or add manually to `~/.claude/mcp.json`:
63
64
  "mcpServers": {
64
65
  "xreply": {
65
66
  "command": "npx",
66
- "args": ["@xreplyai/mcp@0.3.9"],
67
+ "args": ["@xreplyai/mcp@0.3.17"],
67
68
  "env": {
68
69
  "XREPLY_TOKEN": "your-jwt-token-here"
69
70
  }
@@ -85,7 +86,7 @@ Or add manually to `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` g
85
86
  "mcpServers": {
86
87
  "xreply": {
87
88
  "command": "npx",
88
- "args": ["@xreplyai/mcp@0.3.9"],
89
+ "args": ["@xreplyai/mcp@0.3.17"],
89
90
  "env": {
90
91
  "XREPLY_TOKEN": "your-jwt-token-here"
91
92
  }
@@ -103,7 +104,7 @@ Open Windsurf and go to **Plugins → Manage plugins → View raw config**, then
103
104
  "mcpServers": {
104
105
  "xreply": {
105
106
  "command": "npx",
106
- "args": ["@xreplyai/mcp@0.3.9"],
107
+ "args": ["@xreplyai/mcp@0.3.17"],
107
108
  "env": {
108
109
  "XREPLY_TOKEN": "your-jwt-token-here"
109
110
  }
@@ -144,7 +145,7 @@ cp -r mcp/openclaw/ ~/.openclaw/skills/xreply/
144
145
  }
145
146
  ```
146
147
 
147
- The skill uses `mcporter` to bridge OpenClaw to the XReply MCP server. Install it with:
148
+ The skill uses `mcporter` to bridge OpenClaw to the XreplyAI MCP server. Install it with:
148
149
 
149
150
  ```bash
150
151
  npm install -g mcporter
@@ -158,53 +159,73 @@ openclaw skills list --eligible
158
159
 
159
160
  ## Tools
160
161
 
161
- ### Discovery
162
-
163
- | Tool | Description |
164
- |------|-------------|
165
- | `xreply_viral_library` | Browse viral tweets (100+ likes) filtered by niche and sort |
166
-
167
162
  ### Generation
168
163
 
169
164
  | Tool | Description |
170
165
  |------|-------------|
171
- | `xreply_posts_generate` | Generate a single post in your voice |
172
- | `xreply_posts_generate_batch` | Generate 1-9 posts at once by category |
166
+ | `xreply_posts_generate` | Generate a single post in your voice (all platforms) |
167
+ | `xreply_posts_generate_batch` | Generate 19 posts at once by category (Personalized/Trending/Viral) |
168
+ | `xreply_posts_generate_thread` | Generate a 2–10 tweet X thread in your voice |
169
+ | `xreply_carousel_generate` | Generate a LinkedIn PDF carousel (3–12 slides) |
173
170
 
174
171
  ### Post Management
175
172
 
176
173
  | Tool | Description |
177
174
  |------|-------------|
178
175
  | `xreply_posts_list` | List all posts in your queue |
179
- | `xreply_posts_create` | Save a post draft |
180
- | `xreply_posts_edit` | Edit body or scheduled time |
176
+ | `xreply_posts_create` | Save a post draft (per-platform content) |
177
+ | `xreply_posts_edit` | Edit body, scheduled time, or metadata |
181
178
  | `xreply_posts_delete` | Delete a post |
182
179
 
183
180
  ### Publishing
184
181
 
185
182
  | Tool | Description |
186
183
  |------|-------------|
187
- | `xreply_posts_publish` | Publish now or schedule to X/Twitter |
184
+ | `xreply_posts_publish` | Publish now or schedule to any connected platform |
188
185
 
189
- ### Context
186
+ ### Media Uploads
190
187
 
191
188
  | Tool | Description |
192
189
  |------|-------------|
193
- | `xreply_billing_status` | Check subscription tier and quota |
190
+ | `xreply_media_upload` | Upload an image for X or LinkedIn |
191
+ | `xreply_video_upload` | Upload a video for LinkedIn |
192
+ | `xreply_youtube_upload` | Upload a video for YouTube (presigned R2) |
193
+ | `xreply_instagram_media_upload` | Upload an image or video for Instagram |
194
+ | `xreply_threads_media_upload` | Upload an image for Threads |
195
+ | `xreply_bluesky_media_upload` | Upload an image for Bluesky (returns blob ref) |
196
+ | `xreply_pinterest_media_upload` | Upload an image for Pinterest |
197
+ | `xreply_linkedin_document_upload` | Upload a PDF for LinkedIn carousels |
198
+ | `xreply_tiktok_image_upload` | Upload an image for TikTok |
199
+ | `xreply_tiktok_video_upload` | Upload a video for TikTok (presigned R2) |
200
+
201
+ ### Context & Config
202
+
203
+ | Tool | Description |
204
+ |------|-------------|
205
+ | `xreply_billing_status` | Check subscription tier, quota, and limits |
194
206
  | `xreply_voice_status` | Check voice profile analysis status |
195
- | `xreply_preferences_get` | Get generation preferences |
196
- | `xreply_preferences_set` | Update tone, emoji, structure preferences |
197
- | `xreply_rules_list` | List custom writing rules |
207
+ | `xreply_preferences_get` | Get generation preferences (tone, emoji, structure) |
208
+ | `xreply_preferences_set` | Update tone, emoji, and structure preferences |
209
+ | `xreply_platform_styles_get` | Get per-platform style profiles |
210
+ | `xreply_platform_styles_set` | Override style settings for a specific platform |
211
+ | `xreply_rules_list` | List custom writing rules (Pro/BYOK) |
212
+ | `xreply_list_social_accounts` | List connected social accounts with IDs |
213
+
214
+ ### Communities & Boards
215
+
216
+ | Tool | Description |
217
+ |------|-------------|
218
+ | `xreply_list_twitter_communities` | List recently-used X communities |
219
+ | `xreply_pinterest_boards` | List the user's Pinterest boards (with `force_refresh`) |
198
220
 
199
221
  ## Example workflows
200
222
 
201
223
  ### Plan posts for the week
202
224
 
203
225
  ```
204
- 1. xreply_viral_library (niche: "saas") — find inspiration
205
- 2. xreply_posts_generate_batch (category: "personalized", count: 7) generate 7 posts
206
- 3. xreply_posts_create save the ones you like
207
- 4. xreply_posts_edit (id: X, scheduled_at: "2026-03-10T09:00:00Z") — schedule each
226
+ 1. xreply_posts_generate_batch (category: "personalized", count: 7) — generate 7 posts
227
+ 2. xreply_posts_listreview the queue
228
+ 3. xreply_posts_edit (id: X, scheduled_at: "2026-03-10T09:00:00Z") schedule each
208
229
  ```
209
230
 
210
231
  ### Quick post
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AA0BnE,wBAAgB,YAAY,IAAI,MAAM,CA8BrC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AA4BnE,wBAAgB,YAAY,IAAI,MAAM,CA8BrC"}
package/dist/server.js CHANGED
@@ -3,15 +3,17 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextpro
3
3
  import { getClient } from "./client.js";
4
4
  import { postTools } from "./tools/posts.js";
5
5
  import { publishTools } from "./tools/publish.js";
6
- import { viralLibraryTools } from "./tools/viral-library.js";
7
6
  import { contextTools } from "./tools/context.js";
8
7
  import { communityTools } from "./tools/communities.js";
8
+ import { mediaTools } from "./tools/media.js";
9
+ import { pinterestTools } from "./tools/pinterest.js";
9
10
  const ALL_TOOLS = [
10
11
  ...postTools,
11
12
  ...publishTools,
12
- ...viralLibraryTools,
13
13
  ...contextTools,
14
14
  ...communityTools,
15
+ ...mediaTools,
16
+ ...pinterestTools,
15
17
  ];
16
18
  const TOOL_MAP = new Map(ALL_TOOLS.map((t) => [t.name, t]));
17
19
  export function createServer() {
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,MAAM,SAAS,GAAqB;IAClC,GAAG,SAAS;IACZ,GAAG,YAAY;IACf,GAAG,iBAAiB;IACpB,GAAG,YAAY;IACf,GAAG,cAAc;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EAAE,CAAC,CAAC;YAC3B,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,WAAW,EAAE,CAAC,CAAC,WAAW;YAC1B,WAAW,EAAE,CAAC,CAAC,WAAW;SAC3B,CAAC,CAAC;KACJ,CAAC,CAAC,CAAC;IAEJ,MAAM,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,KAAK,EAAE,OAAO,EAA2B,EAAE;QACzF,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QACjD,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEhC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,IAAI,EAAE,EAAE,CAAC;gBAC1D,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,IAAI,EAAE,CAA4B,EAAE,MAAM,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../src/tools/communities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AAoB7D,eAAO,MAAM,cAAc,EAAE,cAAc,EAmB1C,CAAC"}
1
+ {"version":3,"file":"communities.d.ts","sourceRoot":"","sources":["../../src/tools/communities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AAa7D,eAAO,MAAM,cAAc,EAAE,cAAc,EAmB1C,CAAC"}
@@ -1,10 +1,4 @@
1
- function ok(data) {
2
- return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
3
- }
4
- function err(error) {
5
- const message = error instanceof Error ? error.message : String(error);
6
- return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
7
- }
1
+ import { ok, err } from "./helpers.js";
8
2
  export const communityTools = [
9
3
  {
10
4
  name: "xreply_list_twitter_communities",
@@ -1 +1 @@
1
- {"version":3,"file":"communities.js","sourceRoot":"","sources":["../../src/tools/communities.ts"],"names":[],"mappings":"AAGA,SAAS,EAAE,CAAC,IAAa;IACvB,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC9E,CAAC;AAED,SAAS,GAAG,CAAC,KAAc;IACzB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACnF,CAAC;AAWD,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C;QACE,IAAI,EAAE,iCAAiC;QACvC,WAAW,EACT,uNAAuN;QACzN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;QACD,KAAK,CAAC,OAAO,CAAC,KAA8B,EAAE,MAAoB;YAChE,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAA6B,6BAA6B,CAAC,CAAC;gBAC3F,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;YAChB,CAAC;QACH,CAAC;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"communities.js","sourceRoot":"","sources":["../../src/tools/communities.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAWvC,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C;QACE,IAAI,EAAE,iCAAiC;QACvC,WAAW,EACT,uNAAuN;QACzN,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;QACD,KAAK,CAAC,OAAO,CAAC,KAA8B,EAAE,MAAoB;YAChE,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAA6B,6BAA6B,CAAC,CAAC;gBAC3F,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;YAChB,CAAC;QACH,CAAC;KACF;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/tools/context.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AAuB7D,eAAO,MAAM,YAAY,EAAE,cAAc,EAyIxC,CAAC"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/tools/context.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AA8B7D,eAAO,MAAM,YAAY,EAAE,cAAc,EAoOxC,CAAC"}
@@ -1,11 +1,17 @@
1
1
  import { z } from "zod";
2
- function ok(data) {
3
- return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
4
- }
5
- function err(error) {
6
- const message = error instanceof Error ? error.message : String(error);
7
- return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
8
- }
2
+ import { ok, err } from "./helpers.js";
3
+ const PlatformStylesGetSchema = z.object({
4
+ platform: z.enum(["twitter", "linkedin", "threads", "instagram", "youtube", "bluesky", "facebook", "google_business"]).optional(),
5
+ });
6
+ const PlatformStylesSetSchema = z.object({
7
+ platform: z.enum(["twitter", "linkedin", "threads", "instagram", "youtube", "bluesky", "facebook", "google_business"]),
8
+ tone: z.enum(["auto", "casual", "professional", "witty", "empathetic"]).optional(),
9
+ target_length: z.number().int().positive().optional(),
10
+ hashtag_rules: z.enum(["none", "few", "moderate", "match_voice"]).optional(),
11
+ cta_rules: z.enum(["never", "soft_question", "link_in_comments", "direct"]).optional(),
12
+ banned_phrases: z.array(z.string()).optional(),
13
+ custom_instructions: z.string().max(500).optional(),
14
+ });
9
15
  const PreferencesSetSchema = z.object({
10
16
  tone: z
11
17
  .enum(["auto", "casual", "professional", "witty", "empathetic"])
@@ -108,7 +114,7 @@ export const contextTools = [
108
114
  },
109
115
  {
110
116
  name: "xreply_list_social_accounts",
111
- description: "List all connected social accounts (X/Twitter, LinkedIn) with their IDs, platform, username, and primary status. Use this to find account_id values needed for xreply_posts_create and xreply_posts_publish.",
117
+ description: "List all connected social accounts (X/Twitter, LinkedIn, YouTube, Threads, Instagram) with their IDs, platform, username, and primary status. Use this to find account_id values needed for xreply_posts_create and xreply_posts_publish.",
112
118
  inputSchema: {
113
119
  type: "object",
114
120
  properties: {},
@@ -124,6 +130,92 @@ export const contextTools = [
124
130
  }
125
131
  },
126
132
  },
133
+ {
134
+ name: "xreply_platform_styles_get",
135
+ description: "Get the effective platform style profiles — system defaults merged with your per-platform overrides. Shows tone, structure, length targets, hashtag rules, CTA rules, and whether defaults are in use. Optionally filter to a single platform.",
136
+ inputSchema: {
137
+ type: "object",
138
+ properties: {
139
+ platform: {
140
+ type: "string",
141
+ enum: ["twitter", "linkedin", "threads", "instagram", "youtube", "bluesky", "facebook"],
142
+ description: "Optional — get a single platform's profile. Omit to get all platforms.",
143
+ },
144
+ },
145
+ required: [],
146
+ },
147
+ async handler(args, client) {
148
+ try {
149
+ const { platform } = PlatformStylesGetSchema.parse(args);
150
+ const result = await client.get("/api/v1/platform_styles");
151
+ if (platform) {
152
+ const profile = result.platform_styles[platform];
153
+ if (!profile) {
154
+ return err(`Unknown platform: ${platform}`);
155
+ }
156
+ return ok({ platform, platform_style: profile });
157
+ }
158
+ return ok(result);
159
+ }
160
+ catch (e) {
161
+ return err(e);
162
+ }
163
+ },
164
+ },
165
+ {
166
+ name: "xreply_platform_styles_set",
167
+ description: "Override style settings for a specific platform. Only the fields you provide are updated — other fields keep their defaults. Use this to customize tone, length, hashtag rules, CTA rules, banned phrases, or add custom instructions per platform.",
168
+ inputSchema: {
169
+ type: "object",
170
+ properties: {
171
+ platform: {
172
+ type: "string",
173
+ enum: ["twitter", "linkedin", "threads", "instagram", "youtube", "bluesky", "facebook"],
174
+ description: "Platform to update",
175
+ },
176
+ tone: {
177
+ type: "string",
178
+ enum: ["auto", "casual", "professional", "witty", "empathetic"],
179
+ description: "Tone override for this platform",
180
+ },
181
+ target_length: {
182
+ type: "integer",
183
+ description: "Target character length for generated posts on this platform",
184
+ },
185
+ hashtag_rules: {
186
+ type: "string",
187
+ enum: ["none", "few", "moderate", "match_voice"],
188
+ description: "Hashtag usage rule for this platform",
189
+ },
190
+ cta_rules: {
191
+ type: "string",
192
+ enum: ["never", "soft_question", "link_in_comments", "direct"],
193
+ description: "Call-to-action rule for this platform",
194
+ },
195
+ banned_phrases: {
196
+ type: "array",
197
+ items: { type: "string" },
198
+ description: "Phrases to never use in generated content for this platform",
199
+ },
200
+ custom_instructions: {
201
+ type: "string",
202
+ maxLength: 500,
203
+ description: "Free-text instructions applied when generating for this platform (max 500 chars)",
204
+ },
205
+ },
206
+ required: ["platform"],
207
+ },
208
+ async handler(args, client) {
209
+ try {
210
+ const { platform, ...overrides } = PlatformStylesSetSchema.parse(args);
211
+ const result = await client.patch(`/api/v1/platform_styles/${platform}`, { platform_style: overrides });
212
+ return ok(result);
213
+ }
214
+ catch (e) {
215
+ return err(e);
216
+ }
217
+ },
218
+ },
127
219
  {
128
220
  name: "xreply_rules_list",
129
221
  description: "List custom writing rules that are applied during post generation — e.g., 'never use hashtags', 'always end with a question'. Requires Pro or BYOK subscription.",
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/tools/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,SAAS,EAAE,CAAC,IAAa;IACvB,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC9E,CAAC;AAED,SAAS,GAAG,CAAC,KAAc;IACzB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACnF,CAAC;AAED,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;SAC/D,QAAQ,EAAE;SACV,QAAQ,CAAC,iBAAiB,CAAC;IAC9B,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC7F,SAAS,EAAE,CAAC;SACT,IAAI,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE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"}
@@ -0,0 +1,4 @@
1
+ import type { ToolResult } from "./posts.js";
2
+ export declare function ok(data: unknown): ToolResult;
3
+ export declare function err(error: unknown): ToolResult;
4
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/tools/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,wBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAE5C;AAED,wBAAgB,GAAG,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAG9C"}
@@ -0,0 +1,8 @@
1
+ export function ok(data) {
2
+ return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
3
+ }
4
+ export function err(error) {
5
+ const message = error instanceof Error ? error.message : String(error);
6
+ return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
7
+ }
8
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/tools/helpers.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,EAAE,CAAC,IAAa;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,KAAc;IAChC,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACnF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ToolDefinition } from "./posts.js";
2
+ export declare const _fs: {
3
+ readFile: (path: string) => Buffer;
4
+ };
5
+ export declare const mediaTools: ToolDefinition[];
6
+ //# sourceMappingURL=media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/tools/media.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,eAAO,MAAM,GAAG;qBAAsB,MAAM,KAAG,MAAM;CAAkC,CAAC;AAuCxF,eAAO,MAAM,UAAU,EAAE,cAAc,EAyTtC,CAAC"}