posterly-mcp-server 0.44.0 → 0.45.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 +310 -111
- package/dist/index.js +190 -894
- package/dist/lib/alias-transport.d.ts +84 -0
- package/dist/lib/alias-transport.js +193 -0
- package/dist/lib/api-client.d.ts +18 -0
- package/dist/lib/api-client.js +55 -0
- package/dist/lib/preview-token-core.d.ts +62 -0
- package/dist/lib/preview-token-core.js +131 -0
- package/dist/lib/preview-token.d.ts +23 -0
- package/dist/lib/preview-token.js +44 -0
- package/dist/lib/tool-registry.d.ts +246 -0
- package/dist/lib/tool-registry.js +394 -0
- package/dist/lib/tool-runtime.d.ts +68 -0
- package/dist/lib/tool-runtime.js +85 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/audit-google-business-profile.js +1 -1
- package/dist/tools/connect-account.d.ts +4 -4
- package/dist/tools/connect-account.js +2 -2
- package/dist/tools/create-connect-session.d.ts +2 -2
- package/dist/tools/create-connect-session.js +2 -2
- package/dist/tools/create-post.d.ts +6 -6
- package/dist/tools/create-post.js +3 -3
- package/dist/tools/create-posts-batch.d.ts +4 -4
- package/dist/tools/create-webhook.d.ts +2 -2
- package/dist/tools/delete-post.d.ts +34 -10
- package/dist/tools/delete-post.js +52 -16
- package/dist/tools/generate-captions.d.ts +2 -2
- package/dist/tools/generate-image.d.ts +4 -4
- package/dist/tools/generate-image.js +2 -2
- package/dist/tools/generate-video.d.ts +6 -6
- package/dist/tools/generate-video.js +1 -1
- package/dist/tools/get-agent-signup-info.js +2 -2
- package/dist/tools/get-post.d.ts +16 -1
- package/dist/tools/get-post.js +35 -19
- package/dist/tools/list-accounts.d.ts +49 -3
- package/dist/tools/list-accounts.js +148 -33
- package/dist/tools/list-analytics.d.ts +111 -0
- package/dist/tools/list-analytics.js +393 -0
- package/dist/tools/list-brands.d.ts +38 -3
- package/dist/tools/list-brands.js +138 -20
- package/dist/tools/list-comments.d.ts +29 -9
- package/dist/tools/list-comments.js +75 -34
- package/dist/tools/list-conversations.d.ts +32 -9
- package/dist/tools/list-conversations.js +63 -27
- package/dist/tools/list-google-business-media.js +1 -1
- package/dist/tools/list-google-business-reviews.d.ts +32 -9
- package/dist/tools/list-google-business-reviews.js +77 -52
- package/dist/tools/list-jobs.d.ts +60 -0
- package/dist/tools/list-jobs.js +81 -0
- package/dist/tools/list-platforms.d.ts +62 -3
- package/dist/tools/list-platforms.js +118 -9
- package/dist/tools/list-posts.d.ts +2 -2
- package/dist/tools/manage-comment.d.ts +102 -0
- package/dist/tools/manage-comment.js +125 -0
- package/dist/tools/manage-conversation.d.ts +79 -0
- package/dist/tools/manage-conversation.js +75 -0
- package/dist/tools/manage-google-business-media.d.ts +103 -0
- package/dist/tools/manage-google-business-media.js +126 -0
- package/dist/tools/manage-google-business-review.d.ts +146 -0
- package/dist/tools/manage-google-business-review.js +115 -0
- package/dist/tools/manage-oauth-client.d.ts +121 -0
- package/dist/tools/manage-oauth-client.js +94 -0
- package/dist/tools/manage-webhook.d.ts +99 -0
- package/dist/tools/manage-webhook.js +87 -0
- package/dist/tools/start-signup.d.ts +2 -2
- package/dist/tools/submit-agent-feedback.d.ts +4 -4
- package/dist/tools/trigger-platform-helper.d.ts +2 -2
- package/dist/tools/update-post.d.ts +62 -11
- package/dist/tools/update-post.js +79 -26
- package/dist/tools/upload-media.d.ts +32 -9
- package/dist/tools/upload-media.js +54 -18
- package/dist/tools/validate-post.d.ts +4 -4
- package/dist/tools/whoami.d.ts +15 -2
- package/dist/tools/whoami.js +221 -25
- package/package.json +5 -3
- package/scripts/test-alias-transport.mjs +368 -0
- package/scripts/test-client-header-sanitization.mjs +78 -0
- package/scripts/test-tool-annotations.mjs +38 -17
- package/server.json +9 -2
- package/src/index.ts +227 -1443
- package/src/lib/alias-transport.ts +233 -0
- package/src/lib/api-client.ts +65 -0
- package/src/lib/preview-token-core.ts +157 -0
- package/src/lib/preview-token.ts +54 -0
- package/src/lib/tool-registry.ts +538 -0
- package/src/lib/tool-runtime.ts +117 -0
- package/src/lib/version.ts +1 -1
- package/src/tools/audit-google-business-profile.ts +1 -1
- package/src/tools/connect-account.ts +2 -2
- package/src/tools/create-connect-session.ts +2 -2
- package/src/tools/create-post.ts +3 -3
- package/src/tools/delete-post.ts +60 -19
- package/src/tools/generate-image.ts +2 -2
- package/src/tools/generate-video.ts +1 -1
- package/src/tools/get-agent-signup-info.ts +2 -2
- package/src/tools/get-post.ts +35 -21
- package/src/tools/list-accounts.ts +187 -39
- package/src/tools/list-analytics.ts +444 -0
- package/src/tools/list-brands.ts +162 -26
- package/src/tools/list-comments.ts +86 -43
- package/src/tools/list-conversations.ts +81 -39
- package/src/tools/list-google-business-media.ts +1 -1
- package/src/tools/list-google-business-reviews.ts +93 -64
- package/src/tools/list-jobs.ts +91 -0
- package/src/tools/list-platforms.ts +135 -11
- package/src/tools/manage-comment.ts +142 -0
- package/src/tools/manage-conversation.ts +89 -0
- package/src/tools/manage-google-business-media.ts +147 -0
- package/src/tools/manage-google-business-review.ts +139 -0
- package/src/tools/manage-oauth-client.ts +116 -0
- package/src/tools/manage-webhook.ts +103 -0
- package/src/tools/update-post.ts +106 -39
- package/src/tools/upload-media.ts +76 -28
- package/src/tools/whoami.ts +253 -30
- package/tool-annotations.json +76 -149
- package/tool-registry.json +2085 -0
- package/src/tools/add-google-business-media.ts +0 -50
- package/src/tools/create-oauth-client.ts +0 -36
- package/src/tools/delete-comment.ts +0 -29
- package/src/tools/delete-google-business-media.ts +0 -30
- package/src/tools/delete-google-business-review-reply.ts +0 -30
- package/src/tools/delete-oauth-client.ts +0 -23
- package/src/tools/delete-post-group.ts +0 -17
- package/src/tools/delete-webhook.ts +0 -17
- package/src/tools/get-account-analytics.ts +0 -171
- package/src/tools/get-brand-profile.ts +0 -86
- package/src/tools/get-brand.ts +0 -34
- package/src/tools/get-comment.ts +0 -47
- package/src/tools/get-connect-link.ts +0 -61
- package/src/tools/get-connect-session.ts +0 -63
- package/src/tools/get-conversation.ts +0 -44
- package/src/tools/get-google-business-review-link.ts +0 -30
- package/src/tools/get-image-job.ts +0 -36
- package/src/tools/get-learned-voice.ts +0 -31
- package/src/tools/get-mcp-status.ts +0 -212
- package/src/tools/get-performance-profile.ts +0 -47
- package/src/tools/get-platform-schema.ts +0 -56
- package/src/tools/get-post-analytics.ts +0 -243
- package/src/tools/get-post-insights.ts +0 -60
- package/src/tools/get-post-missing.ts +0 -16
- package/src/tools/get-video-job.ts +0 -36
- package/src/tools/list-brand-accounts.ts +0 -36
- package/src/tools/reply-google-business-review.ts +0 -32
- package/src/tools/reply-to-comment.ts +0 -30
- package/src/tools/send-message.ts +0 -28
- package/src/tools/suggest-google-business-review-reply.ts +0 -44
- package/src/tools/sync-inbox.ts +0 -28
- package/src/tools/test-webhook.ts +0 -18
- package/src/tools/update-comment.ts +0 -31
- package/src/tools/update-oauth-client.ts +0 -38
- package/src/tools/update-post-release-id.ts +0 -25
- package/src/tools/update-post-status.ts +0 -31
- package/src/tools/update-webhook.ts +0 -36
- package/src/tools/upload-media-from-url.ts +0 -33
package/dist/index.js
CHANGED
|
@@ -1,938 +1,234 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
2
3
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
4
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
-
import { PosterlyClient } from './lib/api-client.js';
|
|
5
|
+
import { PosterlyClient, setMcpClientNameResolver } from './lib/api-client.js';
|
|
5
6
|
import { POSTERLY_MCP_VERSION } from './lib/version.js';
|
|
6
7
|
import { getToolAnnotations } from './lib/tool-annotations.js';
|
|
8
|
+
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
9
|
+
import { AliasTransport } from './lib/alias-transport.js';
|
|
10
|
+
import { StdioPreviewTokens } from './lib/preview-token.js';
|
|
11
|
+
import { parseToolsets, toolsetInstructions, visibleTools } from './lib/tool-registry.js';
|
|
7
12
|
import { getAgentSignupInfoTool } from './tools/get-agent-signup-info.js';
|
|
8
13
|
import { getSignupSessionTool } from './tools/get-signup-session.js';
|
|
9
14
|
import { startSignupTool } from './tools/start-signup.js';
|
|
10
|
-
import {
|
|
15
|
+
import { whoamiTool } from './tools/whoami.js';
|
|
11
16
|
import { listAccountsTool } from './tools/list-accounts.js';
|
|
12
17
|
import { disconnectAccountTool } from './tools/disconnect-account.js';
|
|
18
|
+
import { connectAccountTool } from './tools/connect-account.js';
|
|
19
|
+
import { createConnectSessionTool } from './tools/create-connect-session.js';
|
|
20
|
+
import { createApiKeyTool } from './tools/create-api-key.js';
|
|
21
|
+
import { deleteApiKeyTool } from './tools/delete-api-key.js';
|
|
22
|
+
import { listWorkspaceMembersTool } from './tools/list-workspace-members.js';
|
|
23
|
+
import { manageWorkspaceMemberTool } from './tools/manage-workspace-member.js';
|
|
24
|
+
import { getCreditsTool } from './tools/get-credits.js';
|
|
25
|
+
import { getSubscriptionTool } from './tools/get-subscription.js';
|
|
26
|
+
import { cancelSubscriptionTool } from './tools/cancel-subscription.js';
|
|
27
|
+
import { pauseSubscriptionTool } from './tools/pause-subscription.js';
|
|
28
|
+
import { resumeSubscriptionTool } from './tools/resume-subscription.js';
|
|
29
|
+
import { downgradeSubscriptionTool } from './tools/downgrade-subscription.js';
|
|
30
|
+
import { listOAuthClientsTool } from './tools/list-oauth-clients.js';
|
|
31
|
+
import { manageOAuthClientTool } from './tools/manage-oauth-client.js';
|
|
32
|
+
import { listPlatformsTool } from './tools/list-platforms.js';
|
|
33
|
+
import { triggerPlatformHelperTool } from './tools/trigger-platform-helper.js';
|
|
13
34
|
import { listBrandsTool } from './tools/list-brands.js';
|
|
14
|
-
import { getBrandTool } from './tools/get-brand.js';
|
|
15
|
-
import { listBrandAccountsTool } from './tools/list-brand-accounts.js';
|
|
16
|
-
import { getBrandProfileTool } from './tools/get-brand-profile.js';
|
|
17
|
-
import { getLearnedVoiceTool } from './tools/get-learned-voice.js';
|
|
18
|
-
import { getPerformanceProfileTool } from './tools/get-performance-profile.js';
|
|
19
|
-
import { getPostInsightsTool } from './tools/get-post-insights.js';
|
|
20
35
|
import { listPostSuggestionsTool } from './tools/list-post-suggestions.js';
|
|
21
36
|
import { dismissSuggestionTool } from './tools/dismiss-suggestion.js';
|
|
22
|
-
import { createPostTool } from './tools/create-post.js';
|
|
23
|
-
import { validatePostTool } from './tools/validate-post.js';
|
|
24
37
|
import { submitAgentFeedbackTool } from './tools/submit-agent-feedback.js';
|
|
25
38
|
import { submitProductFeedbackTool } from './tools/submit-product-feedback.js';
|
|
39
|
+
import { validatePostTool } from './tools/validate-post.js';
|
|
40
|
+
import { createPostTool } from './tools/create-post.js';
|
|
26
41
|
import { createPostsBatchTool } from './tools/create-posts-batch.js';
|
|
27
42
|
import { findSlotTool } from './tools/find-slot.js';
|
|
28
43
|
import { listPostsTool } from './tools/list-posts.js';
|
|
29
44
|
import { uploadMediaTool } from './tools/upload-media.js';
|
|
45
|
+
import { createSignedUploadTool } from './tools/create-signed-upload.js';
|
|
46
|
+
import { createMediaDropTool } from './tools/create-media-drop.js';
|
|
47
|
+
import { listMediaTool } from './tools/list-media.js';
|
|
48
|
+
import { getVideoOptionsTool } from './tools/get-video-options.js';
|
|
49
|
+
import { runVideoFunctionTool } from './tools/run-video-function.js';
|
|
50
|
+
import { generateVideoTool } from './tools/generate-video.js';
|
|
51
|
+
import { listJobsTool } from './tools/list-jobs.js';
|
|
52
|
+
import { generateCaptionsTool } from './tools/generate-captions.js';
|
|
53
|
+
import { generateImageTool } from './tools/generate-image.js';
|
|
30
54
|
import { getPostTool } from './tools/get-post.js';
|
|
31
|
-
import { getPostMissingTool } from './tools/get-post-missing.js';
|
|
32
55
|
import { askSupportTool } from './tools/ask-support.js';
|
|
33
56
|
import { updatePostTool } from './tools/update-post.js';
|
|
34
|
-
import { updatePostStatusTool } from './tools/update-post-status.js';
|
|
35
|
-
import { updatePostReleaseIdTool } from './tools/update-post-release-id.js';
|
|
36
57
|
import { deletePostTool } from './tools/delete-post.js';
|
|
37
|
-
import {
|
|
38
|
-
import { whoamiTool } from './tools/whoami.js';
|
|
39
|
-
import { generateCaptionsTool } from './tools/generate-captions.js';
|
|
40
|
-
import { generateImageTool } from './tools/generate-image.js';
|
|
41
|
-
import { getImageJobTool } from './tools/get-image-job.js';
|
|
42
|
-
import { getVideoOptionsTool } from './tools/get-video-options.js';
|
|
43
|
-
import { runVideoFunctionTool } from './tools/run-video-function.js';
|
|
44
|
-
import { generateVideoTool } from './tools/generate-video.js';
|
|
45
|
-
import { getVideoJobTool } from './tools/get-video-job.js';
|
|
46
|
-
import { getAccountAnalyticsTool } from './tools/get-account-analytics.js';
|
|
47
|
-
import { getPostAnalyticsTool } from './tools/get-post-analytics.js';
|
|
58
|
+
import { listAnalyticsTool } from './tools/list-analytics.js';
|
|
48
59
|
import { listGoogleBusinessReviewsTool } from './tools/list-google-business-reviews.js';
|
|
49
|
-
import { getGoogleBusinessReviewLinkTool } from './tools/get-google-business-review-link.js';
|
|
50
60
|
import { auditGoogleBusinessProfileTool } from './tools/audit-google-business-profile.js';
|
|
51
|
-
import {
|
|
52
|
-
import { replyGoogleBusinessReviewTool } from './tools/reply-google-business-review.js';
|
|
53
|
-
import { deleteGoogleBusinessReviewReplyTool } from './tools/delete-google-business-review-reply.js';
|
|
61
|
+
import { manageGoogleBusinessReviewTool } from './tools/manage-google-business-review.js';
|
|
54
62
|
import { listGoogleBusinessMediaTool } from './tools/list-google-business-media.js';
|
|
55
|
-
import {
|
|
56
|
-
import { deleteGoogleBusinessMediaTool } from './tools/delete-google-business-media.js';
|
|
63
|
+
import { manageGoogleBusinessMediaTool } from './tools/manage-google-business-media.js';
|
|
57
64
|
import { listConversationsTool } from './tools/list-conversations.js';
|
|
58
|
-
import {
|
|
59
|
-
import { sendMessageTool } from './tools/send-message.js';
|
|
65
|
+
import { manageConversationTool } from './tools/manage-conversation.js';
|
|
60
66
|
import { listCommentsTool } from './tools/list-comments.js';
|
|
61
|
-
import {
|
|
62
|
-
import { replyToCommentTool } from './tools/reply-to-comment.js';
|
|
63
|
-
import { updateCommentTool } from './tools/update-comment.js';
|
|
64
|
-
import { deleteCommentTool } from './tools/delete-comment.js';
|
|
65
|
-
import { syncInboxTool } from './tools/sync-inbox.js';
|
|
67
|
+
import { manageCommentTool } from './tools/manage-comment.js';
|
|
66
68
|
import { listActivityTool } from './tools/list-activity.js';
|
|
67
69
|
import { getUpdatesTool } from './tools/get-updates.js';
|
|
68
70
|
import { listWebhooksTool } from './tools/list-webhooks.js';
|
|
69
71
|
import { createWebhookTool } from './tools/create-webhook.js';
|
|
70
|
-
import {
|
|
71
|
-
import { deleteWebhookTool } from './tools/delete-webhook.js';
|
|
72
|
-
import { testWebhookTool } from './tools/test-webhook.js';
|
|
73
|
-
import { listPlatformsTool } from './tools/list-platforms.js';
|
|
74
|
-
import { getPlatformSchemaTool } from './tools/get-platform-schema.js';
|
|
75
|
-
import { triggerPlatformHelperTool } from './tools/trigger-platform-helper.js';
|
|
72
|
+
import { manageWebhookTool } from './tools/manage-webhook.js';
|
|
76
73
|
import { getXPostingQuotaTool } from './tools/get-x-posting-quota.js';
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Every stdio tool, in registration order. The order is what tools/list
|
|
76
|
+
* returns, so keep new tools appended where they belong rather than
|
|
77
|
+
* re-sorting: reordering changes the published tool list.
|
|
78
|
+
*/
|
|
79
|
+
const STDIO_TOOLS = [
|
|
80
|
+
getAgentSignupInfoTool,
|
|
81
|
+
startSignupTool,
|
|
82
|
+
getSignupSessionTool,
|
|
83
|
+
whoamiTool,
|
|
84
|
+
listAccountsTool,
|
|
85
|
+
disconnectAccountTool,
|
|
86
|
+
connectAccountTool,
|
|
87
|
+
createConnectSessionTool,
|
|
88
|
+
createApiKeyTool,
|
|
89
|
+
deleteApiKeyTool,
|
|
90
|
+
listWorkspaceMembersTool,
|
|
91
|
+
manageWorkspaceMemberTool,
|
|
92
|
+
getCreditsTool,
|
|
93
|
+
getSubscriptionTool,
|
|
94
|
+
cancelSubscriptionTool,
|
|
95
|
+
pauseSubscriptionTool,
|
|
96
|
+
resumeSubscriptionTool,
|
|
97
|
+
downgradeSubscriptionTool,
|
|
98
|
+
listOAuthClientsTool,
|
|
99
|
+
manageOAuthClientTool,
|
|
100
|
+
listPlatformsTool,
|
|
101
|
+
triggerPlatformHelperTool,
|
|
102
|
+
listBrandsTool,
|
|
103
|
+
listPostSuggestionsTool,
|
|
104
|
+
dismissSuggestionTool,
|
|
105
|
+
submitAgentFeedbackTool,
|
|
106
|
+
submitProductFeedbackTool,
|
|
107
|
+
validatePostTool,
|
|
108
|
+
createPostTool,
|
|
109
|
+
createPostsBatchTool,
|
|
110
|
+
findSlotTool,
|
|
111
|
+
listPostsTool,
|
|
112
|
+
uploadMediaTool,
|
|
113
|
+
createSignedUploadTool,
|
|
114
|
+
createMediaDropTool,
|
|
115
|
+
listMediaTool,
|
|
116
|
+
getVideoOptionsTool,
|
|
117
|
+
runVideoFunctionTool,
|
|
118
|
+
generateVideoTool,
|
|
119
|
+
listJobsTool,
|
|
120
|
+
generateCaptionsTool,
|
|
121
|
+
generateImageTool,
|
|
122
|
+
getPostTool,
|
|
123
|
+
askSupportTool,
|
|
124
|
+
updatePostTool,
|
|
125
|
+
deletePostTool,
|
|
126
|
+
listAnalyticsTool,
|
|
127
|
+
listGoogleBusinessReviewsTool,
|
|
128
|
+
auditGoogleBusinessProfileTool,
|
|
129
|
+
manageGoogleBusinessReviewTool,
|
|
130
|
+
listGoogleBusinessMediaTool,
|
|
131
|
+
manageGoogleBusinessMediaTool,
|
|
132
|
+
listConversationsTool,
|
|
133
|
+
manageConversationTool,
|
|
134
|
+
listCommentsTool,
|
|
135
|
+
manageCommentTool,
|
|
136
|
+
listActivityTool,
|
|
137
|
+
getUpdatesTool,
|
|
138
|
+
listWebhooksTool,
|
|
139
|
+
createWebhookTool,
|
|
140
|
+
manageWebhookTool,
|
|
141
|
+
getXPostingQuotaTool,
|
|
142
|
+
];
|
|
143
|
+
// The tool registry (sets, labels, aliases) ships at the package root next to
|
|
144
|
+
// tool-annotations.json; dist/index.js reads it from one level up.
|
|
145
|
+
const require = createRequire(import.meta.url);
|
|
146
|
+
const registry = require('../tool-registry.json');
|
|
147
|
+
/**
|
|
148
|
+
* Tool sets to list (POSTERLY_TOOLSETS env or --toolsets=core,inbox). Default
|
|
149
|
+
* is every set, so nobody loses tools. Signup tools are always listed. Sets
|
|
150
|
+
* only filter tools/list: every tool is still registered and callable.
|
|
151
|
+
*/
|
|
152
|
+
function requestedToolsets() {
|
|
153
|
+
const flag = process.argv.find((arg) => arg.startsWith('--toolsets='));
|
|
154
|
+
if (flag)
|
|
155
|
+
return flag.slice('--toolsets='.length);
|
|
156
|
+
return process.env.POSTERLY_TOOLSETS;
|
|
157
|
+
}
|
|
158
|
+
const toolsets = parseToolsets(registry, requestedToolsets(), 'stdio');
|
|
159
|
+
if (toolsets.unknown.length > 0) {
|
|
160
|
+
console.error(`posterly MCP: ignoring unknown tool set(s): ${toolsets.unknown.join(', ')}`);
|
|
161
|
+
}
|
|
99
162
|
const server = new McpServer({
|
|
100
163
|
name: 'posterly',
|
|
101
164
|
version: POSTERLY_MCP_VERSION,
|
|
165
|
+
}, {
|
|
166
|
+
// Which tool sets exist, that every set is on by default, how to load
|
|
167
|
+
// fewer, and how preview then confirm works (built from the registry).
|
|
168
|
+
instructions: toolsetInstructions(registry, 'stdio'),
|
|
102
169
|
});
|
|
103
170
|
const client = new PosterlyClient();
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return {
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
try {
|
|
161
|
-
const text = await disconnectAccountTool.execute(client, input);
|
|
162
|
-
return { content: [{ type: 'text', text }] };
|
|
163
|
-
}
|
|
164
|
-
catch (err) {
|
|
165
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
server.tool(getConnectLinkTool.name, getConnectLinkTool.description, getConnectLinkTool.inputSchema.shape, getToolAnnotations(getConnectLinkTool.name), async (input) => {
|
|
169
|
-
try {
|
|
170
|
-
const text = await getConnectLinkTool.execute(client, input);
|
|
171
|
-
return { content: [{ type: 'text', text }] };
|
|
172
|
-
}
|
|
173
|
-
catch (err) {
|
|
174
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
server.tool(connectAccountTool.name, connectAccountTool.description, connectAccountTool.inputSchema.shape, getToolAnnotations(connectAccountTool.name), async (input) => {
|
|
178
|
-
try {
|
|
179
|
-
const text = await connectAccountTool.execute(client, input);
|
|
180
|
-
return { content: [{ type: 'text', text }] };
|
|
181
|
-
}
|
|
182
|
-
catch (err) {
|
|
183
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
server.tool(createConnectSessionTool.name, createConnectSessionTool.description, createConnectSessionTool.inputSchema.shape, getToolAnnotations(createConnectSessionTool.name), async (input) => {
|
|
187
|
-
try {
|
|
188
|
-
const text = await createConnectSessionTool.execute(client, input);
|
|
189
|
-
return { content: [{ type: 'text', text }] };
|
|
190
|
-
}
|
|
191
|
-
catch (err) {
|
|
192
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
server.tool(getConnectSessionTool.name, getConnectSessionTool.description, getConnectSessionTool.inputSchema.shape, getToolAnnotations(getConnectSessionTool.name), async (input) => {
|
|
196
|
-
try {
|
|
197
|
-
const text = await getConnectSessionTool.execute(client, input);
|
|
198
|
-
return { content: [{ type: 'text', text }] };
|
|
199
|
-
}
|
|
200
|
-
catch (err) {
|
|
201
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
server.tool(createApiKeyTool.name, createApiKeyTool.description, createApiKeyTool.inputSchema.shape, getToolAnnotations(createApiKeyTool.name), async (input) => {
|
|
205
|
-
try {
|
|
206
|
-
const text = await createApiKeyTool.execute(client, input);
|
|
207
|
-
return { content: [{ type: 'text', text }] };
|
|
208
|
-
}
|
|
209
|
-
catch (err) {
|
|
210
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
server.tool(deleteApiKeyTool.name, deleteApiKeyTool.description, deleteApiKeyTool.inputSchema.shape, getToolAnnotations(deleteApiKeyTool.name), async (input) => {
|
|
214
|
-
try {
|
|
215
|
-
const text = await deleteApiKeyTool.execute(client, input);
|
|
216
|
-
return { content: [{ type: 'text', text }] };
|
|
217
|
-
}
|
|
218
|
-
catch (err) {
|
|
219
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
server.tool(listWorkspaceMembersTool.name, listWorkspaceMembersTool.description, listWorkspaceMembersTool.inputSchema.shape, getToolAnnotations(listWorkspaceMembersTool.name), async (input) => {
|
|
223
|
-
try {
|
|
224
|
-
const text = await listWorkspaceMembersTool.execute(client, input);
|
|
225
|
-
return { content: [{ type: 'text', text }] };
|
|
226
|
-
}
|
|
227
|
-
catch (err) {
|
|
228
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
server.tool(manageWorkspaceMemberTool.name, manageWorkspaceMemberTool.description, manageWorkspaceMemberTool.inputSchema.shape, getToolAnnotations(manageWorkspaceMemberTool.name), async (input) => {
|
|
232
|
-
try {
|
|
233
|
-
const text = await manageWorkspaceMemberTool.execute(client, input);
|
|
234
|
-
return { content: [{ type: 'text', text }] };
|
|
235
|
-
}
|
|
236
|
-
catch (err) {
|
|
237
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
server.tool(getCreditsTool.name, getCreditsTool.description, getCreditsTool.inputSchema.shape, getToolAnnotations(getCreditsTool.name), async () => {
|
|
241
|
-
try {
|
|
242
|
-
const text = await getCreditsTool.execute(client);
|
|
243
|
-
return { content: [{ type: 'text', text }] };
|
|
244
|
-
}
|
|
245
|
-
catch (err) {
|
|
246
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
server.tool(getSubscriptionTool.name, getSubscriptionTool.description, getSubscriptionTool.inputSchema.shape, getToolAnnotations(getSubscriptionTool.name), async () => {
|
|
250
|
-
try {
|
|
251
|
-
const text = await getSubscriptionTool.execute(client);
|
|
252
|
-
return { content: [{ type: 'text', text }] };
|
|
253
|
-
}
|
|
254
|
-
catch (err) {
|
|
255
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
server.tool(cancelSubscriptionTool.name, cancelSubscriptionTool.description, cancelSubscriptionTool.inputSchema.shape, getToolAnnotations(cancelSubscriptionTool.name), async (input) => {
|
|
259
|
-
try {
|
|
260
|
-
const text = await cancelSubscriptionTool.execute(client, input);
|
|
261
|
-
return { content: [{ type: 'text', text }] };
|
|
262
|
-
}
|
|
263
|
-
catch (err) {
|
|
264
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
server.tool(pauseSubscriptionTool.name, pauseSubscriptionTool.description, pauseSubscriptionTool.inputSchema.shape, getToolAnnotations(pauseSubscriptionTool.name), async (input) => {
|
|
268
|
-
try {
|
|
269
|
-
const text = await pauseSubscriptionTool.execute(client, input);
|
|
270
|
-
return { content: [{ type: 'text', text }] };
|
|
271
|
-
}
|
|
272
|
-
catch (err) {
|
|
273
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
server.tool(resumeSubscriptionTool.name, resumeSubscriptionTool.description, resumeSubscriptionTool.inputSchema.shape, getToolAnnotations(resumeSubscriptionTool.name), async () => {
|
|
277
|
-
try {
|
|
278
|
-
const text = await resumeSubscriptionTool.execute(client);
|
|
279
|
-
return { content: [{ type: 'text', text }] };
|
|
280
|
-
}
|
|
281
|
-
catch (err) {
|
|
282
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
server.tool(downgradeSubscriptionTool.name, downgradeSubscriptionTool.description, downgradeSubscriptionTool.inputSchema.shape, getToolAnnotations(downgradeSubscriptionTool.name), async (input) => {
|
|
286
|
-
try {
|
|
287
|
-
const text = await downgradeSubscriptionTool.execute(client, input);
|
|
288
|
-
return { content: [{ type: 'text', text }] };
|
|
289
|
-
}
|
|
290
|
-
catch (err) {
|
|
291
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
server.tool(listOAuthClientsTool.name, listOAuthClientsTool.description, listOAuthClientsTool.inputSchema.shape, getToolAnnotations(listOAuthClientsTool.name), async () => {
|
|
295
|
-
try {
|
|
296
|
-
const text = await listOAuthClientsTool.execute(client);
|
|
297
|
-
return { content: [{ type: 'text', text }] };
|
|
298
|
-
}
|
|
299
|
-
catch (err) {
|
|
300
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
server.tool(createOAuthClientTool.name, createOAuthClientTool.description, createOAuthClientTool.inputSchema.shape, getToolAnnotations(createOAuthClientTool.name), async (input) => {
|
|
304
|
-
try {
|
|
305
|
-
const text = await createOAuthClientTool.execute(client, input);
|
|
306
|
-
return { content: [{ type: 'text', text }] };
|
|
307
|
-
}
|
|
308
|
-
catch (err) {
|
|
309
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
server.tool(updateOAuthClientTool.name, updateOAuthClientTool.description, updateOAuthClientTool.inputSchema.shape, getToolAnnotations(updateOAuthClientTool.name), async (input) => {
|
|
313
|
-
try {
|
|
314
|
-
const text = await updateOAuthClientTool.execute(client, input);
|
|
315
|
-
return { content: [{ type: 'text', text }] };
|
|
316
|
-
}
|
|
317
|
-
catch (err) {
|
|
318
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
server.tool(deleteOAuthClientTool.name, deleteOAuthClientTool.description, deleteOAuthClientTool.inputSchema.shape, getToolAnnotations(deleteOAuthClientTool.name), async (input) => {
|
|
322
|
-
try {
|
|
323
|
-
const text = await deleteOAuthClientTool.execute(client, input);
|
|
324
|
-
return { content: [{ type: 'text', text }] };
|
|
325
|
-
}
|
|
326
|
-
catch (err) {
|
|
327
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
server.tool(listPlatformsTool.name, listPlatformsTool.description, listPlatformsTool.inputSchema.shape, getToolAnnotations(listPlatformsTool.name), async (input) => {
|
|
331
|
-
try {
|
|
332
|
-
const text = await listPlatformsTool.execute(client, input);
|
|
333
|
-
return { content: [{ type: 'text', text }] };
|
|
334
|
-
}
|
|
335
|
-
catch (err) {
|
|
336
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
server.tool(getPlatformSchemaTool.name, getPlatformSchemaTool.description, getPlatformSchemaTool.inputSchema.shape, getToolAnnotations(getPlatformSchemaTool.name), async (input) => {
|
|
340
|
-
try {
|
|
341
|
-
const text = await getPlatformSchemaTool.execute(client, input);
|
|
342
|
-
return { content: [{ type: 'text', text }] };
|
|
343
|
-
}
|
|
344
|
-
catch (err) {
|
|
345
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
server.tool(triggerPlatformHelperTool.name, triggerPlatformHelperTool.description, triggerPlatformHelperTool.inputSchema.shape, getToolAnnotations(triggerPlatformHelperTool.name), async (input) => {
|
|
349
|
-
try {
|
|
350
|
-
const text = await triggerPlatformHelperTool.execute(client, input);
|
|
351
|
-
return { content: [{ type: 'text', text }] };
|
|
352
|
-
}
|
|
353
|
-
catch (err) {
|
|
354
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
server.tool(listBrandsTool.name, listBrandsTool.description, listBrandsTool.inputSchema.shape, getToolAnnotations(listBrandsTool.name), async (input) => {
|
|
358
|
-
try {
|
|
359
|
-
const text = await listBrandsTool.execute(client, input);
|
|
360
|
-
return { content: [{ type: 'text', text }] };
|
|
361
|
-
}
|
|
362
|
-
catch (err) {
|
|
363
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
server.tool(getBrandTool.name, getBrandTool.description, getBrandTool.inputSchema.shape, getToolAnnotations(getBrandTool.name), async (input) => {
|
|
367
|
-
try {
|
|
368
|
-
const text = await getBrandTool.execute(client, input);
|
|
369
|
-
return { content: [{ type: 'text', text }] };
|
|
370
|
-
}
|
|
371
|
-
catch (err) {
|
|
372
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
373
|
-
}
|
|
374
|
-
});
|
|
375
|
-
server.tool(listBrandAccountsTool.name, listBrandAccountsTool.description, listBrandAccountsTool.inputSchema.shape, getToolAnnotations(listBrandAccountsTool.name), async (input) => {
|
|
376
|
-
try {
|
|
377
|
-
const text = await listBrandAccountsTool.execute(client, input);
|
|
378
|
-
return { content: [{ type: 'text', text }] };
|
|
379
|
-
}
|
|
380
|
-
catch (err) {
|
|
381
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
server.tool(getBrandProfileTool.name, getBrandProfileTool.description, getBrandProfileTool.inputSchema.shape, getToolAnnotations(getBrandProfileTool.name), async (input) => {
|
|
385
|
-
try {
|
|
386
|
-
const text = await getBrandProfileTool.execute(client, input);
|
|
387
|
-
return { content: [{ type: 'text', text }] };
|
|
388
|
-
}
|
|
389
|
-
catch (err) {
|
|
390
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
391
|
-
}
|
|
392
|
-
});
|
|
393
|
-
server.tool(getLearnedVoiceTool.name, getLearnedVoiceTool.description, getLearnedVoiceTool.inputSchema.shape, getToolAnnotations(getLearnedVoiceTool.name), async (input) => {
|
|
394
|
-
try {
|
|
395
|
-
const text = await getLearnedVoiceTool.execute(client, input);
|
|
396
|
-
return { content: [{ type: 'text', text }] };
|
|
397
|
-
}
|
|
398
|
-
catch (err) {
|
|
399
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
server.tool(getPerformanceProfileTool.name, getPerformanceProfileTool.description, getPerformanceProfileTool.inputSchema.shape, getToolAnnotations(getPerformanceProfileTool.name), async (input) => {
|
|
403
|
-
try {
|
|
404
|
-
const text = await getPerformanceProfileTool.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
|
-
});
|
|
411
|
-
server.tool(getPostInsightsTool.name, getPostInsightsTool.description, getPostInsightsTool.inputSchema.shape, getToolAnnotations(getPostInsightsTool.name), async (input) => {
|
|
412
|
-
try {
|
|
413
|
-
const text = await getPostInsightsTool.execute(client, input);
|
|
414
|
-
return { content: [{ type: 'text', text }] };
|
|
415
|
-
}
|
|
416
|
-
catch (err) {
|
|
417
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
server.tool(listPostSuggestionsTool.name, listPostSuggestionsTool.description, listPostSuggestionsTool.inputSchema.shape, getToolAnnotations(listPostSuggestionsTool.name), async (input) => {
|
|
421
|
-
try {
|
|
422
|
-
const text = await listPostSuggestionsTool.execute(client, input);
|
|
423
|
-
return { content: [{ type: 'text', text }] };
|
|
424
|
-
}
|
|
425
|
-
catch (err) {
|
|
426
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
|
-
server.tool(dismissSuggestionTool.name, dismissSuggestionTool.description, dismissSuggestionTool.inputSchema.shape, getToolAnnotations(dismissSuggestionTool.name), async (input) => {
|
|
430
|
-
try {
|
|
431
|
-
const text = await dismissSuggestionTool.execute(client, input);
|
|
432
|
-
return { content: [{ type: 'text', text }] };
|
|
433
|
-
}
|
|
434
|
-
catch (err) {
|
|
435
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
server.tool(submitAgentFeedbackTool.name, submitAgentFeedbackTool.description, submitAgentFeedbackTool.inputSchema.shape, getToolAnnotations(submitAgentFeedbackTool.name), async (input) => {
|
|
439
|
-
try {
|
|
440
|
-
const text = await submitAgentFeedbackTool.execute(client, input);
|
|
441
|
-
return { content: [{ type: 'text', text }] };
|
|
442
|
-
}
|
|
443
|
-
catch (err) {
|
|
444
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
445
|
-
}
|
|
446
|
-
});
|
|
447
|
-
server.tool(submitProductFeedbackTool.name, submitProductFeedbackTool.description, submitProductFeedbackTool.inputSchema.shape, getToolAnnotations(submitProductFeedbackTool.name), async (input) => {
|
|
448
|
-
try {
|
|
449
|
-
const text = await submitProductFeedbackTool.execute(client, input);
|
|
450
|
-
return { content: [{ type: 'text', text }] };
|
|
451
|
-
}
|
|
452
|
-
catch (err) {
|
|
453
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
server.tool(validatePostTool.name, validatePostTool.description, validatePostTool.inputSchema.shape, getToolAnnotations(validatePostTool.name), async (input) => {
|
|
457
|
-
try {
|
|
458
|
-
const text = await validatePostTool.execute(client, input);
|
|
459
|
-
return { content: [{ type: 'text', text }] };
|
|
460
|
-
}
|
|
461
|
-
catch (err) {
|
|
462
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
|
-
server.tool(createPostTool.name, createPostTool.description, createPostTool.inputSchema.shape, getToolAnnotations(createPostTool.name), async (input) => {
|
|
466
|
-
try {
|
|
467
|
-
const text = await createPostTool.execute(client, input);
|
|
468
|
-
return { content: [{ type: 'text', text }] };
|
|
469
|
-
}
|
|
470
|
-
catch (err) {
|
|
471
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
|
-
server.tool(createPostsBatchTool.name, createPostsBatchTool.description, createPostsBatchTool.inputSchema.shape, getToolAnnotations(createPostsBatchTool.name), async (input) => {
|
|
475
|
-
try {
|
|
476
|
-
const text = await createPostsBatchTool.execute(client, input);
|
|
477
|
-
return { content: [{ type: 'text', text }] };
|
|
478
|
-
}
|
|
479
|
-
catch (err) {
|
|
480
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
|
-
server.tool(findSlotTool.name, findSlotTool.description, findSlotTool.inputSchema.shape, getToolAnnotations(findSlotTool.name), async (input) => {
|
|
484
|
-
try {
|
|
485
|
-
const text = await findSlotTool.execute(client, input);
|
|
486
|
-
return { content: [{ type: 'text', text }] };
|
|
487
|
-
}
|
|
488
|
-
catch (err) {
|
|
489
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
490
|
-
}
|
|
491
|
-
});
|
|
492
|
-
server.tool(listPostsTool.name, listPostsTool.description, listPostsTool.inputSchema.shape, getToolAnnotations(listPostsTool.name), async (input) => {
|
|
493
|
-
try {
|
|
494
|
-
const text = await listPostsTool.execute(client, input);
|
|
495
|
-
return { content: [{ type: 'text', text }] };
|
|
496
|
-
}
|
|
497
|
-
catch (err) {
|
|
498
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
server.tool(uploadMediaTool.name, uploadMediaTool.description, uploadMediaTool.inputSchema.shape, getToolAnnotations(uploadMediaTool.name), async (input) => {
|
|
502
|
-
try {
|
|
503
|
-
const text = await uploadMediaTool.execute(client, input);
|
|
504
|
-
return { content: [{ type: 'text', text }] };
|
|
505
|
-
}
|
|
506
|
-
catch (err) {
|
|
507
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
server.tool(uploadMediaFromUrlTool.name, uploadMediaFromUrlTool.description, uploadMediaFromUrlTool.inputSchema.shape, getToolAnnotations(uploadMediaFromUrlTool.name), async (input) => {
|
|
511
|
-
try {
|
|
512
|
-
const text = await uploadMediaFromUrlTool.execute(client, input);
|
|
513
|
-
return { content: [{ type: 'text', text }] };
|
|
514
|
-
}
|
|
515
|
-
catch (err) {
|
|
516
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
server.tool(createSignedUploadTool.name, createSignedUploadTool.description, createSignedUploadTool.inputSchema.shape, getToolAnnotations(createSignedUploadTool.name), async (input) => {
|
|
520
|
-
try {
|
|
521
|
-
const text = await createSignedUploadTool.execute(client, input);
|
|
522
|
-
return { content: [{ type: 'text', text }] };
|
|
523
|
-
}
|
|
524
|
-
catch (err) {
|
|
525
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
|
-
server.tool(createMediaDropTool.name, createMediaDropTool.description, createMediaDropTool.inputSchema.shape, getToolAnnotations(createMediaDropTool.name), async (input) => {
|
|
529
|
-
try {
|
|
530
|
-
const text = await createMediaDropTool.execute(client, input);
|
|
531
|
-
return { content: [{ type: 'text', text }] };
|
|
532
|
-
}
|
|
533
|
-
catch (err) {
|
|
534
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
server.tool(listMediaTool.name, listMediaTool.description, listMediaTool.inputSchema.shape, getToolAnnotations(listMediaTool.name), async (input) => {
|
|
538
|
-
try {
|
|
539
|
-
const text = await listMediaTool.execute(client, input);
|
|
540
|
-
return { content: [{ type: 'text', text }] };
|
|
541
|
-
}
|
|
542
|
-
catch (err) {
|
|
543
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
544
|
-
}
|
|
545
|
-
});
|
|
546
|
-
server.tool(getVideoOptionsTool.name, getVideoOptionsTool.description, getVideoOptionsTool.inputSchema.shape, getToolAnnotations(getVideoOptionsTool.name), async () => {
|
|
547
|
-
try {
|
|
548
|
-
const text = await getVideoOptionsTool.execute(client);
|
|
549
|
-
return { content: [{ type: 'text', text }] };
|
|
550
|
-
}
|
|
551
|
-
catch (err) {
|
|
552
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
553
|
-
}
|
|
554
|
-
});
|
|
555
|
-
server.tool(runVideoFunctionTool.name, runVideoFunctionTool.description, runVideoFunctionTool.inputSchema.shape, getToolAnnotations(runVideoFunctionTool.name), async (input) => {
|
|
556
|
-
try {
|
|
557
|
-
const text = await runVideoFunctionTool.execute(client, input);
|
|
558
|
-
return { content: [{ type: 'text', text }] };
|
|
559
|
-
}
|
|
560
|
-
catch (err) {
|
|
561
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
562
|
-
}
|
|
563
|
-
});
|
|
564
|
-
server.tool(generateVideoTool.name, generateVideoTool.description, generateVideoTool.inputSchema.shape, getToolAnnotations(generateVideoTool.name), async (input) => {
|
|
565
|
-
try {
|
|
566
|
-
const text = await generateVideoTool.execute(client, input);
|
|
567
|
-
return { content: [{ type: 'text', text }] };
|
|
568
|
-
}
|
|
569
|
-
catch (err) {
|
|
570
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
571
|
-
}
|
|
572
|
-
});
|
|
573
|
-
server.tool(getVideoJobTool.name, getVideoJobTool.description, getVideoJobTool.inputSchema.shape, getToolAnnotations(getVideoJobTool.name), async (input) => {
|
|
574
|
-
try {
|
|
575
|
-
const text = await getVideoJobTool.execute(client, input);
|
|
576
|
-
return { content: [{ type: 'text', text }] };
|
|
577
|
-
}
|
|
578
|
-
catch (err) {
|
|
579
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
580
|
-
}
|
|
581
|
-
});
|
|
582
|
-
server.tool(generateCaptionsTool.name, generateCaptionsTool.description, generateCaptionsTool.inputSchema.shape, getToolAnnotations(generateCaptionsTool.name), async (input) => {
|
|
583
|
-
try {
|
|
584
|
-
const text = await generateCaptionsTool.execute(client, input);
|
|
585
|
-
return { content: [{ type: 'text', text }] };
|
|
586
|
-
}
|
|
587
|
-
catch (err) {
|
|
588
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
server.tool(generateImageTool.name, generateImageTool.description, generateImageTool.inputSchema.shape, getToolAnnotations(generateImageTool.name), async (input) => {
|
|
592
|
-
try {
|
|
593
|
-
const text = await generateImageTool.execute(client, input);
|
|
594
|
-
return { content: [{ type: 'text', text }] };
|
|
595
|
-
}
|
|
596
|
-
catch (err) {
|
|
597
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
server.tool(getImageJobTool.name, getImageJobTool.description, getImageJobTool.inputSchema.shape, getToolAnnotations(getImageJobTool.name), async (input) => {
|
|
601
|
-
try {
|
|
602
|
-
const text = await getImageJobTool.execute(client, input);
|
|
603
|
-
return { content: [{ type: 'text', text }] };
|
|
604
|
-
}
|
|
605
|
-
catch (err) {
|
|
606
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
607
|
-
}
|
|
608
|
-
});
|
|
609
|
-
server.tool(getPostTool.name, getPostTool.description, getPostTool.inputSchema.shape, getToolAnnotations(getPostTool.name), async (input) => {
|
|
610
|
-
try {
|
|
611
|
-
const text = await getPostTool.execute(client, input);
|
|
612
|
-
return { content: [{ type: 'text', text }] };
|
|
613
|
-
}
|
|
614
|
-
catch (err) {
|
|
615
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
616
|
-
}
|
|
617
|
-
});
|
|
618
|
-
server.tool(getPostMissingTool.name, getPostMissingTool.description, getPostMissingTool.inputSchema.shape, getToolAnnotations(getPostMissingTool.name), async (input) => {
|
|
619
|
-
try {
|
|
620
|
-
const text = await getPostMissingTool.execute(client, input);
|
|
621
|
-
return { content: [{ type: 'text', text }] };
|
|
622
|
-
}
|
|
623
|
-
catch (err) {
|
|
624
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
625
|
-
}
|
|
626
|
-
});
|
|
627
|
-
server.tool(askSupportTool.name, askSupportTool.description, askSupportTool.inputSchema.shape, getToolAnnotations(askSupportTool.name), async (input) => {
|
|
628
|
-
try {
|
|
629
|
-
const text = await askSupportTool.execute(client, input);
|
|
630
|
-
return { content: [{ type: 'text', text }] };
|
|
631
|
-
}
|
|
632
|
-
catch (err) {
|
|
633
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
634
|
-
}
|
|
635
|
-
});
|
|
636
|
-
server.tool(updatePostTool.name, updatePostTool.description, updatePostTool.inputSchema.shape, getToolAnnotations(updatePostTool.name), async (input) => {
|
|
637
|
-
try {
|
|
638
|
-
const text = await updatePostTool.execute(client, input);
|
|
639
|
-
return { content: [{ type: 'text', text }] };
|
|
640
|
-
}
|
|
641
|
-
catch (err) {
|
|
642
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
643
|
-
}
|
|
644
|
-
});
|
|
645
|
-
server.tool(updatePostStatusTool.name, updatePostStatusTool.description, updatePostStatusTool.inputSchema.shape, getToolAnnotations(updatePostStatusTool.name), async (input) => {
|
|
646
|
-
try {
|
|
647
|
-
const text = await updatePostStatusTool.execute(client, input);
|
|
648
|
-
return { content: [{ type: 'text', text }] };
|
|
649
|
-
}
|
|
650
|
-
catch (err) {
|
|
651
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
652
|
-
}
|
|
653
|
-
});
|
|
654
|
-
server.tool(updatePostReleaseIdTool.name, updatePostReleaseIdTool.description, updatePostReleaseIdTool.inputSchema.shape, getToolAnnotations(updatePostReleaseIdTool.name), async (input) => {
|
|
655
|
-
try {
|
|
656
|
-
const text = await updatePostReleaseIdTool.execute(client, input);
|
|
657
|
-
return { content: [{ type: 'text', text }] };
|
|
658
|
-
}
|
|
659
|
-
catch (err) {
|
|
660
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
661
|
-
}
|
|
662
|
-
});
|
|
663
|
-
server.tool(deletePostTool.name, deletePostTool.description, deletePostTool.inputSchema.shape, getToolAnnotations(deletePostTool.name), async (input) => {
|
|
664
|
-
try {
|
|
665
|
-
const text = await deletePostTool.execute(client, input);
|
|
666
|
-
return { content: [{ type: 'text', text }] };
|
|
667
|
-
}
|
|
668
|
-
catch (err) {
|
|
669
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
server.tool(deletePostGroupTool.name, deletePostGroupTool.description, deletePostGroupTool.inputSchema.shape, getToolAnnotations(deletePostGroupTool.name), async (input) => {
|
|
673
|
-
try {
|
|
674
|
-
const text = await deletePostGroupTool.execute(client, input);
|
|
675
|
-
return { content: [{ type: 'text', text }] };
|
|
676
|
-
}
|
|
677
|
-
catch (err) {
|
|
678
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
679
|
-
}
|
|
680
|
-
});
|
|
681
|
-
server.tool(getAccountAnalyticsTool.name, getAccountAnalyticsTool.description, getAccountAnalyticsTool.inputSchema.shape, getToolAnnotations(getAccountAnalyticsTool.name), async (input) => {
|
|
682
|
-
try {
|
|
683
|
-
const text = await getAccountAnalyticsTool.execute(client, input);
|
|
684
|
-
return { content: [{ type: 'text', text }] };
|
|
685
|
-
}
|
|
686
|
-
catch (err) {
|
|
687
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
688
|
-
}
|
|
689
|
-
});
|
|
690
|
-
server.tool(getPostAnalyticsTool.name, getPostAnalyticsTool.description, getPostAnalyticsTool.inputSchema.shape, getToolAnnotations(getPostAnalyticsTool.name), async (input) => {
|
|
691
|
-
try {
|
|
692
|
-
const text = await getPostAnalyticsTool.execute(client, input);
|
|
693
|
-
return { content: [{ type: 'text', text }] };
|
|
694
|
-
}
|
|
695
|
-
catch (err) {
|
|
696
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
697
|
-
}
|
|
698
|
-
});
|
|
699
|
-
server.tool(listGoogleBusinessReviewsTool.name, listGoogleBusinessReviewsTool.description, listGoogleBusinessReviewsTool.inputSchema.shape, getToolAnnotations(listGoogleBusinessReviewsTool.name), async (input) => {
|
|
700
|
-
try {
|
|
701
|
-
const text = await listGoogleBusinessReviewsTool.execute(client, input);
|
|
702
|
-
return { content: [{ type: 'text', text }] };
|
|
703
|
-
}
|
|
704
|
-
catch (err) {
|
|
705
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
706
|
-
}
|
|
707
|
-
});
|
|
708
|
-
server.tool(getGoogleBusinessReviewLinkTool.name, getGoogleBusinessReviewLinkTool.description, getGoogleBusinessReviewLinkTool.inputSchema.shape, getToolAnnotations(getGoogleBusinessReviewLinkTool.name), async (input) => {
|
|
709
|
-
try {
|
|
710
|
-
const text = await getGoogleBusinessReviewLinkTool.execute(client, input);
|
|
711
|
-
return { content: [{ type: 'text', text }] };
|
|
712
|
-
}
|
|
713
|
-
catch (err) {
|
|
714
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
715
|
-
}
|
|
716
|
-
});
|
|
717
|
-
server.tool(auditGoogleBusinessProfileTool.name, auditGoogleBusinessProfileTool.description, auditGoogleBusinessProfileTool.inputSchema.shape, getToolAnnotations(auditGoogleBusinessProfileTool.name), async (input) => {
|
|
718
|
-
try {
|
|
719
|
-
const text = await auditGoogleBusinessProfileTool.execute(client, input);
|
|
720
|
-
return { content: [{ type: 'text', text }] };
|
|
721
|
-
}
|
|
722
|
-
catch (err) {
|
|
723
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
724
|
-
}
|
|
725
|
-
});
|
|
726
|
-
server.tool(suggestGoogleBusinessReviewReplyTool.name, suggestGoogleBusinessReviewReplyTool.description, suggestGoogleBusinessReviewReplyTool.inputSchema.shape, getToolAnnotations(suggestGoogleBusinessReviewReplyTool.name), async (input) => {
|
|
727
|
-
try {
|
|
728
|
-
const text = await suggestGoogleBusinessReviewReplyTool.execute(client, input);
|
|
729
|
-
return { content: [{ type: 'text', text }] };
|
|
730
|
-
}
|
|
731
|
-
catch (err) {
|
|
732
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
733
|
-
}
|
|
734
|
-
});
|
|
735
|
-
server.tool(replyGoogleBusinessReviewTool.name, replyGoogleBusinessReviewTool.description, replyGoogleBusinessReviewTool.inputSchema.shape, getToolAnnotations(replyGoogleBusinessReviewTool.name), async (input) => {
|
|
736
|
-
try {
|
|
737
|
-
const text = await replyGoogleBusinessReviewTool.execute(client, input);
|
|
738
|
-
return { content: [{ type: 'text', text }] };
|
|
739
|
-
}
|
|
740
|
-
catch (err) {
|
|
741
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
742
|
-
}
|
|
743
|
-
});
|
|
744
|
-
server.tool(deleteGoogleBusinessReviewReplyTool.name, deleteGoogleBusinessReviewReplyTool.description, deleteGoogleBusinessReviewReplyTool.inputSchema.shape, getToolAnnotations(deleteGoogleBusinessReviewReplyTool.name), async (input) => {
|
|
745
|
-
try {
|
|
746
|
-
const text = await deleteGoogleBusinessReviewReplyTool.execute(client, input);
|
|
747
|
-
return { content: [{ type: 'text', text }] };
|
|
748
|
-
}
|
|
749
|
-
catch (err) {
|
|
750
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
751
|
-
}
|
|
752
|
-
});
|
|
753
|
-
server.tool(listGoogleBusinessMediaTool.name, listGoogleBusinessMediaTool.description, listGoogleBusinessMediaTool.inputSchema.shape, getToolAnnotations(listGoogleBusinessMediaTool.name), async (input) => {
|
|
754
|
-
try {
|
|
755
|
-
const text = await listGoogleBusinessMediaTool.execute(client, input);
|
|
756
|
-
return { content: [{ type: 'text', text }] };
|
|
757
|
-
}
|
|
758
|
-
catch (err) {
|
|
759
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
760
|
-
}
|
|
761
|
-
});
|
|
762
|
-
server.tool(addGoogleBusinessMediaTool.name, addGoogleBusinessMediaTool.description, addGoogleBusinessMediaTool.inputSchema.shape, getToolAnnotations(addGoogleBusinessMediaTool.name), async (input) => {
|
|
763
|
-
try {
|
|
764
|
-
const text = await addGoogleBusinessMediaTool.execute(client, input);
|
|
765
|
-
return { content: [{ type: 'text', text }] };
|
|
766
|
-
}
|
|
767
|
-
catch (err) {
|
|
768
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
769
|
-
}
|
|
770
|
-
});
|
|
771
|
-
server.tool(deleteGoogleBusinessMediaTool.name, deleteGoogleBusinessMediaTool.description, deleteGoogleBusinessMediaTool.inputSchema.shape, getToolAnnotations(deleteGoogleBusinessMediaTool.name), async (input) => {
|
|
772
|
-
try {
|
|
773
|
-
const text = await deleteGoogleBusinessMediaTool.execute(client, input);
|
|
774
|
-
return { content: [{ type: 'text', text }] };
|
|
775
|
-
}
|
|
776
|
-
catch (err) {
|
|
777
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
778
|
-
}
|
|
779
|
-
});
|
|
780
|
-
server.tool(listConversationsTool.name, listConversationsTool.description, listConversationsTool.inputSchema.shape, getToolAnnotations(listConversationsTool.name), async (input) => {
|
|
781
|
-
try {
|
|
782
|
-
const text = await listConversationsTool.execute(client, input);
|
|
783
|
-
return { content: [{ type: 'text', text }] };
|
|
784
|
-
}
|
|
785
|
-
catch (err) {
|
|
786
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
server.tool(getConversationTool.name, getConversationTool.description, getConversationTool.inputSchema.shape, getToolAnnotations(getConversationTool.name), async (input) => {
|
|
790
|
-
try {
|
|
791
|
-
const text = await getConversationTool.execute(client, input);
|
|
792
|
-
return { content: [{ type: 'text', text }] };
|
|
793
|
-
}
|
|
794
|
-
catch (err) {
|
|
795
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
796
|
-
}
|
|
797
|
-
});
|
|
798
|
-
server.tool(sendMessageTool.name, sendMessageTool.description, sendMessageTool.inputSchema.shape, getToolAnnotations(sendMessageTool.name), async (input) => {
|
|
799
|
-
try {
|
|
800
|
-
const text = await sendMessageTool.execute(client, input);
|
|
801
|
-
return { content: [{ type: 'text', text }] };
|
|
802
|
-
}
|
|
803
|
-
catch (err) {
|
|
804
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
805
|
-
}
|
|
806
|
-
});
|
|
807
|
-
server.tool(listCommentsTool.name, listCommentsTool.description, listCommentsTool.inputSchema.shape, getToolAnnotations(listCommentsTool.name), async (input) => {
|
|
808
|
-
try {
|
|
809
|
-
const text = await listCommentsTool.execute(client, input);
|
|
810
|
-
return { content: [{ type: 'text', text }] };
|
|
811
|
-
}
|
|
812
|
-
catch (err) {
|
|
813
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
814
|
-
}
|
|
815
|
-
});
|
|
816
|
-
server.tool(getCommentTool.name, getCommentTool.description, getCommentTool.inputSchema.shape, getToolAnnotations(getCommentTool.name), async (input) => {
|
|
817
|
-
try {
|
|
818
|
-
const text = await getCommentTool.execute(client, input);
|
|
819
|
-
return { content: [{ type: 'text', text }] };
|
|
820
|
-
}
|
|
821
|
-
catch (err) {
|
|
822
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
823
|
-
}
|
|
824
|
-
});
|
|
825
|
-
server.tool(replyToCommentTool.name, replyToCommentTool.description, replyToCommentTool.inputSchema.shape, getToolAnnotations(replyToCommentTool.name), async (input) => {
|
|
826
|
-
try {
|
|
827
|
-
const text = await replyToCommentTool.execute(client, input);
|
|
828
|
-
return { content: [{ type: 'text', text }] };
|
|
829
|
-
}
|
|
830
|
-
catch (err) {
|
|
831
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
832
|
-
}
|
|
833
|
-
});
|
|
834
|
-
server.tool(updateCommentTool.name, updateCommentTool.description, updateCommentTool.inputSchema.shape, getToolAnnotations(updateCommentTool.name), async (input) => {
|
|
835
|
-
try {
|
|
836
|
-
const text = await updateCommentTool.execute(client, input);
|
|
837
|
-
return { content: [{ type: 'text', text }] };
|
|
838
|
-
}
|
|
839
|
-
catch (err) {
|
|
840
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
841
|
-
}
|
|
842
|
-
});
|
|
843
|
-
server.tool(deleteCommentTool.name, deleteCommentTool.description, deleteCommentTool.inputSchema.shape, getToolAnnotations(deleteCommentTool.name), async (input) => {
|
|
844
|
-
try {
|
|
845
|
-
const text = await deleteCommentTool.execute(client, input);
|
|
846
|
-
return { content: [{ type: 'text', text }] };
|
|
847
|
-
}
|
|
848
|
-
catch (err) {
|
|
849
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
850
|
-
}
|
|
851
|
-
});
|
|
852
|
-
server.tool(syncInboxTool.name, syncInboxTool.description, syncInboxTool.inputSchema.shape, getToolAnnotations(syncInboxTool.name), async (input) => {
|
|
853
|
-
try {
|
|
854
|
-
const text = await syncInboxTool.execute(client, input);
|
|
855
|
-
return { content: [{ type: 'text', text }] };
|
|
856
|
-
}
|
|
857
|
-
catch (err) {
|
|
858
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
859
|
-
}
|
|
860
|
-
});
|
|
861
|
-
server.tool(listActivityTool.name, listActivityTool.description, listActivityTool.inputSchema.shape, getToolAnnotations(listActivityTool.name), async (input) => {
|
|
862
|
-
try {
|
|
863
|
-
const text = await listActivityTool.execute(client, input);
|
|
864
|
-
return { content: [{ type: 'text', text }] };
|
|
865
|
-
}
|
|
866
|
-
catch (err) {
|
|
867
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
868
|
-
}
|
|
869
|
-
});
|
|
870
|
-
server.tool(getUpdatesTool.name, getUpdatesTool.description, getUpdatesTool.inputSchema.shape, getToolAnnotations(getUpdatesTool.name), async (input) => {
|
|
871
|
-
try {
|
|
872
|
-
const text = await getUpdatesTool.execute(client, input);
|
|
873
|
-
return { content: [{ type: 'text', text }] };
|
|
874
|
-
}
|
|
875
|
-
catch (err) {
|
|
876
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
877
|
-
}
|
|
878
|
-
});
|
|
879
|
-
server.tool(listWebhooksTool.name, listWebhooksTool.description, listWebhooksTool.inputSchema.shape, getToolAnnotations(listWebhooksTool.name), async (input) => {
|
|
880
|
-
try {
|
|
881
|
-
const text = await listWebhooksTool.execute(client, input);
|
|
882
|
-
return { content: [{ type: 'text', text }] };
|
|
883
|
-
}
|
|
884
|
-
catch (err) {
|
|
885
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
886
|
-
}
|
|
887
|
-
});
|
|
888
|
-
server.tool(createWebhookTool.name, createWebhookTool.description, createWebhookTool.inputSchema.shape, getToolAnnotations(createWebhookTool.name), async (input) => {
|
|
889
|
-
try {
|
|
890
|
-
const text = await createWebhookTool.execute(client, input);
|
|
891
|
-
return { content: [{ type: 'text', text }] };
|
|
892
|
-
}
|
|
893
|
-
catch (err) {
|
|
894
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
895
|
-
}
|
|
896
|
-
});
|
|
897
|
-
server.tool(updateWebhookTool.name, updateWebhookTool.description, updateWebhookTool.inputSchema.shape, getToolAnnotations(updateWebhookTool.name), async (input) => {
|
|
898
|
-
try {
|
|
899
|
-
const text = await updateWebhookTool.execute(client, input);
|
|
900
|
-
return { content: [{ type: 'text', text }] };
|
|
901
|
-
}
|
|
902
|
-
catch (err) {
|
|
903
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
904
|
-
}
|
|
905
|
-
});
|
|
906
|
-
server.tool(deleteWebhookTool.name, deleteWebhookTool.description, deleteWebhookTool.inputSchema.shape, getToolAnnotations(deleteWebhookTool.name), async (input) => {
|
|
907
|
-
try {
|
|
908
|
-
const text = await deleteWebhookTool.execute(client, input);
|
|
909
|
-
return { content: [{ type: 'text', text }] };
|
|
910
|
-
}
|
|
911
|
-
catch (err) {
|
|
912
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
913
|
-
}
|
|
914
|
-
});
|
|
915
|
-
server.tool(testWebhookTool.name, testWebhookTool.description, testWebhookTool.inputSchema.shape, getToolAnnotations(testWebhookTool.name), async (input) => {
|
|
916
|
-
try {
|
|
917
|
-
const text = await testWebhookTool.execute(client, input);
|
|
918
|
-
return { content: [{ type: 'text', text }] };
|
|
919
|
-
}
|
|
920
|
-
catch (err) {
|
|
921
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
922
|
-
}
|
|
923
|
-
});
|
|
924
|
-
server.tool(getXPostingQuotaTool.name, getXPostingQuotaTool.description, getXPostingQuotaTool.inputSchema.shape, getToolAnnotations(getXPostingQuotaTool.name), async (input) => {
|
|
925
|
-
try {
|
|
926
|
-
const text = await getXPostingQuotaTool.execute(client, input);
|
|
927
|
-
return { content: [{ type: 'text', text }] };
|
|
928
|
-
}
|
|
929
|
-
catch (err) {
|
|
930
|
-
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
171
|
+
// The SDK only learns the connected client's identity (e.g. "claude-ai",
|
|
172
|
+
// "chatgpt") once the initialize handshake completes, so this is a resolver
|
|
173
|
+
// read fresh on every request rather than a value captured once here.
|
|
174
|
+
setMcpClientNameResolver(() => server.server.getClientVersion()?.name);
|
|
175
|
+
// Old tools' exact input schemas, keyed by alias name, from the merged tool
|
|
176
|
+
// modules that replaced them.
|
|
177
|
+
const LEGACY_SCHEMAS = new Map();
|
|
178
|
+
for (const tool of STDIO_TOOLS) {
|
|
179
|
+
for (const [alias, schema] of Object.entries(tool.legacySchemas ?? {}))
|
|
180
|
+
LEGACY_SCHEMAS.set(alias, schema);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Validates an alias call against the old tool's own schema, so a call the
|
|
184
|
+
* old tool rejected gets the same SDK error text it always got (same wording
|
|
185
|
+
* the SDK builds for any tool), and a valid call keeps the old defaults.
|
|
186
|
+
*/
|
|
187
|
+
const legacyValidator = (aliasName, args) => {
|
|
188
|
+
const schema = LEGACY_SCHEMAS.get(aliasName);
|
|
189
|
+
if (!schema)
|
|
190
|
+
return null;
|
|
191
|
+
const parsed = schema.safeParse(args ?? {});
|
|
192
|
+
if (parsed.success)
|
|
193
|
+
return { ok: true, args: parsed.data };
|
|
194
|
+
const message = new McpError(ErrorCode.InvalidParams, `Input validation error: Invalid arguments for tool ${aliasName}: ${parsed.error.message}`).message;
|
|
195
|
+
return { ok: false, message };
|
|
196
|
+
};
|
|
197
|
+
// Renamed tools (aliases) are never registered with McpServer: the transport
|
|
198
|
+
// rewrites an alias call onto its target before the SDK sees it, and handlers
|
|
199
|
+
// read the called name back through getCallInfo(extra.requestId).
|
|
200
|
+
const transport = new AliasTransport(new StdioServerTransport(), registry, toolsets.all ? null : visibleTools(registry, toolsets.enabled, 'stdio'), legacyValidator);
|
|
201
|
+
// Preview then confirm tokens: a random key and an in-memory one-time-use
|
|
202
|
+
// set per process (UX protection only; REST authorization is unchanged).
|
|
203
|
+
const previews = new StdioPreviewTokens();
|
|
204
|
+
function registerAll(tools) {
|
|
205
|
+
for (const tool of tools) {
|
|
206
|
+
server.tool(tool.name, tool.description, tool.inputSchema.shape, getToolAnnotations(tool.name), async (input, extra) => {
|
|
207
|
+
// The CALLED name (an alias, or the tool itself) is what telemetry
|
|
208
|
+
// records as X-Posterly-Tool. The per-call context lives only here:
|
|
209
|
+
// never in the arguments, never on shared state.
|
|
210
|
+
const callInfo = transport.getCallInfo(extra.requestId);
|
|
211
|
+
const calledName = callInfo?.calledName ?? tool.name;
|
|
212
|
+
const ctx = {
|
|
213
|
+
calledName,
|
|
214
|
+
legacyConfirm: callInfo?.legacyConfirm === true,
|
|
215
|
+
registry,
|
|
216
|
+
previews,
|
|
217
|
+
toolsets: { enabled: toolsets.enabled, all: toolsets.all },
|
|
218
|
+
};
|
|
219
|
+
try {
|
|
220
|
+
const text = await client.runToolCall(calledName, () => tool.execute(client, input, ctx));
|
|
221
|
+
return { content: [{ type: 'text', text }] };
|
|
222
|
+
}
|
|
223
|
+
catch (err) {
|
|
224
|
+
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
225
|
+
}
|
|
226
|
+
});
|
|
931
227
|
}
|
|
932
|
-
}
|
|
228
|
+
}
|
|
229
|
+
registerAll(STDIO_TOOLS);
|
|
933
230
|
// Start the server
|
|
934
231
|
async function main() {
|
|
935
|
-
const transport = new StdioServerTransport();
|
|
936
232
|
await server.connect(transport);
|
|
937
233
|
}
|
|
938
234
|
main().catch((err) => {
|