posterly-mcp-server 0.54.4 → 0.54.6

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
@@ -123,7 +123,7 @@ Add the same server definition to your Cursor MCP settings:
123
123
 
124
124
  ## Available tools
125
125
 
126
- `posterly-mcp-server@0.54.4` exposes 67 tools covering 103 actions. The hosted HTTP endpoint exposes the same catalog minus the three signup tools: 64 tools covering 100 actions.
126
+ `posterly-mcp-server@0.54.6` exposes 67 tools covering 103 actions. The hosted HTTP endpoint exposes the same catalog minus the three signup tools: 64 tools covering 100 actions.
127
127
 
128
128
  Many tools pick what to do with one parameter: `view` (reads), `action` (writes), or `type`. A few pick their mode from which parameters you pass (for example `update_post` with `status` changes the status instead of editing). Every tool description names all of its views and actions.
129
129
 
@@ -308,7 +308,7 @@ Google Business Profile reviews, media, and audits.
308
308
 
309
309
  | View | What it does |
310
310
  | --- | --- |
311
- | `reviews` (default) | Google reviews |
311
+ | `reviews` (default) | Google reviews, each with `review_name` for a reply |
312
312
  | `review_link` | Google review link |
313
313
 
314
314
  **`manage_google_business_review`**: Manage Google reviews
@@ -319,6 +319,8 @@ Google Business Profile reviews, media, and audits.
319
319
  | `reply` | Reply to a review (preview then confirm) |
320
320
  | `delete_reply` | Delete a review reply (preview then confirm) |
321
321
 
322
+ Each review from `list_google_business_reviews` includes `review_name` (`accounts/{account}/locations/{location}/reviews/{review}`) plus `account_id` and `location_id` when known. Pass that `review_name` with `account_id` (or `location_id`) to `manage_google_business_review` `reply` or `delete_reply`. Do not pass the Place ID from `view=review_link`.
323
+
322
324
  **`manage_google_business_media`**: Manage Google profile media
323
325
 
324
326
  | Action | What it does |
@@ -1016,6 +1016,8 @@ export interface PostAnalyticsResponse {
1016
1016
  }
