posterly-mcp-server 0.62.1 → 0.64.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/README.md +15 -2
- package/dist/lib/api-client.d.ts +23 -1
- package/dist/lib/api-client.js +26 -1
- package/dist/lib/format.d.ts +13 -0
- package/dist/lib/format.js +42 -0
- package/dist/lib/gbp-location-preview.d.ts +39 -3
- package/dist/lib/gbp-location-preview.js +418 -3
- package/dist/lib/tool-registry.d.ts +1 -1
- package/dist/lib/tool-registry.js +1 -1
- package/dist/lib/tool-runtime.d.ts +3 -1
- package/dist/lib/tool-runtime.js +7 -2
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/find-slot.js +14 -7
- package/dist/tools/list-brands.d.ts +2 -2
- package/dist/tools/list-comments.d.ts +2 -2
- package/dist/tools/list-conversations.d.ts +2 -2
- package/dist/tools/list-google-business-locations.d.ts +32 -0
- package/dist/tools/list-google-business-locations.js +31 -21
- package/dist/tools/manage-google-business-location.d.ts +193 -4
- package/dist/tools/manage-google-business-location.js +278 -20
- package/dist/tools/whoami.js +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/tool-registry.json +114 -6
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.
|
|
126
|
+
`posterly-mcp-server@0.64.0` exposes 75 tools covering 127 actions. The hosted HTTP endpoint exposes the same catalog minus the three signup tools: 72 tools covering 124 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
|
|
|
@@ -306,7 +306,7 @@ Google Business Profile reviews, media, and audits.
|
|
|
306
306
|
| --- | --- |
|
|
307
307
|
| `audit_google_business_profile` | Audit a Google profile |
|
|
308
308
|
| `list_google_business_media` | Google profile media |
|
|
309
|
-
| `list_google_business_locations` | Google location
|
|
309
|
+
| `list_google_business_locations` | Google location profile and categories |
|
|
310
310
|
|
|
311
311
|
**`list_google_business_reviews`**: Google reviews
|
|
312
312
|
|
|
@@ -339,12 +339,25 @@ Each review from `list_google_business_reviews` includes `review_name` (`account
|
|
|
339
339
|
| `areas` (default) | Service areas on a location |
|
|
340
340
|
| `places` | Search towns and postcodes |
|
|
341
341
|
|
|
342
|
+
**`list_google_business_locations`**: Google location profile and categories
|
|
343
|
+
|
|
344
|
+
| View | What it does |
|
|
345
|
+
| --- | --- |
|
|
346
|
+
| `profile` (default) | Location title, description, categories, services, phone numbers, website, hours, and attributes |
|
|
347
|
+
| `categories` | Search Google Business categories (`region_code`, `language_code`, `category_view`, `prefix`) |
|
|
348
|
+
|
|
342
349
|
**`manage_google_business_location`**: Manage a Google location
|
|
343
350
|
|
|
344
351
|
| Action | What it does |
|
|
345
352
|
| --- | --- |
|
|
346
353
|
| `update_hours` | Update regular hours (preview then confirm) |
|
|
347
354
|
| `update_attributes` | Update attributes (preview then confirm) |
|
|
355
|
+
| `update_description` | Update business description, up to 750 characters (preview then confirm) |
|
|
356
|
+
| `update_categories` | Update primary and additional categories (preview then confirm) |
|
|
357
|
+
| `update_services` | Replace structured and free-form services (preview then confirm) |
|
|
358
|
+
| `update_title` | Update business title (preview then confirm) |
|
|
359
|
+
| `update_phones` | Update primary and additional phone numbers (preview then confirm) |
|
|
360
|
+
| `update_website` | Update website URL (preview then confirm) |
|
|
348
361
|
|
|
349
362
|
**`manage_google_business_service_area`**: Update Google service areas
|
|
350
363
|
|
package/dist/lib/api-client.d.ts
CHANGED
|
@@ -916,6 +916,14 @@ export interface Slot {
|
|
|
916
916
|
time: string;
|
|
917
917
|
local_time: string;
|
|
918
918
|
}
|
|
919
|
+
/** Where a slot response's timezone came from when the caller passed none. */
|
|
920
|
+
export type SlotTimezoneSource = 'requested' | 'workspace' | 'profile' | 'utc';
|
|
921
|
+
export interface AvailableSlotsResponse {
|
|
922
|
+
slots: Slot[];
|
|
923
|
+
/** The timezone local_time is in. Missing from older API deployments. */
|
|
924
|
+
timezone?: string;
|
|
925
|
+
timezone_source?: SlotTimezoneSource;
|
|
926
|
+
}
|
|
919
927
|
export type SuggestedSlotBasis = 'yours' | 'platform' | 'default';
|
|
920
928
|
export interface SuggestedSlot extends Slot {
|
|
921
929
|
basis: SuggestedSlotBasis;
|
|
@@ -933,6 +941,7 @@ export interface SuggestedTimesWeeklyRating {
|
|
|
933
941
|
}
|
|
934
942
|
export interface SuggestedSlotsResponse {
|
|
935
943
|
timezone: string;
|
|
944
|
+
timezone_source?: SlotTimezoneSource;
|
|
936
945
|
basis: SuggestedSlotBasis;
|
|
937
946
|
basis_label: string;
|
|
938
947
|
slots: SuggestedSlot[];
|
|
@@ -1952,7 +1961,7 @@ export declare class PosterlyClient {
|
|
|
1952
1961
|
timezone?: string;
|
|
1953
1962
|
count?: number;
|
|
1954
1963
|
workspace_id?: string;
|
|
1955
|
-
}): Promise<
|
|
1964
|
+
}): Promise<AvailableSlotsResponse>;
|
|
1956
1965
|
/** Best times by engagement for the given accounts (GET /slots/suggested). */
|
|
1957
1966
|
findSuggestedSlots(params: {
|
|
1958
1967
|
account_ids: string[];
|
|
@@ -2067,9 +2076,22 @@ export declare class PosterlyClient {
|
|
|
2067
2076
|
workspace_id?: string;
|
|
2068
2077
|
account_id?: number;
|
|
2069
2078
|
location_id?: string;
|
|
2079
|
+
include_google_updated?: boolean;
|
|
2080
|
+
}): Promise<Record<string, any>>;
|
|
2081
|
+
listGoogleBusinessCategories(params: {
|
|
2082
|
+
workspace_id?: string;
|
|
2083
|
+
account_id?: number;
|
|
2084
|
+
location_id?: string;
|
|
2085
|
+
region_code: string;
|
|
2086
|
+
language_code: string;
|
|
2087
|
+
category_view?: 'BASIC' | 'FULL';
|
|
2088
|
+
prefix?: string;
|
|
2089
|
+
page_size?: number;
|
|
2090
|
+
page_token?: string;
|
|
2070
2091
|
}): Promise<Record<string, any>>;
|
|
2071
2092
|
updateGoogleBusinessHours(data: Record<string, any>): Promise<Record<string, any>>;
|
|
2072
2093
|
updateGoogleBusinessAttributes(data: Record<string, any>): Promise<Record<string, any>>;
|
|
2094
|
+
updateGoogleBusinessLocation(data: Record<string, any>): Promise<Record<string, any>>;
|
|
2073
2095
|
listActivity(params?: {
|
|
2074
2096
|
workspace_id?: string;
|
|
2075
2097
|
post_id?: number;
|
package/dist/lib/api-client.js
CHANGED
|
@@ -585,7 +585,7 @@ export class PosterlyClient {
|
|
|
585
585
|
searchParams.set('workspace_id', params.workspace_id);
|
|
586
586
|
const qs = searchParams.toString();
|
|
587
587
|
const data = await this.request('GET', `/slots/next${qs ? `?${qs}` : ''}`);
|
|
588
|
-
return data.slots;
|
|
588
|
+
return { ...data, slots: Array.isArray(data?.slots) ? data.slots : [] };
|
|
589
589
|
}
|
|
590
590
|
/** Best times by engagement for the given accounts (GET /slots/suggested). */
|
|
591
591
|
async findSuggestedSlots(params) {
|
|
@@ -719,15 +719,40 @@ export class PosterlyClient {
|
|
|
719
719
|
searchParams.set('account_id', String(params.account_id));
|
|
720
720
|
if (params?.location_id)
|
|
721
721
|
searchParams.set('location_id', params.location_id);
|
|
722
|
+
if (params?.include_google_updated)
|
|
723
|
+
searchParams.set('include_google_updated', 'true');
|
|
722
724
|
const qs = searchParams.toString();
|
|
723
725
|
return this.request('GET', `/google-business/location${qs ? `?${qs}` : ''}`);
|
|
724
726
|
}
|
|
727
|
+
async listGoogleBusinessCategories(params) {
|
|
728
|
+
const searchParams = new URLSearchParams();
|
|
729
|
+
if (params.workspace_id)
|
|
730
|
+
searchParams.set('workspace_id', params.workspace_id);
|
|
731
|
+
if (params.account_id)
|
|
732
|
+
searchParams.set('account_id', String(params.account_id));
|
|
733
|
+
if (params.location_id)
|
|
734
|
+
searchParams.set('location_id', params.location_id);
|
|
735
|
+
searchParams.set('region_code', params.region_code);
|
|
736
|
+
searchParams.set('language_code', params.language_code);
|
|
737
|
+
if (params.category_view)
|
|
738
|
+
searchParams.set('view', params.category_view);
|
|
739
|
+
if (params.prefix)
|
|
740
|
+
searchParams.set('prefix', params.prefix);
|
|
741
|
+
if (params.page_size !== undefined)
|
|
742
|
+
searchParams.set('page_size', String(params.page_size));
|
|
743
|
+
if (params.page_token)
|
|
744
|
+
searchParams.set('page_token', params.page_token);
|
|
745
|
+
return this.request('GET', `/google-business/categories?${searchParams.toString()}`);
|
|
746
|
+
}
|
|
725
747
|
async updateGoogleBusinessHours(data) {
|
|
726
748
|
return this.request('PATCH', '/google-business/location', { ...data, attributes: undefined, regular_hours: data.regular_hours });
|
|
727
749
|
}
|
|
728
750
|
async updateGoogleBusinessAttributes(data) {
|
|
729
751
|
return this.request('PATCH', '/google-business/location', { ...data, regular_hours: undefined, attributes: data.attributes });
|
|
730
752
|
}
|
|
753
|
+
async updateGoogleBusinessLocation(data) {
|
|
754
|
+
return this.request('PATCH', '/google-business/location', data);
|
|
755
|
+
}
|
|
731
756
|
async listActivity(params) {
|
|
732
757
|
const searchParams = new URLSearchParams();
|
|
733
758
|
if (params?.workspace_id)
|
package/dist/lib/format.d.ts
CHANGED
|
@@ -61,6 +61,19 @@ export declare function dashboardUrlForPostList(posts: Array<Pick<Post, 'schedul
|
|
|
61
61
|
* both surfaces.
|
|
62
62
|
*/
|
|
63
63
|
export declare function starGlyphs(stars: unknown, estimated?: boolean): string;
|
|
64
|
+
/**
|
|
65
|
+
* One line naming the timezone a slot result is in and where it came from
|
|
66
|
+
* (the API's timezone and timezone_source). When nothing was passed and
|
|
67
|
+
* nothing is saved the API falls back to UTC: that is said outright, with
|
|
68
|
+
* what to do about it, so UTC times are never read as the user's clock.
|
|
69
|
+
* The hosted and npm renderers keep this wording identical.
|
|
70
|
+
*/
|
|
71
|
+
export declare function slotTimeZoneNote(data: {
|
|
72
|
+
timezone?: unknown;
|
|
73
|
+
timezone_source?: unknown;
|
|
74
|
+
} | null | undefined): string | null;
|
|
75
|
+
/** The slot's calendar day in the slot timezone, so Date agrees with Local time. */
|
|
76
|
+
export declare function slotLocalDate(value: string | null | undefined, timeZone: unknown): string;
|
|
64
77
|
export declare function truncateText(value: string | null | undefined, max?: number): string;
|
|
65
78
|
export declare function formatAccountLabel(account: Account): string;
|
|
66
79
|
export declare function formatConnectedAccounts(accounts?: Account[]): string;
|
package/dist/lib/format.js
CHANGED
|
@@ -148,6 +148,48 @@ export function starGlyphs(stars, estimated = false) {
|
|
|
148
148
|
const glyphs = '★'.repeat(n) + '☆'.repeat(5 - n);
|
|
149
149
|
return estimated ? `${glyphs} (est.)` : glyphs;
|
|
150
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* One line naming the timezone a slot result is in and where it came from
|
|
153
|
+
* (the API's timezone and timezone_source). When nothing was passed and
|
|
154
|
+
* nothing is saved the API falls back to UTC: that is said outright, with
|
|
155
|
+
* what to do about it, so UTC times are never read as the user's clock.
|
|
156
|
+
* The hosted and npm renderers keep this wording identical.
|
|
157
|
+
*/
|
|
158
|
+
export function slotTimeZoneNote(data) {
|
|
159
|
+
const timezone = typeof data?.timezone === 'string' ? data.timezone.trim() : '';
|
|
160
|
+
if (!timezone)
|
|
161
|
+
return null;
|
|
162
|
+
switch (data?.timezone_source) {
|
|
163
|
+
case 'requested':
|
|
164
|
+
return `Timezone: ${timezone} (the timezone you passed).`;
|
|
165
|
+
case 'workspace':
|
|
166
|
+
return `Timezone: ${timezone} (the workspace timezone; no timezone was passed).`;
|
|
167
|
+
case 'profile':
|
|
168
|
+
return `Timezone: ${timezone} (the user's saved timezone; no timezone was passed).`;
|
|
169
|
+
case 'utc':
|
|
170
|
+
return `Timezone: ${timezone} (FALLBACK: no timezone was passed and none is saved for this user or workspace). These local times are UTC, which is probably not the user's clock. Ask the user for their IANA timezone (for example Europe/London), call find_available_slot again with timezone, and save it with complete_onboarding (timezone only) so later calls use it.`;
|
|
171
|
+
default:
|
|
172
|
+
return `Timezone: ${timezone}.`;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/** The slot's calendar day in the slot timezone, so Date agrees with Local time. */
|
|
176
|
+
export function slotLocalDate(value, timeZone) {
|
|
177
|
+
if (!value)
|
|
178
|
+
return 'n/a';
|
|
179
|
+
const date = new Date(value);
|
|
180
|
+
if (Number.isNaN(date.getTime()))
|
|
181
|
+
return String(value);
|
|
182
|
+
const options = { weekday: 'short', month: 'short', day: 'numeric', year: 'numeric' };
|
|
183
|
+
if (typeof timeZone === 'string' && timeZone.trim()) {
|
|
184
|
+
try {
|
|
185
|
+
return date.toLocaleDateString('en-US', { ...options, timeZone: timeZone.trim() });
|
|
186
|
+
}
|
|
187
|
+
catch {
|
|
188
|
+
// Unknown zone name: fall back to the default below.
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return date.toLocaleDateString('en-US', options);
|
|
192
|
+
}
|
|
151
193
|
export function truncateText(value, max = 80) {
|
|
152
194
|
const text = value?.trim() || '';
|
|
153
195
|
if (!text)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Preview text for Google Business location edits,
|
|
3
|
-
* npm MCP servers.
|
|
4
|
-
* profile, so the preview
|
|
2
|
+
* Preview and output text for Google Business location reads and edits,
|
|
3
|
+
* shared by the hosted and npm MCP servers. Every write replaces a field
|
|
4
|
+
* group on the public profile, so the preview shows what is on the listing
|
|
5
|
+
* now next to what will be sent.
|
|
5
6
|
*/
|
|
6
7
|
export type GbpPreviewPeriod = {
|
|
7
8
|
open_day?: unknown;
|
|
@@ -15,7 +16,42 @@ export type GbpPreviewAttribute = {
|
|
|
15
16
|
values?: unknown;
|
|
16
17
|
};
|
|
17
18
|
export declare const GBP_CLOSED_DAYS_NOTE = "A day with no opening period shows as closed on Google.";
|
|
19
|
+
export declare const GBP_TITLE_SUSPENSION_WARNING = "Warning: Google may hold a business name change for review, and a wrong or keyword-stuffed name can get the listing suspended. If Google rejects this edit, posterly will not retry it automatically.";
|
|
20
|
+
export declare const GBP_PRIMARY_CATEGORY_SUSPENSION_WARNING = "Warning: Google may hold a primary category change for review, and a wrong primary category can get the listing suspended. If Google rejects this edit, posterly will not retry it automatically.";
|
|
21
|
+
export declare const GBP_CLEAR_SERVICES_WARNING = "Warning: Sending an empty service_items list clears all saved services from the public Google Business profile.";
|
|
22
|
+
export declare const GBP_LIVE_LISTING_CHANGED_ERROR = "The live Google Business listing changed since this preview was created (or the arguments do not match the preview), so nothing was changed. Call again without confirm to get a fresh preview.";
|
|
18
23
|
export declare function gbpPeriodLines(periods: GbpPreviewPeriod[] | null | undefined, empty: string): string;
|
|
19
24
|
export declare function gbpAttributeLines(attributes: GbpPreviewAttribute[] | null | undefined, empty: string): string;
|
|
20
25
|
/** The current values of only the attributes this edit names. */
|
|
21
26
|
export declare function gbpCurrentAttributesFor(current: GbpPreviewAttribute[] | null | undefined, requested: GbpPreviewAttribute[] | null | undefined): GbpPreviewAttribute[];
|
|
27
|
+
export declare function gbpTextValueLine(value: unknown, empty: string): string;
|
|
28
|
+
export declare function hasExplicitAdditionalCategories(requested: unknown): boolean;
|
|
29
|
+
export type ResolvedGbpCategoriesPreview = {
|
|
30
|
+
primary_category: string;
|
|
31
|
+
additional_categories: string[];
|
|
32
|
+
carried_over_additional_categories: boolean;
|
|
33
|
+
explicit_additional_categories: boolean;
|
|
34
|
+
removed_additional_categories: string[];
|
|
35
|
+
removed_additional_category_labels: string[];
|
|
36
|
+
/** Label of the current primary category when this write replaces it (it is not kept as an additional category). */
|
|
37
|
+
removed_primary_category_label: string | null;
|
|
38
|
+
};
|
|
39
|
+
export declare function resolveGbpCategoriesForWrite(requested: unknown, currentCategories: unknown): ResolvedGbpCategoriesPreview;
|
|
40
|
+
export declare function gbpCategoriesLines(categories: unknown, empty: string): string;
|
|
41
|
+
export declare function gbpProposedCategoriesLines(requested: unknown, currentCategories: unknown): string;
|
|
42
|
+
export declare function gbpPhoneNumbersLines(phones: unknown, empty: string): string;
|
|
43
|
+
export declare function hasExplicitAdditionalPhones(requested: unknown): boolean;
|
|
44
|
+
export type ResolvedGbpPhoneNumbersPreview = {
|
|
45
|
+
primary_phone: string;
|
|
46
|
+
additional_phones: string[];
|
|
47
|
+
carried_over_additional_phones: boolean;
|
|
48
|
+
explicit_additional_phones: boolean;
|
|
49
|
+
removed_additional_phones: string[];
|
|
50
|
+
};
|
|
51
|
+
export declare function resolveGbpPhoneNumbersForWrite(requested: unknown, currentPhones: unknown): ResolvedGbpPhoneNumbersPreview;
|
|
52
|
+
export declare function gbpProposedPhoneNumbersLines(requested: unknown, currentPhones: unknown): string;
|
|
53
|
+
export declare function gbpServiceItemLines(items: unknown, empty: string): string;
|
|
54
|
+
export declare function gbpProposedServiceItemLines(items: unknown, empty: string): string;
|
|
55
|
+
export declare function formatGbpLocationProfile(result: Record<string, any>): string;
|
|
56
|
+
export declare function formatGbpCategoryCatalog(result: Record<string, any>): string;
|
|
57
|
+
export declare function formatGbpLocationUpdateOutcome(fieldLabel: string, result: Record<string, any> | null | undefined): string;
|