posterly-mcp-server 0.20.2 → 0.20.3
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 +2 -1
- package/dist/index.js +10 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/ask-support.d.ts +36 -1
- package/dist/tools/ask-support.js +25 -17
- package/package.json +1 -1
- package/src/index.ts +15 -1
- package/src/lib/version.ts +1 -1
- package/src/tools/ask-support.ts +28 -17
package/README.md
CHANGED
|
@@ -108,7 +108,7 @@ Add the same server definition to your Cursor MCP settings:
|
|
|
108
108
|
|
|
109
109
|
## Available tools
|
|
110
110
|
|
|
111
|
-
`posterly-mcp-server@0.20.
|
|
111
|
+
`posterly-mcp-server@0.20.3` exposes 58 tools.
|
|
112
112
|
|
|
113
113
|
Public setup tools work before `POSTERLY_API_KEY` exists:
|
|
114
114
|
|
|
@@ -140,6 +140,7 @@ Authenticated tools require `POSTERLY_API_KEY`:
|
|
|
140
140
|
- `get_post`
|
|
141
141
|
- `get_post_missing`
|
|
142
142
|
- `ask_support` (authenticated docs-backed support with read-only account/post diagnostics; human tickets require explicit confirmation)
|
|
143
|
+
- `get_support` (alias for `ask_support` for agents that look for get-style support tools)
|
|
143
144
|
- `create_post` (supports `thread_posts: string[]` for X / Threads reply chains, plus `platform_settings` for platform-specific composer controls)
|
|
144
145
|
- `create_posts_batch` (create up to 25 confirmed posts in one API request)
|
|
145
146
|
- `update_post` (also accepts `platform_settings`)
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import { listPostsTool } from './tools/list-posts.js';
|
|
|
20
20
|
import { uploadMediaTool } from './tools/upload-media.js';
|
|
21
21
|
import { getPostTool } from './tools/get-post.js';
|
|
22
22
|
import { getPostMissingTool } from './tools/get-post-missing.js';
|
|
23
|
-
import { askSupportTool } from './tools/ask-support.js';
|
|
23
|
+
import { askSupportTool, getSupportTool } from './tools/ask-support.js';
|
|
24
24
|
import { updatePostTool } from './tools/update-post.js';
|
|
25
25
|
import { updatePostStatusTool } from './tools/update-post-status.js';
|
|
26
26
|
import { updatePostReleaseIdTool } from './tools/update-post-release-id.js';
|
|
@@ -399,6 +399,15 @@ server.tool(askSupportTool.name, askSupportTool.description, askSupportTool.inpu
|
|
|
399
399
|
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
400
400
|
}
|
|
401
401
|
});
|
|
402
|
+
server.tool(getSupportTool.name, getSupportTool.description, getSupportTool.inputSchema.shape, async (input) => {
|
|
403
|
+
try {
|
|
404
|
+
const text = await getSupportTool.execute(client, input);
|
|
405
|
+
return { content: [{ type: 'text', text }] };
|
|
406
|
+
}
|
|
407
|
+
catch (err) {
|
|
408
|
+
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
409
|
+
}
|
|
410
|
+
});
|
|
402
411
|
server.tool(updatePostTool.name, updatePostTool.description, updatePostTool.inputSchema.shape, async (input) => {
|
|
403
412
|
try {
|
|
404
413
|
const text = await updatePostTool.execute(client, input);
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const POSTERLY_MCP_VERSION = "0.20.
|
|
1
|
+
export declare const POSTERLY_MCP_VERSION = "0.20.3";
|
package/dist/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const POSTERLY_MCP_VERSION = '0.20.
|
|
1
|
+
export const POSTERLY_MCP_VERSION = '0.20.3';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { AskSupportPayload, PosterlyClient } from '../lib/api-client.js';
|
|
3
|
+
declare function executeSupport(client: PosterlyClient, input: AskSupportPayload): Promise<string>;
|
|
3
4
|
export declare const askSupportTool: {
|
|
4
5
|
name: string;
|
|
5
6
|
description: string;
|
|
@@ -31,5 +32,39 @@ export declare const askSupportTool: {
|
|
|
31
32
|
request_human?: boolean | undefined;
|
|
32
33
|
confirm_escalation?: boolean | undefined;
|
|
33
34
|
}>;
|
|
34
|
-
execute
|
|
35
|
+
execute: typeof executeSupport;
|
|
35
36
|
};
|
|
37
|
+
export declare const getSupportTool: {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
inputSchema: z.ZodObject<{
|
|
41
|
+
question: z.ZodString;
|
|
42
|
+
workspace_id: z.ZodOptional<z.ZodString>;
|
|
43
|
+
conversation_id: z.ZodOptional<z.ZodString>;
|
|
44
|
+
page_url: z.ZodOptional<z.ZodString>;
|
|
45
|
+
post_id: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
referenced_post_ids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
47
|
+
request_human: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
48
|
+
confirm_escalation: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
question: string;
|
|
51
|
+
workspace_id?: string | undefined;
|
|
52
|
+
post_id?: number | undefined;
|
|
53
|
+
conversation_id?: string | undefined;
|
|
54
|
+
page_url?: string | undefined;
|
|
55
|
+
referenced_post_ids?: number[] | undefined;
|
|
56
|
+
request_human?: boolean | undefined;
|
|
57
|
+
confirm_escalation?: boolean | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
question: string;
|
|
60
|
+
workspace_id?: string | undefined;
|
|
61
|
+
post_id?: number | undefined;
|
|
62
|
+
conversation_id?: string | undefined;
|
|
63
|
+
page_url?: string | undefined;
|
|
64
|
+
referenced_post_ids?: number[] | undefined;
|
|
65
|
+
request_human?: boolean | undefined;
|
|
66
|
+
confirm_escalation?: boolean | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
execute: typeof executeSupport;
|
|
69
|
+
};
|
|
70
|
+
export {};
|
|
@@ -23,24 +23,32 @@ function formatSupportAnswer(result) {
|
|
|
23
23
|
mdSection('Status', mdBullets(status)),
|
|
24
24
|
].filter(Boolean).join('\n\n');
|
|
25
25
|
}
|
|
26
|
+
const supportInputSchema = z.object({
|
|
27
|
+
question: z.string().trim().min(1).max(4000),
|
|
28
|
+
workspace_id: z.string().optional().describe('Workspace to inspect. Omit to use the API-key scoped workspace or personal workspace.'),
|
|
29
|
+
conversation_id: z.string().optional().describe('Continue a previous support conversation.'),
|
|
30
|
+
page_url: z.string().max(2000).optional().describe('Optional Posterly page URL for context.'),
|
|
31
|
+
post_id: z.number().int().positive().optional().describe('Optional post ID to inspect directly.'),
|
|
32
|
+
referenced_post_ids: z.array(z.number().int().positive()).max(5).optional().describe('Optional post IDs to include in read-only diagnostics.'),
|
|
33
|
+
request_human: z.boolean().default(false).optional().describe('Ask for human review. Does not create a ticket unless confirm_escalation is also true.'),
|
|
34
|
+
confirm_escalation: z.boolean().default(false).optional().describe('Must be true after explicit user confirmation before a human support ticket can be created.'),
|
|
35
|
+
});
|
|
36
|
+
async function executeSupport(client, input) {
|
|
37
|
+
if (input.confirm_escalation === true && input.request_human !== true) {
|
|
38
|
+
throw new Error('confirm_escalation=true only has an effect when request_human=true.');
|
|
39
|
+
}
|
|
40
|
+
const result = await client.askSupport(input);
|
|
41
|
+
return formatSupportAnswer(result);
|
|
42
|
+
}
|
|
26
43
|
export const askSupportTool = {
|
|
27
44
|
name: 'ask_support',
|
|
28
45
|
description: 'Ask Posterly Support AI an authenticated question using Posterly docs plus read-only account/post diagnostics for the caller workspace. Requires POSTERLY_API_KEY with accounts:read and posts:read scopes. Human ticket creation requires request_human=true and confirm_escalation=true after explicit user confirmation.',
|
|
29
|
-
inputSchema:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
confirm_escalation: z.boolean().default(false).optional().describe('Must be true after explicit user confirmation before a human support ticket can be created.'),
|
|
38
|
-
}),
|
|
39
|
-
async execute(client, input) {
|
|
40
|
-
if (input.confirm_escalation === true && input.request_human !== true) {
|
|
41
|
-
throw new Error('confirm_escalation=true only has an effect when request_human=true.');
|
|
42
|
-
}
|
|
43
|
-
const result = await client.askSupport(input);
|
|
44
|
-
return formatSupportAnswer(result);
|
|
45
|
-
},
|
|
46
|
+
inputSchema: supportInputSchema,
|
|
47
|
+
execute: executeSupport,
|
|
48
|
+
};
|
|
49
|
+
export const getSupportTool = {
|
|
50
|
+
name: 'get_support',
|
|
51
|
+
description: 'Alias for ask_support. Ask Posterly Support AI an authenticated question using Posterly docs plus read-only account/post diagnostics. Human tickets require request_human=true and confirm_escalation=true after explicit user confirmation.',
|
|
52
|
+
inputSchema: supportInputSchema,
|
|
53
|
+
execute: executeSupport,
|
|
46
54
|
};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { listPostsTool } from './tools/list-posts.js';
|
|
|
21
21
|
import { uploadMediaTool } from './tools/upload-media.js';
|
|
22
22
|
import { getPostTool } from './tools/get-post.js';
|
|
23
23
|
import { getPostMissingTool } from './tools/get-post-missing.js';
|
|
24
|
-
import { askSupportTool } from './tools/ask-support.js';
|
|
24
|
+
import { askSupportTool, getSupportTool } from './tools/ask-support.js';
|
|
25
25
|
import { updatePostTool } from './tools/update-post.js';
|
|
26
26
|
import { updatePostStatusTool } from './tools/update-post-status.js';
|
|
27
27
|
import { updatePostReleaseIdTool } from './tools/update-post-release-id.js';
|
|
@@ -588,6 +588,20 @@ server.tool(
|
|
|
588
588
|
}
|
|
589
589
|
);
|
|
590
590
|
|
|
591
|
+
server.tool(
|
|
592
|
+
getSupportTool.name,
|
|
593
|
+
getSupportTool.description,
|
|
594
|
+
getSupportTool.inputSchema.shape,
|
|
595
|
+
async (input) => {
|
|
596
|
+
try {
|
|
597
|
+
const text = await getSupportTool.execute(client, input as any);
|
|
598
|
+
return { content: [{ type: 'text' as const, text }] };
|
|
599
|
+
} catch (err: any) {
|
|
600
|
+
return { content: [{ type: 'text' as const, text: `Error: ${err.message}` }], isError: true };
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
|
|
591
605
|
server.tool(
|
|
592
606
|
updatePostTool.name,
|
|
593
607
|
updatePostTool.description,
|
package/src/lib/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const POSTERLY_MCP_VERSION = '0.20.
|
|
1
|
+
export const POSTERLY_MCP_VERSION = '0.20.3';
|
package/src/tools/ask-support.ts
CHANGED
|
@@ -27,26 +27,37 @@ function formatSupportAnswer(result: AskSupportResponse): string {
|
|
|
27
27
|
].filter(Boolean).join('\n\n');
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
const supportInputSchema = z.object({
|
|
31
|
+
question: z.string().trim().min(1).max(4000),
|
|
32
|
+
workspace_id: z.string().optional().describe('Workspace to inspect. Omit to use the API-key scoped workspace or personal workspace.'),
|
|
33
|
+
conversation_id: z.string().optional().describe('Continue a previous support conversation.'),
|
|
34
|
+
page_url: z.string().max(2000).optional().describe('Optional Posterly page URL for context.'),
|
|
35
|
+
post_id: z.number().int().positive().optional().describe('Optional post ID to inspect directly.'),
|
|
36
|
+
referenced_post_ids: z.array(z.number().int().positive()).max(5).optional().describe('Optional post IDs to include in read-only diagnostics.'),
|
|
37
|
+
request_human: z.boolean().default(false).optional().describe('Ask for human review. Does not create a ticket unless confirm_escalation is also true.'),
|
|
38
|
+
confirm_escalation: z.boolean().default(false).optional().describe('Must be true after explicit user confirmation before a human support ticket can be created.'),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
async function executeSupport(client: PosterlyClient, input: AskSupportPayload) {
|
|
42
|
+
if (input.confirm_escalation === true && input.request_human !== true) {
|
|
43
|
+
throw new Error('confirm_escalation=true only has an effect when request_human=true.');
|
|
44
|
+
}
|
|
45
|
+
const result = await client.askSupport(input);
|
|
46
|
+
return formatSupportAnswer(result);
|
|
47
|
+
}
|
|
48
|
+
|
|
30
49
|
export const askSupportTool = {
|
|
31
50
|
name: 'ask_support',
|
|
32
51
|
description:
|
|
33
52
|
'Ask Posterly Support AI an authenticated question using Posterly docs plus read-only account/post diagnostics for the caller workspace. Requires POSTERLY_API_KEY with accounts:read and posts:read scopes. Human ticket creation requires request_human=true and confirm_escalation=true after explicit user confirmation.',
|
|
34
|
-
inputSchema:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
conversation_id: z.string().optional().describe('Continue a previous support conversation.'),
|
|
38
|
-
page_url: z.string().max(2000).optional().describe('Optional Posterly page URL for context.'),
|
|
39
|
-
post_id: z.number().int().positive().optional().describe('Optional post ID to inspect directly.'),
|
|
40
|
-
referenced_post_ids: z.array(z.number().int().positive()).max(5).optional().describe('Optional post IDs to include in read-only diagnostics.'),
|
|
41
|
-
request_human: z.boolean().default(false).optional().describe('Ask for human review. Does not create a ticket unless confirm_escalation is also true.'),
|
|
42
|
-
confirm_escalation: z.boolean().default(false).optional().describe('Must be true after explicit user confirmation before a human support ticket can be created.'),
|
|
43
|
-
}),
|
|
53
|
+
inputSchema: supportInputSchema,
|
|
54
|
+
execute: executeSupport,
|
|
55
|
+
};
|
|
44
56
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
57
|
+
export const getSupportTool = {
|
|
58
|
+
name: 'get_support',
|
|
59
|
+
description:
|
|
60
|
+
'Alias for ask_support. Ask Posterly Support AI an authenticated question using Posterly docs plus read-only account/post diagnostics. Human tickets require request_human=true and confirm_escalation=true after explicit user confirmation.',
|
|
61
|
+
inputSchema: supportInputSchema,
|
|
62
|
+
execute: executeSupport,
|
|
52
63
|
};
|