1017
1017
  export interface GoogleBusinessReview {
1018
1018
  name?: string;
1019
+ /** Same resource name as `name`, the value reply and delete_reply accept. */
1020
+ review_name?: string;
1019
1021
  reviewId?: string;
1020
1022
  reviewer?: {
1021
1023
  displayName?: string;
@@ -1096,6 +1098,8 @@ export interface InboxListParams {
1096
1098
  search?: string;
1097
1099
  limit?: number;
1098
1100
  offset?: number;
1101
+ since?: string;
1102
+ until?: string;
1099
1103
  }
1100
1104
  export interface InboxConversationsResponse {
1101
1105
  conversations: Array<Record<string, unknown>>;
@@ -827,6 +827,10 @@ export class PosterlyClient {
827
827
  searchParams.set('limit', String(params.limit));
828
828
  if (params?.offset != null)
829
829
  searchParams.set('offset', String(params.offset));
830
+ if (params?.since)
831
+ searchParams.set('since', params.since);
832
+ if (params?.until)
833
+ searchParams.set('until', params.until);
830
834
  }
831
835
  async listConversations(params) {
832
836
  const searchParams = new URLSearchParams();
@@ -44,7 +44,7 @@ const descriptions = {
44
44
  list_media: 'List uploaded media assets or files uploaded to a selected media-drop session.',
45
45
  generate_captions: 'Generate or adapt text caption suggestions for social platforms. Uses the caption allowance and does not create or publish posts.',
46
46
  list_analytics: 'Read account analytics, post analytics, post feedback insights, or missing-post requirements using the view selector.',
47
- list_google_business_reviews: 'Read Google Business Profile reviews or the public review link using the view selector.',
47
+ list_google_business_reviews: 'Read Google Business Profile reviews, including each review_name needed to reply, or the public review link using the view selector.',
48
48
  audit_google_business_profile: 'Read and audit a connected Google Business Profile location: completeness, categories, media, attributes, reviews, and recommendations.',
49
49
  manage_google_business_review: 'Suggest text replies, publish owner replies, or delete owner replies to Google Business reviews using the action selector. Suggestions do not publish a reply.',
50
50
  list_google_business_media: 'Read existing photos and videos in connected Google Business Profile galleries.',
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The Google review resource name that reply and delete-reply accept:
3
+ * accounts/{account}/locations/{location}/reviews/{review}.
4
+ *
5
+ * List responses from Google put this on `name`. The public API also copies it
6
+ * to `review_name` so a list row can be passed straight to a reply. Both MCP
7
+ * formatters read it from here so the hosted endpoint and the npm package
8
+ * agree.
9
+ */
10
+ export declare function isGoogleBusinessReviewResourceName(value: unknown): value is string;
11
+ /**
12
+ * locations/{id} from a location_name that may be "locations/{id}",
13
+ * "accounts/{a}/locations/{id}", or either with trailing slashes.
14
+ */
15
+ export declare function googleBusinessLocationResourceName(locationName: string): string | null;
16
+ /**
17
+ * Canonical review_name for one Google review.
18
+ * Prefers a resource name already on the review. Otherwise builds one from
19
+ * the location's account/location metadata and the review id.
20
+ */
21
+ export declare function googleBusinessReviewResourceName(params: {
22
+ name?: unknown;
23
+ review_name?: unknown;
24
+ reviewId?: unknown;
25
+ accountName?: string | null;
26
+ locationName?: string | null;
27
+ }): string | null;
28
+ /** review_name a formatted list row can show, from the fields a list response carries. */
29
+ export declare function reviewNameFromListItem(review: {
30
+ review_name?: unknown;
31
+ name?: unknown;
32
+ } | null | undefined): string | null;
@@ -0,0 +1,72 @@
1
+ /**
2
+ * The Google review resource name that reply and delete-reply accept:
3
+ * accounts/{account}/locations/{location}/reviews/{review}.
4
+ *
5
+ * List responses from Google put this on `name`. The public API also copies it
6
+ * to `review_name` so a list row can be passed straight to a reply. Both MCP
7
+ * formatters read it from here so the hosted endpoint and the npm package
8
+ * agree.
9
+ */
10
+ /**
11
+ * A path segment is rejected when it is empty, a dot segment, or carries a
12
+ * character that could change what URL the name resolves to (?, #, %).
13
+ */
14
+ function isSafePathSegment(segment) {
15
+ if (!segment || segment === '.' || segment === '..')
16
+ return false;
17
+ return !/[?#%]/.test(segment);
18
+ }
19
+ export function isGoogleBusinessReviewResourceName(value) {
20
+ if (typeof value !== 'string')
21
+ return false;
22
+ const parts = value.trim().split('/');
23
+ if (parts.length !== 6)
24
+ return false;
25
+ if (parts[0] !== 'accounts' || parts[2] !== 'locations' || parts[4] !== 'reviews')
26
+ return false;
27
+ return isSafePathSegment(parts[1]) && isSafePathSegment(parts[3]) && isSafePathSegment(parts[5]);
28
+ }
29
+ /**
30
+ * locations/{id} from a location_name that may be "locations/{id}",
31
+ * "accounts/{a}/locations/{id}", or either with trailing slashes.
32
+ */
33
+ export function googleBusinessLocationResourceName(locationName) {
34
+ const trimmed = locationName.trim().replace(/\/+$/, '');
35
+ if (!trimmed)
36
+ return null;
37
+ const id = trimmed.split('/').filter(Boolean).pop();
38
+ if (!id || !isSafePathSegment(id))
39
+ return null;
40
+ return `locations/${id}`;
41
+ }
42
+ /**
43
+ * Canonical review_name for one Google review.
44
+ * Prefers a resource name already on the review. Otherwise builds one from
45
+ * the location's account/location metadata and the review id.
46
+ */
47
+ export function googleBusinessReviewResourceName(params) {
48
+ for (const candidate of [params.review_name, params.name]) {
49
+ if (isGoogleBusinessReviewResourceName(candidate))
50
+ return candidate.trim();
51
+ }
52
+ const reviewId = typeof params.reviewId === 'string' ? params.reviewId.trim() : '';
53
+ if (!reviewId || reviewId.includes('/'))
54
+ return null;
55
+ const accountName = (params.accountName || '').trim().replace(/\/+$/, '');
56
+ if (!/^accounts\/[^/]+$/.test(accountName))
57
+ return null;
58
+ const locationName = googleBusinessLocationResourceName(params.locationName || '');
59
+ if (!locationName)
60
+ return null;
61
+ const built = `${accountName}/${locationName}/reviews/${reviewId}`;
62
+ return isGoogleBusinessReviewResourceName(built) ? built : null;
63
+ }
64
+ /** review_name a formatted list row can show, from the fields a list response carries. */
65
+ export function reviewNameFromListItem(review) {
66
+ if (!review || typeof review !== 'object')
67
+ return null;
68
+ return googleBusinessReviewResourceName({
69
+ review_name: review.review_name,
70
+ name: review.name,
71
+ });
72
+ }
@@ -1 +1 @@
1
- export declare const POSTERLY_MCP_VERSION = "0.54.4";
1
+ export declare const POSTERLY_MCP_VERSION = "0.54.6";
@@ -5,4 +5,4 @@
5
5
  // tool set (minus the intentional pre-auth signup tools that only this stdio
6
6
  // package exposes). `npm run check:mcp-parity` enforces both the version match
7
7
  // and the tool-list match, and runs in the pre-commit hook.
8
- export const POSTERLY_MCP_VERSION = '0.54.4';
8
+ export const POSTERLY_MCP_VERSION = '0.54.6';
@@ -10,7 +10,11 @@ type CommentsInput = {
10
10
  search?: string;
11
11
  limit?: number;
12
12
  offset?: number;
13
+ since?: string;
14
+ until?: string;
13
15
  };
16
+ /** One list line for a comment: when, account, author ("you" or "(no handle)" when needed), flags, text. */
17
+ export declare function formatCommentListLine(comment: Record<string, unknown>): string;
14
18
  export declare const listCommentsTool: {
15
19
  name: string;
16
20
  description: string;
@@ -23,14 +27,18 @@ export declare const listCommentsTool: {
23
27
  search: z.ZodOptional<z.ZodString>;
24
28
  limit: z.ZodOptional<z.ZodNumber>;
25
29
  offset: z.ZodOptional<z.ZodNumber>;
30
+ since: z.ZodOptional<z.ZodString>;
31
+ until: z.ZodOptional<z.ZodString>;
26
32
  }, "strip", z.ZodTypeAny, {
27
33
  platform?: "instagram" | "facebook" | "threads" | "linkedin" | undefined;
28
34
  account_id?: number | undefined;
29
35
  workspace_id?: string | undefined;
30
36
  limit?: number | undefined;
31
37
  offset?: number | undefined;
38
+ since?: string | undefined;
32
39
  filter?: "all" | "unread" | "flagged" | undefined;
33
40
  search?: string | undefined;
41
+ until?: string | undefined;
34
42
  comment_id?: string | undefined;
35
43
  }, {
36
44
  platform?: "instagram" | "facebook" | "threads" | "linkedin" | undefined;
@@ -38,8 +46,10 @@ export declare const listCommentsTool: {
38
46
  workspace_id?: string | undefined;
39
47
  limit?: number | undefined;
40
48
  offset?: number | undefined;
49
+ since?: string | undefined;
41
50
  filter?: "all" | "unread" | "flagged" | undefined;
42
51
  search?: string | undefined;
52
+ until?: string | undefined;
43
53
  comment_id?: string | undefined;
44
54
  }>;
45
55
  /** The old tools' exact input schemas, for alias calls (see alias-transport.ts). */
@@ -19,18 +19,52 @@ function describeSkippedWorkspaces(result) {
19
19
  });
20
20
  return [`Skipped ${skipped.length} workspace${skipped.length === 1 ? '' : 's'} you belong to:`, ...lines].join('\n');
21
21
  }
22
+ /** "on @account (Workspace)" for a list row, or null when the API sent neither. */
23
+ function ownerLabel(row) {
24
+ const account = typeof row.account_username === 'string' && row.account_username ? `@${row.account_username}` : '';
25
+ const workspace = typeof row.workspace_name === 'string' && row.workspace_name ? row.workspace_name : '';
26
+ if (account && workspace)
27
+ return `on ${account} (${workspace})`;
28
+ if (account || workspace)
29
+ return `on ${account || workspace}`;
30
+ return null;
31
+ }
32
+ /** One list line for a comment: when, account, author ("you" or "(no handle)" when needed), flags, text. */
33
+ export function formatCommentListLine(comment) {
34
+ const author = comment.author_is_business
35
+ ? 'you'
36
+ : typeof comment.author_username === 'string' && comment.author_username
37
+ ? `@${comment.author_username}`
38
+ : '(no handle)';
39
+ const platform = typeof comment.platform === 'string' ? comment.platform : 'unknown';
40
+ const flags = [];
41
+ if (comment.is_read === false)
42
+ flags.push('unread');
43
+ if (comment.is_hidden)
44
+ flags.push('hidden');
45
+ if (comment.is_flagged)
46
+ flags.push('flagged');
47
+ const flagLabel = flags.length > 0 ? `, ${flags.join(', ')}` : '';
48
+ const text = truncateText(typeof comment.content === 'string' ? comment.content : '', 80);
49
+ const replies = Array.isArray(comment.replies) ? comment.replies.length : 0;
50
+ const when = typeof comment.posted_at === 'string' && comment.posted_at ? `[${formatLocalDateTime(comment.posted_at)}]` : null;
51
+ const owner = ownerLabel(comment);
52
+ return `- ${[String(comment.id), when].filter(Boolean).join(' ')} (${[platform, owner, author].filter(Boolean).join(', ')}${flagLabel}${replies ? `, ${replies} replies` : ''}): ${text}`;
53
+ }
22
54
  export const listCommentsTool = {
23
55
  name: 'list_comments',
24
- description: 'Social inbox comments and replies for Instagram, Facebook Pages, Threads, and LinkedIn Pages (Pro plan or higher plus posts:read). Without comment_id: list comments filtered by account, platform, unread/flagged, or search, with limit/offset paging. With comment_id: one comment and its replies; only workspace_id may be added.',
56
+ description: 'Social inbox comments and replies for Instagram, Facebook Pages, Threads, and LinkedIn Pages (Pro plan or higher plus posts:read). Without comment_id: list comments filtered by account, platform, unread/flagged, search, or since/until dates, with limit/offset paging. With comment_id: one comment and its replies; only workspace_id may be added.',
25
57
  inputSchema: z.object({
26
- comment_id: z.string().min(1).optional().describe('One comment (from a list call) with its replies.'),
27
- workspace_id: z.string().optional().describe('Optional. Omit to search every workspace you belong to; pass a workspace ID from whoami to limit to one.'),
28
- account_id: z.number().int().positive().optional().describe('Social account ID from list_accounts.'),
29
- platform: z.enum(INBOX_PLATFORMS).optional().describe('instagram, facebook, threads, or linkedin.'),
30
- filter: z.enum(['all', 'unread', 'flagged']).optional().describe('Comment filter. Defaults to all.'),
58
+ comment_id: z.string().min(1).optional().describe('One comment and its replies.'),
59
+ workspace_id: z.string().optional().describe('Omit to search all your workspaces, or pass an ID from whoami.'),
60
+ account_id: z.number().int().positive().optional().describe('From list_accounts.'),
61
+ platform: z.enum(INBOX_PLATFORMS).optional(),
62
+ filter: z.enum(['all', 'unread', 'flagged']).optional().describe('Default all.'),
31
63
  search: z.string().optional().describe('Search comment content or author username.'),
32
- limit: z.number().int().min(1).max(100).optional().describe('Number of comments to return. Default 50, max 100.'),
33
- offset: z.number().int().min(0).optional().describe('Skip this many comments before returning results.'),
64
+ limit: z.number().int().min(1).max(100).optional().describe('Rows to return. Default 50.'),
65
+ offset: z.number().int().min(0).optional().describe('Rows to skip.'),
66
+ since: z.string().optional().describe('ISO date/time, inclusive.'),
67
+ until: z.string().optional().describe('ISO date/time, inclusive.'),
34
68
  }),
35
69
  /** The old tools' exact input schemas, for alias calls (see alias-transport.ts). */
36
70
  legacySchemas: {
@@ -57,19 +91,7 @@ async function commentList(client, input) {
57
91
  }
58
92
  const lines = [`Inbox comments (showing ${result.comments.length} of ${result.total}):`];
59
93
  for (const comment of result.comments) {
60
- const author = typeof comment.author_username === 'string' ? `@${comment.author_username}` : 'unknown';
61
- const platform = typeof comment.platform === 'string' ? comment.platform : 'unknown';
62
- const flags = [];
63
- if (comment.is_read === false)
64
- flags.push('unread');
65
- if (comment.is_hidden)
66
- flags.push('hidden');
67
- if (comment.is_flagged)
68
- flags.push('flagged');
69
- const flagLabel = flags.length > 0 ? `, ${flags.join(', ')}` : '';
70
- const text = truncateText(typeof comment.content === 'string' ? comment.content : '', 80);
71
- const replies = Array.isArray(comment.replies) ? comment.replies.length : 0;
72
- lines.push(`- ${String(comment.id)} (${platform}, ${author}${flagLabel}${replies ? `, ${replies} replies` : ''}): ${text}`);
94
+ lines.push(formatCommentListLine(comment));
73
95
  }
74
96
  if (result.hasMore) {
75
97
  const nextOffset = (input.offset ?? 0) + result.comments.length;
@@ -10,7 +10,16 @@ type ConversationsInput = {
10
10
  search?: string;
11
11
  limit?: number;
12
12
  offset?: number;
13
+ since?: string;
14
+ until?: string;
13
15
  };
16
+ /**
17
+ * One list line for a DM conversation: when, account, participant ("(no
18
+ * handle)" when missing), and a preview that starts with "you: " when the
19
+ * business sent the last message and falls back to [media] / [unsupported]
20
+ * when there is no text.
21
+ */
22
+ export declare function formatConversationListLine(conversation: Record<string, unknown>): string;
14
23
  export declare const listConversationsTool: {
15
24
  name: string;
16
25
  description: string;
@@ -23,14 +32,18 @@ export declare const listConversationsTool: {
23
32
  search: z.ZodOptional<z.ZodString>;
24
33
  limit: z.ZodOptional<z.ZodNumber>;
25
34
  offset: z.ZodOptional<z.ZodNumber>;
35
+ since: z.ZodOptional<z.ZodString>;
36
+ until: z.ZodOptional<z.ZodString>;
26
37
  }, "strip", z.ZodTypeAny, {
27
38
  platform?: "instagram" | "facebook" | "threads" | undefined;
28
39
  account_id?: number | undefined;
29
40
  workspace_id?: string | undefined;
30
41
  limit?: number | undefined;
31
42
  offset?: number | undefined;
43
+ since?: string | undefined;
32
44
  filter?: "all" | "unread" | "starred" | "archived" | undefined;
33
45
  search?: string | undefined;
46
+ until?: string | undefined;
34
47
  conversation_id?: string | undefined;
35
48
  }, {
36
49
  platform?: "instagram" | "facebook" | "threads" | undefined;
@@ -38,8 +51,10 @@ export declare const listConversationsTool: {
38
51
  workspace_id?: string | undefined;
39
52
  limit?: number | undefined;
40
53
  offset?: number | undefined;
54
+ since?: string | undefined;
41
55
  filter?: "all" | "unread" | "starred" | "archived" | undefined;
42
56
  search?: string | undefined;
57
+ until?: string | undefined;
43
58
  conversation_id?: string | undefined;
44
59
  }>;
45
60
  /** The old tools' exact input schemas, for alias calls (see alias-transport.ts). */
@@ -19,18 +19,57 @@ function describeSkippedWorkspaces(result) {
19
19
  });
20
20
  return [`Skipped ${skipped.length} workspace${skipped.length === 1 ? '' : 's'} you belong to:`, ...lines].join('\n');
21
21
  }
22
+ /** "on @account (Workspace)" for a list row, or null when the API sent neither. */
23
+ function ownerLabel(row) {
24
+ const account = typeof row.account_username === 'string' && row.account_username ? `@${row.account_username}` : '';
25
+ const workspace = typeof row.workspace_name === 'string' && row.workspace_name ? row.workspace_name : '';
26
+ if (account && workspace)
27
+ return `on ${account} (${workspace})`;
28
+ if (account || workspace)
29
+ return `on ${account || workspace}`;
30
+ return null;
31
+ }
32
+ /**
33
+ * One list line for a DM conversation: when, account, participant ("(no
34
+ * handle)" when missing), and a preview that starts with "you: " when the
35
+ * business sent the last message and falls back to [media] / [unsupported]
36
+ * when there is no text.
37
+ */
38
+ export function formatConversationListLine(conversation) {
39
+ const username = typeof conversation.participant_username === 'string' && conversation.participant_username
40
+ ? `@${conversation.participant_username}`
41
+ : '(no handle)';
42
+ const platform = typeof conversation.platform === 'string' ? conversation.platform : 'unknown';
43
+ const unread = conversation.is_read === false ? 'unread' : 'read';
44
+ const last = (conversation.last_message ?? null);
45
+ const rawPreview = typeof conversation.last_message_preview === 'string' ? conversation.last_message_preview.trim() : '';
46
+ let preview = rawPreview
47
+ ? truncateText(rawPreview, 80)
48
+ : last?.is_unsupported
49
+ ? '[unsupported]'
50
+ : last?.has_media
51
+ ? '[media]'
52
+ : truncateText('', 80);
53
+ if (last?.sender_is_business && preview !== '(empty)')
54
+ preview = `you: ${preview}`;
55
+ const when = typeof conversation.last_message_at === 'string' && conversation.last_message_at ? `[${formatLocalDateTime(conversation.last_message_at)}]` : null;
56
+ const owner = ownerLabel(conversation);
57
+ return `- ${[String(conversation.id), when].filter(Boolean).join(' ')} (${[platform, owner, username, unread].filter(Boolean).join(', ')}): ${preview}`;
58
+ }
22
59
  export const listConversationsTool = {
23
60
  name: 'list_conversations',
24
- description: 'Social inbox DM conversations for Instagram and Facebook Page inboxes (Threads has no DMs; Pro plan or higher plus posts:read). Without conversation_id: list conversations filtered by account, platform, unread/starred/archived, or search, with limit/offset paging. With conversation_id: one conversation and its messages; there limit is the number of messages (default 50, max 100) and only workspace_id may be added.',
61
+ description: 'Social inbox DM conversations for Instagram and Facebook Page inboxes (Threads has no DMs; Pro plan or higher plus posts:read). Without conversation_id: list conversations filtered by account, platform, unread/starred/archived, search, or since/until dates, with limit/offset paging. With conversation_id: one conversation and its messages; there limit is the number of messages (default 50, max 100) and only workspace_id may be added.',
25
62
  inputSchema: z.object({
26
- conversation_id: z.string().min(1).optional().describe('One conversation (from a list call) with its messages.'),
27
- workspace_id: z.string().optional().describe('Optional. Omit to search every workspace you belong to; pass a workspace ID from whoami to limit to one.'),
28
- account_id: z.number().int().positive().optional().describe('Social account ID from list_accounts.'),
29
- platform: z.enum(INBOX_PLATFORMS).optional().describe('instagram or facebook. Threads has no DMs.'),
30
- filter: z.enum(['all', 'unread', 'starred', 'archived']).optional().describe('Conversation filter. Defaults to all (excludes archived).'),
63
+ conversation_id: z.string().min(1).optional().describe('One conversation and its messages.'),
64
+ workspace_id: z.string().optional().describe('Omit to search all your workspaces, or pass an ID from whoami.'),
65
+ account_id: z.number().int().positive().optional().describe('From list_accounts.'),
66
+ platform: z.enum(INBOX_PLATFORMS).optional(),
67
+ filter: z.enum(['all', 'unread', 'starred', 'archived']).optional().describe('Default all (excludes archived).'),
31
68
  search: z.string().optional().describe('Search participant username or last message preview.'),
32
- limit: z.number().int().min(1).max(100).optional().describe('Conversations to return, or messages with conversation_id. Default 50, max 100.'),
33
- offset: z.number().int().min(0).optional().describe('Skip this many conversations before returning results.'),
69
+ limit: z.number().int().min(1).max(100).optional().describe('Rows (messages with conversation_id). Default 50.'),
70
+ offset: z.number().int().min(0).optional().describe('Rows to skip.'),
71
+ since: z.string().optional().describe('ISO date/time, inclusive.'),
72
+ until: z.string().optional().describe('ISO date/time, inclusive.'),
34
73
  }),
35
74
  /** The old tools' exact input schemas, for alias calls (see alias-transport.ts). */
36
75
  legacySchemas: {
@@ -58,11 +97,7 @@ async function conversationList(client, input) {
58
97
  }
59
98
  const lines = [`Inbox conversations (showing ${result.conversations.length} of ${result.total}):`];
60
99
  for (const conversation of result.conversations) {
61
- const username = typeof conversation.participant_username === 'string' ? `@${conversation.participant_username}` : 'unknown';
62
- const platform = typeof conversation.platform === 'string' ? conversation.platform : 'unknown';
63
- const unread = conversation.is_read === false ? 'unread' : 'read';
64
- const preview = truncateText(typeof conversation.last_message_preview === 'string' ? conversation.last_message_preview : '', 80);
65
- lines.push(`- ${String(conversation.id)} (${platform}, ${username}, ${unread}): ${preview}`);
100
+ lines.push(formatConversationListLine(conversation));
66
101
  }
67
102
  if (result.hasMore) {
68
103
  const nextOffset = (input.offset ?? 0) + result.conversations.length;
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { formatDate } from '../lib/format.js';
3
+ import { reviewNameFromListItem } from '../lib/google-business-review-name.js';
3
4
  import { validateArgs } from '../lib/tool-runtime.js';
4
5
  /** Matches GOOGLE_BUSINESS_REVIEWS_MAX_LIMIT in lib/api-v1-google-business.ts. */
5
6
  const MAX_LIMIT = 1000;
6
7
  export const listGoogleBusinessReviewsTool = {
7
8
  name: 'list_google_business_reviews',
8
- description: 'Google Business Profile reviews. view=reviews (default): reviews for one location/account or every accessible GBP location, paging through all reviews Google has (not just the first 50) with the full untruncated review text, its date, and each location\'s total review count; filter by rating or unanswered, page with limit/offset. view=review_link (account_id or location_id): the direct public Google review link plus the Google Place ID (ChIJ...); that Place ID is output only and must NOT be passed back as location_id.',
9
+ description: 'Google Business Profile reviews. view=reviews (default): reviews for one location/account or every accessible GBP location, paging through all reviews Google has (not just the first 50) with the full untruncated review text, its date, and each location\'s total review count; filter by rating or unanswered, page with limit/offset. Each review has review_name for manage_google_business_review reply/delete_reply. view=review_link (account_id or location_id): the direct public Google review link plus the Google Place ID (ChIJ...); that Place ID is output only and must NOT be passed back as location_id.',
9
10
  inputSchema: z.object({
10
11
  view: z.enum(['reviews', 'review_link']).optional().describe('reviews (default) or review_link.'),
11
12
  workspace_id: z.string().optional().describe('Filter to a workspace ID from whoami.'),
@@ -77,6 +78,14 @@ async function reviews(client, input) {
77
78
  const date = formatReviewDate(review);
78
79
  const replied = review.reviewReply ? 'replied' : 'unanswered';
79
80
  lines.push(`- ${name} (${rating}, ${date}, ${location}, ${replied})`);
81
+ const reviewName = reviewNameFromListItem(review);
82
+ if (reviewName)
83
+ lines.push(` review_name: ${reviewName}`);
84
+ if (review.account_id != null && String(review.account_id) !== '') {
85
+ lines.push(` account_id: ${String(review.account_id)}`);
86
+ }
87
+ if (review.locationId)
88
+ lines.push(` location_id: ${review.locationId}`);
80
89
  // Full review text, no truncation; collapse whitespace only so the
81
90
  // bullet list stays readable for multi-paragraph reviews.
82
91
  if (review.comment) {
@@ -20,13 +20,13 @@ function locationRows(input) {
20
20
  }
21
21
  export const manageGoogleBusinessReviewTool = {
22
22
  name: 'manage_google_business_review',
23
- description: 'Act on Google Business Profile reviews. action=suggest_reply (star_rating, optional review_text): short, brand-aware AI reply suggestions; uses the AI Caption Assist allowance and never posts. action=reply (review_name, comment): post or update the owner reply. action=delete_reply (review_name): delete the owner reply. reply and delete_reply use preview then confirm: call without confirm to get a preview and preview_id (it repeats the review name, location, and exact reply text; show the reviewer, rating, and review text from list_google_business_reviews alongside it), then call again with confirm=true and that preview_id.',
23
+ description: 'Act on Google Business Profile reviews. action=suggest_reply (star_rating, optional review_text): short, brand-aware AI reply suggestions; uses the AI Caption Assist allowance and never posts. action=reply (review_name, comment): post or update the owner reply. action=delete_reply (review_name): delete the owner reply. reply and delete_reply use preview then confirm: call without confirm to get a preview and preview_id (it repeats the review name, location, and exact reply text; show the reviewer, rating, and review text alongside it), then call again with confirm=true and that preview_id.',
24
24
  inputSchema: z.object({
25
25
  action: z.enum(['suggest_reply', 'reply', 'delete_reply']).describe('suggest_reply, reply, or delete_reply.'),
26
26
  workspace_id: z.string().optional().describe('Filter to a workspace ID from whoami.'),
27
27
  account_id: z.number().int().positive().optional().describe('Google Business account ID from list_accounts (optional brand voice context for suggest_reply).'),
28
28
  location_id: z.string().optional().describe(LOCATION_ID_DESCRIPTION),
29
- review_name: z.string().min(1).optional().describe('reply and delete_reply: full Google review resource name.'),
29
+ review_name: z.string().min(1).optional().describe('reply and delete_reply: review_name from list_google_business_reviews.'),
30
30
  comment: z.string().min(1).max(4096).optional().describe('reply: exact owner reply text to post.'),
31
31
  review_text: z.string().optional().describe('suggest_reply: review text. Leave empty for rating-only reviews.'),
32
32
  star_rating: z.number().min(1).max(5).optional().describe('suggest_reply: review rating from 1 to 5.'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posterly-mcp-server",
3
- "version": "0.54.4",
3
+ "version": "0.54.6",
4
4
  "mcpName": "io.github.awpthorp/posterly",
5
5
  "description": "MCP server for posterly: schedule and publish social media posts across 18 platforms from any MCP client (Claude, ChatGPT, Cursor, Windsurf, Cline, and more)",
6
6
  "license": "MIT",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.awpthorp/posterly",
4
4
  "title": "posterly",
5
5
  "description": "Validate, schedule, publish, and analyze social content across 18 platforms with posterly.",
6
- "version": "0.54.4",
6
+ "version": "0.54.6",
7
7
  "websiteUrl": "https://www.poster.ly/mcp",
8
8
  "repository": {
9
9
  "url": "https://github.com/awpthorp/posterly-mcp-server",
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "posterly-mcp-server",
16
- "version": "0.54.4",
16
+ "version": "0.54.6",
17
17
  "transport": {
18
18
  "type": "stdio"
19
19
  },
@@ -1602,6 +1602,12 @@
1602
1602
  "offset": {
1603
1603
  "type": "integer",
1604
1604
  "min": 0
1605
+ },
1606
+ "since": {
1607
+ "type": "string"
1608
+ },
1609
+ "until": {
1610
+ "type": "string"
1605
1611
  }
1606
1612
  }
1607
1613
  },
@@ -1715,6 +1721,12 @@
1715
1721
  "offset": {
1716
1722
  "type": "integer",
1717
1723
  "min": 0
1724
+ },
1725
+ "since": {
1726
+ "type": "string"
1727
+ },
1728
+ "until": {
1729
+ "type": "string"
1718
1730
  }
1719
1731
  }
1720
1732
  },