mcp-scraper 0.10.0 → 0.11.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 +4 -4
- package/dist/bin/api-server.cjs +87 -9
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +1 -1
- package/dist/bin/mcp-scraper-cli.cjs +1 -1
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-install.cjs +2 -2
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +2 -2
- package/dist/bin/mcp-stdio-server.cjs +52 -6
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +3 -3
- package/dist/{chunk-5HNHYUJ5.js → chunk-D3AJWXA2.js} +2 -2
- package/dist/{chunk-5HNHYUJ5.js.map → chunk-D3AJWXA2.js.map} +1 -1
- package/dist/chunk-P2WZLJKQ.js +7 -0
- package/dist/chunk-P2WZLJKQ.js.map +1 -0
- package/dist/{chunk-IRYBBEZJ.js → chunk-QJBWER2Q.js} +52 -6
- package/dist/chunk-QJBWER2Q.js.map +1 -0
- package/dist/{server-KTA7CFX6.js → server-LRWHUBUN.js} +38 -6
- package/dist/server-LRWHUBUN.js.map +1 -0
- package/docs/mcp-tool-manifest.generated.json +11339 -1479
- package/package.json +1 -1
- package/dist/chunk-B7BAJU7K.js +0 -7
- package/dist/chunk-B7BAJU7K.js.map +0 -1
- package/dist/chunk-IRYBBEZJ.js.map +0 -1
- package/dist/server-KTA7CFX6.js.map +0 -1
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ Build the branded one-click bundle:
|
|
|
88
88
|
npm run build:mcpb
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.
|
|
91
|
+
The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.11.0`, SHA-256 `ed9f00c3f5ea47cc79b5e6e0205c2f85fecb9aa0eed5dcd55fee9e4e309ecfac`). Install it by opening or dragging it into Claude Desktop. Claude displays the `MCP Scraper` install card, icon, and API-key configuration field from the bundle manifest.
|
|
92
92
|
|
|
93
93
|
The MCPB install exposes every tool — web-intelligence plus all `browser_*` tools — through the one `mcp-scraper` server.
|
|
94
94
|
|
|
@@ -171,7 +171,7 @@ env = { MCP_SCRAPER_API_KEY = "sk_live_your_key" }
|
|
|
171
171
|
- `workflow_run` — run hosted workflows such as `agent-packet`, `local-competitive-audit`, `map-comparison`, `serp-comparison`, `paa-expansion-brief`, and `ai-overview-language`; returns run metadata, summary, and artifact IDs.
|
|
172
172
|
- `workflow_status` — reopen a workflow run and list its current status and artifacts.
|
|
173
173
|
- `workflow_artifact_read` — pull generated workflow artifacts such as `evidence.json`, CSVs, Markdown briefs, and reports back into MCP context.
|
|
174
|
-
- `
|
|
174
|
+
- `rank_tracker_workflow` — generate a database schema, cron/heartbeat plan, ingestion workflow, metrics list, and implementation prompt for building rank trackers. It has modes for Maps rankings via `directory_workflow`/`maps_search`, organic rankings via `search_serp`, AI Overview citation tracking, and PAA source presence tracking. This planning tool does not spend credits.
|
|
175
175
|
- `credits_info`
|
|
176
176
|
|
|
177
177
|
### Browser-agent tools
|
|
@@ -207,7 +207,7 @@ The `mcp-scraper` server (and the MCPB bundle, which runs it) exposes both secti
|
|
|
207
207
|
|
|
208
208
|
All MCP tools expose output schemas and return `structuredContent` with the IDs, URLs, CSV paths, transcripts, browser session handles, replay paths, artifacts, recipe fields, or blueprint fields needed by the next step. Browser Agent tools keep a JSON text block for older clients, but structured data is the primary contract. All tools carry MCP annotations; file-writing tools such as replay downloads and annotations state their filesystem side effects.
|
|
209
209
|
|
|
210
|
-
The canonical tool inventory is generated at `docs/mcp-tool-manifest.generated.json`.
|
|
210
|
+
The canonical tool inventory is generated at `docs/mcp-tool-manifest.generated.json`. Both the `mcp-scraper` stdio server and the hosted endpoint at `https://mcpscraper.dev/mcp` expose the same 153 tools: 68 scraper, browser, workflow, billing, and connected-service tools plus 85 durable-memory tools. Release verification compares the exact local and remote tool-name sets, not only the count.
|
|
211
211
|
|
|
212
212
|
## Resources
|
|
213
213
|
|
|
@@ -244,7 +244,7 @@ npm update -g mcp-scraper
|
|
|
244
244
|
npm install mcp-scraper@latest
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
Users who do not update can keep using the tools their installed package already advertises, but they will not see newly added stdio tools, schemas, or AI-facing descriptions. For example, a client running an older package cannot call `
|
|
247
|
+
Users who do not update can keep using the tools their installed package already advertises, but they will not see newly added stdio tools, schemas, or AI-facing descriptions. For example, a client running an older package cannot call `rank_tracker_workflow`, `directory_workflow`, connected-service actions, or browser tools through stdio even if the hosted API already supports adjacent endpoints.
|
|
248
248
|
|
|
249
249
|
## Branded One-Click Installs
|
|
250
250
|
|
package/dist/bin/api-server.cjs
CHANGED
|
@@ -27452,7 +27452,7 @@ var PACKAGE_VERSION;
|
|
|
27452
27452
|
var init_version = __esm({
|
|
27453
27453
|
"src/version.ts"() {
|
|
27454
27454
|
"use strict";
|
|
27455
|
-
PACKAGE_VERSION = "0.
|
|
27455
|
+
PACKAGE_VERSION = "0.11.0";
|
|
27456
27456
|
}
|
|
27457
27457
|
});
|
|
27458
27458
|
|
|
@@ -27625,7 +27625,7 @@ var init_output_schema_registry = __esm({
|
|
|
27625
27625
|
});
|
|
27626
27626
|
|
|
27627
27627
|
// src/mcp/mcp-tool-schemas.ts
|
|
27628
|
-
var import_zod33, HarvestPaaInputSchema, ExtractUrlInputSchema, DiffPageInputSchema, MapSiteUrlsInputSchema, ExtractSiteInputSchema, AuditSiteInputSchema, YoutubeHarvestInputSchema, YoutubeTranscribeInputSchema, FacebookPageIntelInputSchema, FacebookAdSearchInputSchema, RedditThreadInputSchema, VideoFrameAnalysisInputSchema, VideoFrameAnalysisStatusInputSchema, FacebookAdTranscribeInputSchema, FacebookVideoTranscribeInputSchema, GoogleAdsSearchInputSchema, GoogleAdsPageIntelInputSchema, GoogleAdsTranscribeInputSchema, InstagramProfileContentInputSchema, InstagramMediaDownloadInputSchema, MapsPlaceIntelInputSchema, TrustpilotReviewsInputSchema, G2ReviewsInputSchema, ReviewCardSchema, MapsSearchInputSchema, DirectoryWorkflowInputSchema, ArtifactPointerOutputSchema, RankTrackerModeSchema, RankTrackerBlueprintInputSchema, NullableString, MapsSearchAttemptOutput, MapsSearchOutputSchema, DirectoryMapsBusinessOutput, DirectoryWorkflowOutputSchema, RankTrackerToolPlanOutput, RankTrackerTableOutput, RankTrackerCronJobOutput, RankTrackerBlueprintOutputSchema, OrganicResultOutput, AiOverviewOutput, EntityIdsOutput, HarvestPaaOutputSchema, SearchSerpOutputSchema, ExtractUrlOutputSchema, DiffPageOutputSchema, ExtractSiteOutputSchema, AuditSiteOutputSchema, MapsPlaceIntelOutputSchema, TrustpilotReviewsOutputSchema, G2ReviewsOutputSchema, CreditsInfoOutputSchema, MapSiteUrlsOutputSchema, YoutubeHarvestOutputSchema, FacebookAdSearchOutputSchema, VideoFrameAnalysisOutputSchema, VideoFrameAnalysisStatusOutputSchema, RedditThreadOutputSchema, FacebookPageIntelOutputSchema, GoogleAdsSearchOutputSchema, GoogleAdsPageIntelOutputSchema, FacebookVideoTranscribeOutputSchema, TranscriptChunkOutput, InstagramBrowserOutput, InstagramPaginationOutput, InstagramProfileContentOutputSchema, InstagramMediaTrackOutput, InstagramDownloadOutput, InstagramMediaDownloadOutputSchema, YoutubeTranscribeOutputSchema, FacebookAdTranscribeOutputSchema, GoogleAdsTranscribeOutputSchema, CaptureSerpSnapshotOutputSchema, CaptureSerpPageSnapshotsOutputSchema, CreditsInfoInputSchema, WorkflowIdSchema2, WorkflowListInputSchema, WorkflowSuggestInputSchema, WorkflowRunInputSchema, WorkflowStepInputSchema, WorkflowStatusInputSchema, WorkflowArtifactReadInputSchema, WorkflowRecipeOutput, WorkflowDefinitionOutput, WorkflowArtifactOutput, WorkflowListOutputSchema, WorkflowSuggestOutputSchema, WorkflowRunOutputSchema, WorkflowStepOutputSchema, WorkflowStatusOutputSchema, WorkflowArtifactReadOutputSchema, SearchSerpInputSchema, CaptureSerpSnapshotInputSchema, ScreenshotInputSchema, CaptureSerpPageSnapshotsInputSchema, ReportArtifactReadInputSchema, ReportArtifactReadOutputSchema, ListServiceConnectionsInputSchema, ListServiceConnectionsOutputSchema, ReadServiceConnectionInputSchema, ReadServiceConnectionOutputSchema, SlackSendMessageInputSchema, SlackSendMessageOutputSchema, GmailSendMessageInputSchema, GmailSendMessageOutputSchema, GoogleCalendarCreateEventInputSchema, GoogleCalendarCreateEventOutputSchema, ZoomCreateMeetingInputSchema, ZoomCreateMeetingOutputSchema;
|
|
27628
|
+
var import_zod33, HarvestPaaInputSchema, ExtractUrlInputSchema, DiffPageInputSchema, MapSiteUrlsInputSchema, ExtractSiteInputSchema, AuditSiteInputSchema, YoutubeHarvestInputSchema, YoutubeTranscribeInputSchema, FacebookPageIntelInputSchema, FacebookAdSearchInputSchema, RedditThreadInputSchema, VideoFrameAnalysisInputSchema, VideoFrameAnalysisStatusInputSchema, FacebookAdTranscribeInputSchema, FacebookVideoTranscribeInputSchema, GoogleAdsSearchInputSchema, GoogleAdsPageIntelInputSchema, GoogleAdsTranscribeInputSchema, InstagramProfileContentInputSchema, InstagramMediaDownloadInputSchema, MapsPlaceIntelInputSchema, TrustpilotReviewsInputSchema, G2ReviewsInputSchema, ReviewCardSchema, MapsSearchInputSchema, DirectoryWorkflowInputSchema, ArtifactPointerOutputSchema, RankTrackerModeSchema, RankTrackerBlueprintInputSchema, NullableString, MapsSearchAttemptOutput, MapsSearchOutputSchema, DirectoryMapsBusinessOutput, DirectoryWorkflowOutputSchema, RankTrackerToolPlanOutput, RankTrackerTableOutput, RankTrackerCronJobOutput, RankTrackerBlueprintOutputSchema, OrganicResultOutput, AiOverviewOutput, EntityIdsOutput, HarvestPaaOutputSchema, SearchSerpOutputSchema, ExtractUrlOutputSchema, DiffPageOutputSchema, ExtractSiteOutputSchema, AuditSiteOutputSchema, MapsPlaceIntelOutputSchema, TrustpilotReviewsOutputSchema, G2ReviewsOutputSchema, CreditsInfoOutputSchema, MapSiteUrlsOutputSchema, YoutubeHarvestOutputSchema, FacebookAdSearchOutputSchema, VideoFrameAnalysisOutputSchema, VideoFrameAnalysisStatusOutputSchema, RedditThreadOutputSchema, FacebookPageIntelOutputSchema, GoogleAdsSearchOutputSchema, GoogleAdsPageIntelOutputSchema, FacebookVideoTranscribeOutputSchema, TranscriptChunkOutput, InstagramBrowserOutput, InstagramPaginationOutput, InstagramProfileContentOutputSchema, InstagramMediaTrackOutput, InstagramDownloadOutput, InstagramMediaDownloadOutputSchema, YoutubeTranscribeOutputSchema, FacebookAdTranscribeOutputSchema, GoogleAdsTranscribeOutputSchema, CaptureSerpSnapshotOutputSchema, CaptureSerpPageSnapshotsOutputSchema, CreditsInfoInputSchema, WorkflowIdSchema2, WorkflowListInputSchema, WorkflowSuggestInputSchema, WorkflowRunInputSchema, WorkflowStepInputSchema, WorkflowStatusInputSchema, WorkflowArtifactReadInputSchema, WorkflowRecipeOutput, WorkflowDefinitionOutput, WorkflowArtifactOutput, WorkflowListOutputSchema, WorkflowSuggestOutputSchema, WorkflowRunOutputSchema, WorkflowStepOutputSchema, WorkflowStatusOutputSchema, WorkflowArtifactReadOutputSchema, SearchSerpInputSchema, CaptureSerpSnapshotInputSchema, ScreenshotInputSchema, CaptureSerpPageSnapshotsInputSchema, ReportArtifactReadInputSchema, ReportArtifactReadOutputSchema, ListServiceConnectionsInputSchema, ListServiceConnectionsOutputSchema, ReadServiceConnectionInputSchema, ReadServiceConnectionOutputSchema, CallServiceConnectionActionInputSchema, CallServiceConnectionActionOutputSchema, SetScheduledActionConnectionsInputSchema, SetScheduledActionConnectionsOutputSchema, SlackSendMessageInputSchema, SlackSendMessageOutputSchema, GmailSendMessageInputSchema, GmailSendMessageOutputSchema, GoogleCalendarCreateEventInputSchema, GoogleCalendarCreateEventOutputSchema, ZoomCreateMeetingInputSchema, ZoomCreateMeetingOutputSchema;
|
|
27629
27629
|
var init_mcp_tool_schemas = __esm({
|
|
27630
27630
|
"src/mcp/mcp-tool-schemas.ts"() {
|
|
27631
27631
|
"use strict";
|
|
@@ -28659,6 +28659,7 @@ var init_mcp_tool_schemas = __esm({
|
|
|
28659
28659
|
status: import_zod33.z.string(),
|
|
28660
28660
|
actionsEnabled: import_zod33.z.boolean(),
|
|
28661
28661
|
readTools: import_zod33.z.array(import_zod33.z.string()).describe("Tool names this connection can be read with via read_service_connection."),
|
|
28662
|
+
actionTools: import_zod33.z.array(import_zod33.z.string()).describe("Explicitly allowlisted write or mutation tool names callable through call_service_connection_action after actions are enabled for this connection."),
|
|
28662
28663
|
vaultName: import_zod33.z.string().nullable().describe("Memory vault this connection's digest writes into, if it has run at least once. Search it with memory-search."),
|
|
28663
28664
|
tableName: import_zod33.z.string().nullable().describe("Table this connection's digest writes structured rows into, if it has run at least once. Query it with table-query.")
|
|
28664
28665
|
}))
|
|
@@ -28673,6 +28674,29 @@ var init_mcp_tool_schemas = __esm({
|
|
|
28673
28674
|
result: import_zod33.z.unknown().optional(),
|
|
28674
28675
|
error: NullableString
|
|
28675
28676
|
};
|
|
28677
|
+
CallServiceConnectionActionInputSchema = {
|
|
28678
|
+
connectionId: import_zod33.z.string().min(1).describe("A connectionId from list_service_connections with actionsEnabled true."),
|
|
28679
|
+
tool: import_zod33.z.string().min(1).describe("One exact tool name from that connection's actionTools. Arbitrary Nango action names are rejected server-side."),
|
|
28680
|
+
args: import_zod33.z.record(import_zod33.z.string(), import_zod33.z.unknown()).describe("Arguments required by the selected action. The provider action validates its own typed input before execution.")
|
|
28681
|
+
};
|
|
28682
|
+
CallServiceConnectionActionOutputSchema = {
|
|
28683
|
+
ok: import_zod33.z.boolean(),
|
|
28684
|
+
result: import_zod33.z.unknown().optional(),
|
|
28685
|
+
error: NullableString
|
|
28686
|
+
};
|
|
28687
|
+
SetScheduledActionConnectionsInputSchema = {
|
|
28688
|
+
scheduleActionId: import_zod33.z.string().min(1).describe("A scheduled action id returned by create-scheduled-action or list-scheduled-actions."),
|
|
28689
|
+
connections: import_zod33.z.array(import_zod33.z.object({
|
|
28690
|
+
connectionId: import_zod33.z.string().min(1).describe("A tenant-scoped connectionId from list_service_connections."),
|
|
28691
|
+
providerConfigKey: import_zod33.z.string().min(1).describe("The matching providerConfigKey returned with that connection."),
|
|
28692
|
+
allowedTools: import_zod33.z.array(import_zod33.z.string().min(1)).min(1).max(100).describe("Exact readTools and, only when live actions are enabled, actionTools this schedule may use.")
|
|
28693
|
+
}).strict()).max(20).describe("Exact connection and tool grants for this schedule. Pass an empty array to remove every external-service grant.")
|
|
28694
|
+
};
|
|
28695
|
+
SetScheduledActionConnectionsOutputSchema = {
|
|
28696
|
+
ok: import_zod33.z.boolean(),
|
|
28697
|
+
connections: import_zod33.z.array(import_zod33.z.unknown()).optional(),
|
|
28698
|
+
error: NullableString
|
|
28699
|
+
};
|
|
28676
28700
|
SlackSendMessageInputSchema = {
|
|
28677
28701
|
connectionId: import_zod33.z.string().min(1).describe("A Slack connectionId from list_service_connections, with actionsEnabled true."),
|
|
28678
28702
|
channel: import_zod33.z.string().min(1).describe(`Slack channel ID to send to, e.g. "C1234567890". Get this from the connection's own read tools, not guessed.`),
|
|
@@ -29403,7 +29427,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
|
|
|
29403
29427
|
}, async (input) => formatCreditsInfo(await executor.creditsInfo(input), input));
|
|
29404
29428
|
server.registerTool("list_service_connections", {
|
|
29405
29429
|
title: "List Connected Services",
|
|
29406
|
-
description: "List
|
|
29430
|
+
description: "List every third-party service connection this MCP Scraper account has authorized, including Google Analytics, YouTube, Facebook Pages, LinkedIn, X, Meta Marketing, Slack, Gmail, Calendar, Drive, Zoom, Xero, and others. Returns the tenant-scoped connectionId plus exact readTools and actionTools. Get a connectionId and exact tool name here before calling read_service_connection or call_service_connection_action. For already-digested history, prefer the returned vaultName or tableName.",
|
|
29407
29431
|
inputSchema: ListServiceConnectionsInputSchema,
|
|
29408
29432
|
outputSchema: recordOutputSchema("list_service_connections", ListServiceConnectionsOutputSchema),
|
|
29409
29433
|
annotations: { title: "List Connected Services", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
@@ -29438,11 +29462,25 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
|
|
|
29438
29462
|
}, async (input) => executor.zoomCreateMeeting(input));
|
|
29439
29463
|
server.registerTool("read_service_connection", {
|
|
29440
29464
|
title: "Read Connected Service",
|
|
29441
|
-
description: "Call one live, read-only tool on
|
|
29465
|
+
description: "Call one live, read-only tool on any connected service, including Google Analytics, YouTube, Facebook Pages, LinkedIn, X, Slack, Gmail, Calendar, Drive, Zoom, and Xero. Requires a connectionId and an exact name from that connection's readTools in list_service_connections; an unlisted tool is rejected server-side. For already-digested history, prefer memory-search over vaultName or table-query over tableName.",
|
|
29442
29466
|
inputSchema: ReadServiceConnectionInputSchema,
|
|
29443
29467
|
outputSchema: recordOutputSchema("read_service_connection", ReadServiceConnectionOutputSchema),
|
|
29444
29468
|
annotations: { title: "Read Connected Service", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }
|
|
29445
29469
|
}, async (input) => executor.readServiceConnection(input));
|
|
29470
|
+
server.registerTool("call_service_connection_action", {
|
|
29471
|
+
title: "Run Connected Service Action",
|
|
29472
|
+
description: "Run one explicitly allowlisted write or mutation on a tenant-owned OAuth connection. First call list_service_connections, use a connection with actionsEnabled true, choose one exact actionTools entry, and supply that action's arguments. The server rejects arbitrary action names, inactive or foreign connections, disabled actions, and tools outside the provider allowlist. This may publish, update, send, subscribe, or delete provider data depending on the chosen tool.",
|
|
29473
|
+
inputSchema: CallServiceConnectionActionInputSchema,
|
|
29474
|
+
outputSchema: recordOutputSchema("call_service_connection_action", CallServiceConnectionActionOutputSchema),
|
|
29475
|
+
annotations: { title: "Run Connected Service Action", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true }
|
|
29476
|
+
}, async (input) => executor.callServiceConnectionAction(input));
|
|
29477
|
+
server.registerTool("set_scheduled_action_connections", {
|
|
29478
|
+
title: "Set Scheduled Action Connections",
|
|
29479
|
+
description: "Attach exact tenant-owned OAuth connections and exact allowed tools to an existing scheduled action. First create or identify the schedule, call list_service_connections, then grant only the required readTools and\u2014when that account has actionsEnabled true\u2014the required actionTools. The server verifies schedule ownership, connection ownership, provider policy, and the per-account action switch. Pass an empty connections array to remove all external-service access from the schedule.",
|
|
29480
|
+
inputSchema: SetScheduledActionConnectionsInputSchema,
|
|
29481
|
+
outputSchema: recordOutputSchema("set_scheduled_action_connections", SetScheduledActionConnectionsOutputSchema),
|
|
29482
|
+
annotations: { title: "Set Scheduled Action Connections", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
29483
|
+
}, async (input) => executor.setScheduledActionConnections(input));
|
|
29446
29484
|
}
|
|
29447
29485
|
var import_mcp, import_node_fs9, import_node_path12, import_node_crypto10;
|
|
29448
29486
|
var init_paa_mcp_server = __esm({
|
|
@@ -29539,10 +29577,10 @@ var init_http_mcp_tool_executor = __esm({
|
|
|
29539
29577
|
const configuredSerpIntelligenceTimeoutMs = Number(process.env.MCP_SCRAPER_SERP_INTELLIGENCE_HTTP_TIMEOUT_MS ?? this.timeoutMs);
|
|
29540
29578
|
this.serpIntelligenceTimeoutMs = Number.isFinite(configuredSerpIntelligenceTimeoutMs) && configuredSerpIntelligenceTimeoutMs > 0 ? configuredSerpIntelligenceTimeoutMs : this.timeoutMs;
|
|
29541
29579
|
}
|
|
29542
|
-
async call(path6, body, timeoutMs = this.timeoutMs) {
|
|
29580
|
+
async call(path6, body, timeoutMs = this.timeoutMs, method = "POST") {
|
|
29543
29581
|
try {
|
|
29544
29582
|
const res = await fetch(`${this.baseUrl}${path6}`, {
|
|
29545
|
-
method
|
|
29583
|
+
method,
|
|
29546
29584
|
headers: {
|
|
29547
29585
|
"Content-Type": "application/json",
|
|
29548
29586
|
"x-api-key": this.apiKey
|
|
@@ -29769,6 +29807,14 @@ var init_http_mcp_tool_executor = __esm({
|
|
|
29769
29807
|
readServiceConnection(input) {
|
|
29770
29808
|
return this.call("/schedule-connections/actions/read", input);
|
|
29771
29809
|
}
|
|
29810
|
+
callServiceConnectionAction(input) {
|
|
29811
|
+
return this.call("/schedule-connections/actions/call", input);
|
|
29812
|
+
}
|
|
29813
|
+
setScheduledActionConnections(input) {
|
|
29814
|
+
return this.call(`/schedule-actions/${encodeURIComponent(input.scheduleActionId)}/connections`, {
|
|
29815
|
+
connections: input.connections
|
|
29816
|
+
}, void 0, "PUT");
|
|
29817
|
+
}
|
|
29772
29818
|
captureSerpSnapshot(input) {
|
|
29773
29819
|
return this.call("/serp-intelligence/capture", input, this.serpIntelligenceTimeoutMs);
|
|
29774
29820
|
}
|
|
@@ -38959,6 +39005,14 @@ async function getNangoCatalog() {
|
|
|
38959
39005
|
const safeDefaultAllowedTools = cleanTools(
|
|
38960
39006
|
row.safeDefaultAllowedTools ?? row.safe_default_allowed_tools ?? row.defaultAllowedTools ?? row.default_allowed_tools ?? row.allowedTools ?? row.allowed_tools
|
|
38961
39007
|
).filter((tool) => !disabledTools?.has(tool));
|
|
39008
|
+
const platformSetupStatus = firstString(row, [
|
|
39009
|
+
"platformSetupStatus",
|
|
39010
|
+
"platform_setup_status",
|
|
39011
|
+
"setupStatus",
|
|
39012
|
+
"setup_status"
|
|
39013
|
+
], 100);
|
|
39014
|
+
const appReviewStatus = row.appReviewLimited === true || row.app_review_limited === true ? "limited" : firstString(row, ["appReviewStatus", "app_review_status", "reviewStatus", "review_status"], 100);
|
|
39015
|
+
const appReviewNote = firstString(row, ["appReviewNote", "app_review_note", "reviewNote", "review_note"], 500);
|
|
38962
39016
|
result.push({
|
|
38963
39017
|
providerConfigKey,
|
|
38964
39018
|
provider,
|
|
@@ -38968,7 +39022,10 @@ async function getNangoCatalog() {
|
|
|
38968
39022
|
docsUrl,
|
|
38969
39023
|
authMode,
|
|
38970
39024
|
categories,
|
|
38971
|
-
safeDefaultAllowedTools
|
|
39025
|
+
safeDefaultAllowedTools,
|
|
39026
|
+
platformSetupStatus,
|
|
39027
|
+
appReviewStatus,
|
|
39028
|
+
appReviewNote
|
|
38972
39029
|
});
|
|
38973
39030
|
}
|
|
38974
39031
|
return result;
|
|
@@ -38996,6 +39053,7 @@ async function getNangoConnections(identity) {
|
|
|
38996
39053
|
reconnectRequired,
|
|
38997
39054
|
actionsEnabled: row.actionsEnabled === true || row.actions_enabled === true,
|
|
38998
39055
|
readTools: cleanTools(row.readTools ?? row.read_tools),
|
|
39056
|
+
actionTools: cleanTools(row.actionTools ?? row.action_tools ?? row.writeTools ?? row.write_tools),
|
|
38999
39057
|
vaultName: firstString(row, ["vaultName", "vault_name"], 100),
|
|
39000
39058
|
tableName: firstString(row, ["tableName", "table_name"], 100),
|
|
39001
39059
|
createdAt: firstString(row, ["createdAt", "created_at"], 100),
|
|
@@ -39112,10 +39170,10 @@ async function setScheduleConnectionActionsEnabled(identity, connectionId, enabl
|
|
|
39112
39170
|
if (!isRecord(data) || !isRecord(data.connection)) return enabled;
|
|
39113
39171
|
return data.connection.actionsEnabled === true;
|
|
39114
39172
|
}
|
|
39115
|
-
async function callScheduleConnectionAction(identity, connectionId, input) {
|
|
39173
|
+
async function callScheduleConnectionAction(identity, connectionId, input, tool) {
|
|
39116
39174
|
const body = await controlRequest("/api/internal/nango/connections/actions/call", {
|
|
39117
39175
|
method: "POST",
|
|
39118
|
-
body: JSON.stringify({ identity, connectionId, input })
|
|
39176
|
+
body: JSON.stringify({ identity, connectionId, ...tool ? { tool } : {}, input })
|
|
39119
39177
|
});
|
|
39120
39178
|
const data = unwrapData(body);
|
|
39121
39179
|
return isRecord(data) ? data.result ?? data : data;
|
|
@@ -40166,6 +40224,26 @@ var init_server = __esm({
|
|
|
40166
40224
|
return scheduleConnectionError(c, err, "Unable to read from this connection.");
|
|
40167
40225
|
}
|
|
40168
40226
|
});
|
|
40227
|
+
app.post("/schedule-connections/actions/call", auth2, async (c) => {
|
|
40228
|
+
const user = c.get("user");
|
|
40229
|
+
const body = await c.req.json().catch(() => ({}));
|
|
40230
|
+
const connectionId = providerConfigKeyFrom(body.connectionId);
|
|
40231
|
+
const tool = providerConfigKeyFrom(body.tool);
|
|
40232
|
+
if (!connectionId || !tool || !body.args || typeof body.args !== "object" || Array.isArray(body.args)) {
|
|
40233
|
+
return c.json({ ok: false, error: "connectionId, tool, and an args object are required." }, 400);
|
|
40234
|
+
}
|
|
40235
|
+
try {
|
|
40236
|
+
const result = await callScheduleConnectionAction(
|
|
40237
|
+
user.email,
|
|
40238
|
+
connectionId,
|
|
40239
|
+
body.args,
|
|
40240
|
+
tool
|
|
40241
|
+
);
|
|
40242
|
+
return c.json({ ok: true, result });
|
|
40243
|
+
} catch (err) {
|
|
40244
|
+
return scheduleConnectionError(c, err, "Unable to run this connection action.");
|
|
40245
|
+
}
|
|
40246
|
+
});
|
|
40169
40247
|
app.post("/schedule-link", auth2, async (c) => {
|
|
40170
40248
|
try {
|
|
40171
40249
|
const user = c.get("user");
|