@scavio/mcp-server 0.19.1 → 0.21.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 +78 -14
- package/dist/lib/client.d.ts +2 -1
- package/dist/lib/client.js +11 -4
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/errors.d.ts +5 -1
- package/dist/lib/errors.js +5 -1
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/tool-error.js +10 -2
- package/dist/lib/tool-error.js.map +1 -1
- package/dist/lib/trim-platforms.js +59 -0
- package/dist/lib/trim-platforms.js.map +1 -1
- package/dist/lib/web-jobs.d.ts +35 -0
- package/dist/lib/web-jobs.js +75 -0
- package/dist/lib/web-jobs.js.map +1 -0
- package/dist/tools/extract.js +192 -1
- package/dist/tools/extract.js.map +1 -1
- package/dist/tools/index.d.ts +7 -6
- package/dist/tools/index.js +20 -8
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/reddit.js +32 -0
- package/dist/tools/reddit.js.map +1 -1
- package/dist/tools/tiktok.js +90 -1
- package/dist/tools/tiktok.js.map +1 -1
- package/dist/tools/x.js +44 -0
- package/dist/tools/x.js.map +1 -1
- package/dist/tools/youtube.js +29 -1
- package/dist/tools/youtube.js.map +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|
|
|
6
|
-
[Scavio](https://scavio.dev?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) is a unified [Web Search API](https://scavio.dev/docs/search-api?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) and MCP server that gives AI agents web search, page extraction, and structured data from e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing sources.
|
|
6
|
+
[Scavio](https://scavio.dev?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) is a unified [Web Search API](https://scavio.dev/docs/search-api?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) and MCP server that gives AI agents web search, page extraction, and structured data from e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing sources. 255 tools across 36 platforms plus Extract, map, crawl and batch, one API key.
|
|
7
7
|
|
|
8
|
-
**The 22 platforms added in 0.13.0 are opt-in.** Registering all
|
|
8
|
+
**The 22 platforms added in 0.13.0 are opt-in.** Registering all 255 tools puts 243KB of tool definitions — roughly 61k tokens — into every session before you type anything. So the default is the platform set 0.12.x already had, plus Extract: 133 tools, 105KB. Upgrading never removes a tool you were using. Everything else is one env var away: see [Choosing which tools load](#choosing-which-tools-load).
|
|
9
9
|
|
|
10
10
|
## Remote MCP Server
|
|
11
11
|
|
|
@@ -207,8 +207,8 @@ Add to settings (`Cmd+,`):
|
|
|
207
207
|
|
|
208
208
|
## Choosing which tools load
|
|
209
209
|
|
|
210
|
-
Scavio exposes
|
|
211
|
-
roughly
|
|
210
|
+
Scavio exposes 255 tools. Loading all of them costs 243KB of `tools/list` —
|
|
211
|
+
roughly 61k tokens of context in every session before the user has said anything,
|
|
212
212
|
and more tools than some clients will accept at all. So the server registers a
|
|
213
213
|
curated subset by default and lets you pick the rest. The sizes below are
|
|
214
214
|
measured, not estimated: `npm run toolslist` reproduces them.
|
|
@@ -217,10 +217,10 @@ measured, not estimated: `npm run toolslist` reproduces them.
|
|
|
217
217
|
|
|
218
218
|
| Value | Registers |
|
|
219
219
|
|-------|-----------|
|
|
220
|
-
| *(unset)* or `default` |
|
|
221
|
-
| `all` | every platform — **
|
|
222
|
-
| `extract,sec,g2` | just those platforms —
|
|
223
|
-
| `default,zillow,metaads` | the default set plus two more —
|
|
220
|
+
| *(unset)* or `default` | Every platform 0.12.x had, plus `extract` — **133 tools, 105KB** |
|
|
221
|
+
| `all` | every platform — **255 tools, 243KB** |
|
|
222
|
+
| `extract,sec,g2` | just those platforms — 18 tools, 21KB |
|
|
223
|
+
| `default,zillow,metaads` | the default set plus two more — 139 tools, 113KB |
|
|
224
224
|
| `none` | no platform tools, only `get_usage` |
|
|
225
225
|
|
|
226
226
|
Keys are matched case- and punctuation-insensitively, so `meta-ads`, `metaads`
|
|
@@ -278,8 +278,9 @@ https://mcp.scavio.dev/mcp?platforms=all
|
|
|
278
278
|
### Upgrading from 0.12.x
|
|
279
279
|
|
|
280
280
|
Nothing to do. The default set is exactly the 10 platforms 0.12.x registered,
|
|
281
|
-
plus Extract — every tool you were using still loads
|
|
282
|
-
|
|
281
|
+
plus Extract — every tool you were using still loads. Those platforms keep gaining
|
|
282
|
+
tools (Walmart grew from 2 to 7; TikTok, YouTube, Reddit and X gained 19 in 0.20.0;
|
|
283
|
+
Extract gained map, crawl and batch in 0.21.0), which is why the default count is now 133.
|
|
283
284
|
|
|
284
285
|
The 22 platforms added in 0.13.0 are opt-in. Add them additively:
|
|
285
286
|
|
|
@@ -305,14 +306,50 @@ are free.
|
|
|
305
306
|
| Tool | Description |
|
|
306
307
|
|------|-------------|
|
|
307
308
|
| `extract_url` | Read any web page and return it as clean Markdown, plain text, or raw HTML |
|
|
309
|
+
| `map_website` | List a site's page URLs from its sitemaps and start page, path-filtered, with `lastmod` when known |
|
|
310
|
+
| `crawl_website` | Crawl a site from one URL and extract every same-site page; waits up to `wait_seconds` and returns results, or the job id |
|
|
311
|
+
| `get_crawl_status` | A crawl's status, page counts, credits used and page results, paged by cursor; can wait for completion |
|
|
312
|
+
| `cancel_crawl` | Stop a running crawl; nothing more is billed, results so far stay readable |
|
|
313
|
+
| `batch_extract` | Extract a list of URLs in one job, results in input order; waits up to `wait_seconds` |
|
|
314
|
+
| `get_batch_status` | A batch's status and results, paged by cursor; can wait for completion |
|
|
315
|
+
| `cancel_batch` | Stop a running batch |
|
|
308
316
|
|
|
309
317
|
Extract is tier-priced by the `mode` parameter, not flat: `normal` (the default)
|
|
310
|
-
and `advanced` (
|
|
311
|
-
|
|
318
|
+
and `advanced` (renders JavaScript) cost 1 credit, `ultra` (for the hardest pages)
|
|
319
|
+
costs 2. Start at `normal` and escalate only when the
|
|
312
320
|
content comes back empty or blocked. You are billed only on a successful
|
|
313
321
|
extraction — a dead link, a bot wall or a timeout costs nothing. There is no
|
|
314
322
|
pagination: the whole page comes back in one call.
|
|
315
323
|
|
|
324
|
+
**Map, crawl and batch** (new in 0.21.0) are the multi-page operations:
|
|
325
|
+
|
|
326
|
+
- **Pricing.** `map_website` costs 1 credit. Crawl and batch bill per
|
|
327
|
+
*successful* page at Extract's price for the tier (normal 1, advanced 1,
|
|
328
|
+
ultra 2); failed and skipped pages are free, and status and cancel calls are
|
|
329
|
+
free. Credits are taken page by page, and a job stops cleanly with
|
|
330
|
+
`stopped_reason: "insufficient_credits"` if the balance runs out.
|
|
331
|
+
- **Plan limits** (max pages per crawl / active jobs / URLs per batch): Free
|
|
332
|
+
10 / 1 / 10, PAYG 100 / 1 / 50, Project 500 / 2 / 100, Bootstrap 2,000 / 3 / 500,
|
|
333
|
+
Startup 5,000 / 5 / 1,000, Growth 10,000 / 10 / 1,000. Starting a job past the
|
|
334
|
+
active-job limit returns a 429 that names the running jobs.
|
|
335
|
+
- **Behaviour.** Robots.txt is always obeyed for map and crawl. A crawl stays on
|
|
336
|
+
the start URL's site (subdomains optional) and visits pages under the start
|
|
337
|
+
path first. Results are kept for 3 days; a job runs for at most 6 hours.
|
|
338
|
+
- **Built for tool-call time limits.** MCP clients usually cancel a tool call
|
|
339
|
+
after about 60 seconds, so a crawl is a job, not one long call.
|
|
340
|
+
`crawl_website` / `batch_extract` start the job and wait up to `wait_seconds`
|
|
341
|
+
(default 30, max 50): a small job comes back finished with its first page of
|
|
342
|
+
results; a large one returns the job id (and `webhook_secret`, shown only
|
|
343
|
+
once, if you set `webhook_url`). `get_crawl_status` / `get_batch_status` take
|
|
344
|
+
the same `wait_seconds` to long-poll, and `cursor` to page.
|
|
345
|
+
- **Output stays small.** Status calls return 10 results per call by default
|
|
346
|
+
(`limit` up to 100) and clip each page's content to `max_content_chars`
|
|
347
|
+
(default 4,000); clipped pages carry `content_clipped: true` next to the full
|
|
348
|
+
`content_length`. `map_website` asks for 200 links when you set no `limit`
|
|
349
|
+
(the API default is 1,000). Every response that has more to read carries a
|
|
350
|
+
`_hint` naming the exact next call. Repeat a start call with the same
|
|
351
|
+
`idempotency_key` and you get the original job back instead of a second one.
|
|
352
|
+
|
|
316
353
|
### [Google Search API](https://scavio.dev/docs/search-api?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme)
|
|
317
354
|
|
|
318
355
|
| Tool | Description |
|
|
@@ -352,8 +389,10 @@ pagination: the whole page comes back in one call.
|
|
|
352
389
|
| `get_youtube_channel_community` | List a channel's community posts |
|
|
353
390
|
| `resolve_youtube_channel` | Resolve a handle or URL to a channel ID |
|
|
354
391
|
| `get_youtube_streams` | Get direct media stream URLs for a video |
|
|
392
|
+
| `get_youtube_community_post` | Get one community post: text, author, likes, images, comments cursor |
|
|
393
|
+
| `get_youtube_community_post_comments` | Get comments on a community post with pagination |
|
|
355
394
|
|
|
356
|
-
Credit cost varies: `get_youtube_transcript` costs
|
|
395
|
+
Credit cost varies: `get_youtube_transcript` costs 5, `get_youtube_streams` 3,
|
|
357
396
|
`search_youtube` and `search_youtube_shorts` 2, and every other YouTube tool 1.
|
|
358
397
|
`get_youtube_related` accepts a cursor but never returns one, so treat it as a
|
|
359
398
|
single page.
|
|
@@ -414,6 +453,26 @@ to know you are looking at a slice. Both seller tools need the NUMERIC
|
|
|
414
453
|
| `get_tiktok_hashtag_videos` | List videos for a hashtag |
|
|
415
454
|
| `get_tiktok_user_followers` | Get a user's follower list |
|
|
416
455
|
| `get_tiktok_user_followings` | Get a user's following list |
|
|
456
|
+
| `get_tiktok_trending_searches` | Search terms trending now (about 90, no region filter) |
|
|
457
|
+
| `get_tiktok_trending_videos` | A sample of trending videos (about 6 per call) |
|
|
458
|
+
| `get_tiktok_search_suggestions` | Search autocomplete suggestions for a keyword |
|
|
459
|
+
| `get_tiktok_music` | Get a sound: artist, album, duration, videos using it, chart rank |
|
|
460
|
+
| `get_tiktok_music_videos` | List videos that use a sound (about 14 per page) |
|
|
461
|
+
| `search_tiktok_music` | Search sounds by keyword |
|
|
462
|
+
| `get_tiktok_music_chart` | Top 50 or Viral 50 sound chart (global) |
|
|
463
|
+
| `get_tiktok_user_similar` | Creators similar to a user (about 30 per page) |
|
|
464
|
+
| `get_tiktok_user_playlists` | List a user's playlists (series) |
|
|
465
|
+
| `get_tiktok_playlist_videos` | List the videos in a playlist |
|
|
466
|
+
| `get_tiktok_user_live` | Is a user live now: room status, title, viewers |
|
|
467
|
+
| `get_tiktok_user_region` | The region an account is registered in, plus sec_user_id |
|
|
468
|
+
|
|
469
|
+
Every TikTok tool costs 1 credit. The trending, sound, playlist, similar-creator, live
|
|
470
|
+
and region tools return TikTok's own payload shape, trimmed for context: large numeric
|
|
471
|
+
ids can lose precision as JSON numbers, so use the string forms (`id_str`, `sec_uid`,
|
|
472
|
+
`sec_user_id`). `get_tiktok_trending_videos` returns about 6 videos per call whatever
|
|
473
|
+
`count` says, and `get_tiktok_music_videos` ignores `count` (about 14 per page). Search
|
|
474
|
+
suggestions can be empty for long-tail keywords and still bill. An unknown username is
|
|
475
|
+
a billed 404 on `get_tiktok_user_live` and an unbilled 404 on `get_tiktok_user_region`.
|
|
417
476
|
|
|
418
477
|
### [Instagram API](https://scavio.dev/docs/instagram-api?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme)
|
|
419
478
|
|
|
@@ -452,10 +511,12 @@ other nine tools cost 10.
|
|
|
452
511
|
| `get_reddit_user_comments` | List a redditor's comments |
|
|
453
512
|
| `get_reddit_popular` | Get the site-wide popular feed |
|
|
454
513
|
| `get_reddit_trending` | Get current trending search queries |
|
|
514
|
+
| `search_reddit_comments` | Search comments by keyword, with the post and subreddit each was left on |
|
|
515
|
+
| `search_reddit_subreddits` | Find subreddits by keyword, with subscriber counts |
|
|
455
516
|
|
|
456
517
|
Every Reddit tool costs 1 credit. Two things to know: `search_reddit` takes a query
|
|
457
518
|
and a cursor only - there is no sort or post-type filter, results come back in
|
|
458
|
-
relevance order - and `get_reddit_post` returns a flat post object with no comments,
|
|
519
|
+
relevance order (`search_reddit_comments` does sort: relevance, hot, top or new) - and `get_reddit_post` returns a flat post object with no comments,
|
|
459
520
|
so call `get_reddit_post_comments` with the post id for those. Reddit is the slowest
|
|
460
521
|
platform here, typically 5-15 seconds per call.
|
|
461
522
|
|
|
@@ -474,6 +535,9 @@ platform here, typically 5-15 seconds per call.
|
|
|
474
535
|
| `get_x_user_followers` | List a user's followers |
|
|
475
536
|
| `get_x_user_followings` | List accounts a user follows |
|
|
476
537
|
| `get_x_trending` | Get trending topics for a country |
|
|
538
|
+
| `search_x_communities` | Find X Communities by keyword, with member counts |
|
|
539
|
+
| `get_x_community` | Get a Community's description, member count, topic and rules |
|
|
540
|
+
| `get_x_community_tweets` | List a Community's posts by relevance or recency |
|
|
477
541
|
|
|
478
542
|
`get_x_user_tweets`, `get_x_user_replies` and `get_x_user_media` return a
|
|
479
543
|
`next_cursor` but no `has_more`, so page until the cursor is absent or the timeline
|
package/dist/lib/client.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ export declare class ScavioClient {
|
|
|
10
10
|
constructor(apiKey: string);
|
|
11
11
|
private request;
|
|
12
12
|
get<T>(path: string): Promise<T>;
|
|
13
|
-
post<T>(path: string, body?: unknown): Promise<T>;
|
|
13
|
+
post<T>(path: string, body?: unknown, headers?: Record<string, string>): Promise<T>;
|
|
14
|
+
delete<T>(path: string): Promise<T>;
|
|
14
15
|
}
|
package/dist/lib/client.js
CHANGED
|
@@ -14,7 +14,7 @@ export class ScavioClient {
|
|
|
14
14
|
this.baseUrl = env.SCAVIO_API_BASE_URL;
|
|
15
15
|
this.apiKey = apiKey;
|
|
16
16
|
}
|
|
17
|
-
async request(method, path, body) {
|
|
17
|
+
async request(method, path, body, extraHeaders) {
|
|
18
18
|
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
19
19
|
method,
|
|
20
20
|
headers: {
|
|
@@ -22,6 +22,7 @@ export class ScavioClient {
|
|
|
22
22
|
"Authorization": `Bearer ${this.apiKey}`,
|
|
23
23
|
"User-Agent": USER_AGENT,
|
|
24
24
|
"X-Client-Source": CLIENT_SOURCE,
|
|
25
|
+
...extraHeaders,
|
|
25
26
|
},
|
|
26
27
|
...(body !== undefined ? { body: JSON.stringify(body) } : {}),
|
|
27
28
|
});
|
|
@@ -29,24 +30,30 @@ export class ScavioClient {
|
|
|
29
30
|
const text = await response.text();
|
|
30
31
|
let message;
|
|
31
32
|
let billingUrl;
|
|
33
|
+
let body;
|
|
32
34
|
try {
|
|
33
35
|
const json = JSON.parse(text);
|
|
34
36
|
message = json.error ?? json.message ?? text;
|
|
35
37
|
if (typeof json.billing_url === "string")
|
|
36
38
|
billingUrl = json.billing_url;
|
|
39
|
+
if (json && typeof json === "object" && !Array.isArray(json))
|
|
40
|
+
body = json;
|
|
37
41
|
}
|
|
38
42
|
catch {
|
|
39
43
|
message = text;
|
|
40
44
|
}
|
|
41
|
-
throw new ApiError(response.status, message, undefined, billingUrl);
|
|
45
|
+
throw new ApiError(response.status, message, undefined, billingUrl, body);
|
|
42
46
|
}
|
|
43
47
|
return response.json();
|
|
44
48
|
}
|
|
45
49
|
async get(path) {
|
|
46
50
|
return this.request("GET", path);
|
|
47
51
|
}
|
|
48
|
-
async post(path, body) {
|
|
49
|
-
return this.request("POST", path, body);
|
|
52
|
+
async post(path, body, headers) {
|
|
53
|
+
return this.request("POST", path, body, headers);
|
|
54
|
+
}
|
|
55
|
+
async delete(path) {
|
|
56
|
+
return this.request("DELETE", path);
|
|
50
57
|
}
|
|
51
58
|
}
|
|
52
59
|
//# sourceMappingURL=client.js.map
|
package/dist/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,E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AO,IAAI,CAAC,OAAO,CAAI,KAAK,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,IAAI,CAAI,IAAY,EAAE,IAAc,EAAE,OAAgC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAI,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,MAAM,CAAI,IAAY;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAI,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;CACF"}
|
package/dist/lib/errors.d.ts
CHANGED
|
@@ -3,7 +3,11 @@ export declare class ApiError extends Error {
|
|
|
3
3
|
readonly code?: string | undefined;
|
|
4
4
|
/** Where to top up, when the API sent one (402 responses do). */
|
|
5
5
|
readonly billingUrl?: string | undefined;
|
|
6
|
+
/** The parsed JSON error body, when there was one. */
|
|
7
|
+
readonly body?: Record<string, unknown> | undefined;
|
|
6
8
|
constructor(status: number, message: string, code?: string | undefined,
|
|
7
9
|
/** Where to top up, when the API sent one (402 responses do). */
|
|
8
|
-
billingUrl?: string | undefined
|
|
10
|
+
billingUrl?: string | undefined,
|
|
11
|
+
/** The parsed JSON error body, when there was one. */
|
|
12
|
+
body?: Record<string, unknown> | undefined);
|
|
9
13
|
}
|
package/dist/lib/errors.js
CHANGED
|
@@ -2,13 +2,17 @@ export class ApiError extends Error {
|
|
|
2
2
|
status;
|
|
3
3
|
code;
|
|
4
4
|
billingUrl;
|
|
5
|
+
body;
|
|
5
6
|
constructor(status, message, code,
|
|
6
7
|
/** Where to top up, when the API sent one (402 responses do). */
|
|
7
|
-
billingUrl
|
|
8
|
+
billingUrl,
|
|
9
|
+
/** The parsed JSON error body, when there was one. */
|
|
10
|
+
body) {
|
|
8
11
|
super(message);
|
|
9
12
|
this.status = status;
|
|
10
13
|
this.code = code;
|
|
11
14
|
this.billingUrl = billingUrl;
|
|
15
|
+
this.body = body;
|
|
12
16
|
this.name = "ApiError";
|
|
13
17
|
}
|
|
14
18
|
}
|
package/dist/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAS,SAAQ,KAAK;IAEf;IAEA;IAEA;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAS,SAAQ,KAAK;IAEf;IAEA;IAEA;IAEA;IAPlB,YACkB,MAAc,EAC9B,OAAe,EACC,IAAa;IAC7B,iEAAiE;IACjD,UAAmB;IACnC,sDAAsD;IACtC,IAA8B;QAE9C,KAAK,CAAC,OAAO,CAAC,CAAC;QARC,WAAM,GAAN,MAAM,CAAQ;QAEd,SAAI,GAAJ,IAAI,CAAS;QAEb,eAAU,GAAV,UAAU,CAAS;QAEnB,SAAI,GAAJ,IAAI,CAA0B;QAG9C,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF"}
|
package/dist/lib/tool-error.js
CHANGED
|
@@ -17,8 +17,16 @@ import { ApiError } from "./errors.js";
|
|
|
17
17
|
*/
|
|
18
18
|
export function handleApiError(err) {
|
|
19
19
|
if (err instanceof ApiError) {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// The API's 429 message says which limit was hit (per-plan concurrency, or
|
|
21
|
+
// the active crawl/batch job cap, which names the running jobs to wait on).
|
|
22
|
+
if (err.status === 429) {
|
|
23
|
+
const b = err.body ?? {};
|
|
24
|
+
const parts = [err.message, typeof b.message === "string" ? b.message : ""].filter((p) => p && p !== "Too Many Requests");
|
|
25
|
+
if (Array.isArray(b.running_jobs) && b.running_jobs.length)
|
|
26
|
+
parts.push(`Running jobs: ${b.running_jobs.join(", ")}`);
|
|
27
|
+
const detail = parts.map((p) => ` ${/[.!?]$/.test(p) ? p : `${p}.`}`).join("");
|
|
28
|
+
return { isError: true, content: [{ type: "text", text: `Rate limited (429).${detail} Wait and retry.` }] };
|
|
29
|
+
}
|
|
22
30
|
// The API's 402 body carries billing_url; the bare "Insufficient credits"
|
|
23
31
|
// string used to be all the model saw, so it could not tell the user where
|
|
24
32
|
// to go. Surface the link, and say that nothing needs reconfiguring.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-error.js","sourceRoot":"","sources":["../../src/lib/tool-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,IAAI,GAAG,YAAY,QAAQ,EAAE,CAAC;QAC5B,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;
|
|
1
|
+
{"version":3,"file":"tool-error.js","sourceRoot":"","sources":["../../src/lib/tool-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,IAAI,GAAG,YAAY,QAAQ,EAAE,CAAC;QAC5B,2EAA2E;QAC3E,4EAA4E;QAC5E,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YACvB,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;YACzB,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAA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AAE,CAAC;IAClH,CAAC;IACD,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -71,6 +71,61 @@ function tiktokAweme(o) {
|
|
|
71
71
|
out.poi_info = pick(o.poi_info, ["poi_id", "poi_name"]);
|
|
72
72
|
return out;
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Sound records (get_tiktok_music, search_tiktok_music, get_tiktok_music_chart):
|
|
76
|
+
* ~70 keys, most of them bitrate ladders, share blobs and DSP tokens. Keeps
|
|
77
|
+
* the identity, usage and licensing fields plus one play and one cover URL.
|
|
78
|
+
* A superset of what tiktokAweme keeps for a video's music, so re-projecting
|
|
79
|
+
* that nested record changes nothing.
|
|
80
|
+
*/
|
|
81
|
+
const TT_MUSIC_KEEP = [
|
|
82
|
+
"id", "id_str", "mid", "title", "author", "album", "duration", "user_count", "create_time",
|
|
83
|
+
"original", "is_original", "is_original_sound", "is_commerce_music", "commercial_right_type",
|
|
84
|
+
"is_pgc", "owner_handle", "owner_nickname", "owner_id", "sec_uid", "theme_tags", "music_release_info",
|
|
85
|
+
];
|
|
86
|
+
function tiktokMusic(o) {
|
|
87
|
+
const out = pick(o, TT_MUSIC_KEEP);
|
|
88
|
+
for (const k of ["play_url", "cover_large"]) {
|
|
89
|
+
const u = firstUrl(o[k]);
|
|
90
|
+
if (u)
|
|
91
|
+
out[k] = u;
|
|
92
|
+
}
|
|
93
|
+
if (Array.isArray(o.artists)) {
|
|
94
|
+
out.artists = o.artists.map((a) => (isObj(a) ? pick(a, ["uid", "sec_uid", "handle", "nick_name", "is_verified"]) : a));
|
|
95
|
+
}
|
|
96
|
+
return out;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Web-format video records (`data.itemList` on trending and playlist videos):
|
|
100
|
+
* camelCase, ~45 keys, with a 12KB bitrateInfo ladder and a zoomCover map per
|
|
101
|
+
* video. Same intent as tiktokAweme: ids, text, stats, author, sound, hashtags
|
|
102
|
+
* and one cover plus one play URL.
|
|
103
|
+
*/
|
|
104
|
+
function tiktokWebItem(o) {
|
|
105
|
+
const out = pick(o, ["id", "desc", "createTime", "textLanguage", "isAd", "isPinnedItem", "stats", "authorStats", "locationCreated"]);
|
|
106
|
+
if (isObj(o.author))
|
|
107
|
+
out.author = pick(o.author, ["id", "uniqueId", "nickname", "secUid", "signature", "verified", "privateAccount"]);
|
|
108
|
+
if (isObj(o.music))
|
|
109
|
+
out.music = pick(o.music, ["id", "title", "authorName", "duration", "original", "isCopyrighted", "playUrl"]);
|
|
110
|
+
if (isObj(o.video))
|
|
111
|
+
out.video = pick(o.video, ["duration", "width", "height", "ratio", "cover", "playAddr"]);
|
|
112
|
+
if (Array.isArray(o.challenges))
|
|
113
|
+
out.challenges = o.challenges.map((c) => (isObj(c) ? pick(c, ["id", "title"]) : c));
|
|
114
|
+
if (Array.isArray(o.textExtra)) {
|
|
115
|
+
out.textExtra = o.textExtra.map((t) => (isObj(t) ? pick(t, ["hashtagName", "userId", "userUniqueId", "secUid", "type"]) : t));
|
|
116
|
+
}
|
|
117
|
+
if (isObj(o.imagePost) && Array.isArray(o.imagePost.images)) {
|
|
118
|
+
out.imagePost = {
|
|
119
|
+
images: o.imagePost.images.map((i) => {
|
|
120
|
+
const urls = isObj(i) && isObj(i.imageURL) && Array.isArray(i.imageURL.urlList) ? i.imageURL.urlList : [];
|
|
121
|
+
return urls.length ? { url: urls[0] } : null;
|
|
122
|
+
}),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
if (isObj(o.poi))
|
|
126
|
+
out.poi = pick(o.poi, ["id", "name"]);
|
|
127
|
+
return out;
|
|
128
|
+
}
|
|
74
129
|
function tiktokUser(o) {
|
|
75
130
|
const out = pick(o, TT_USER_KEEP);
|
|
76
131
|
if ("avatar_thumb" in out)
|
|
@@ -84,6 +139,10 @@ function projectTiktok(o) {
|
|
|
84
139
|
return tiktokAweme(o);
|
|
85
140
|
if ("sec_uid" in o && ("unique_id" in o || "nickname" in o))
|
|
86
141
|
return tiktokUser(o);
|
|
142
|
+
if ("id_str" in o && "title" in o && ("user_count" in o || "play_url" in o))
|
|
143
|
+
return tiktokMusic(o);
|
|
144
|
+
if ("id" in o && "createTime" in o && isObj(o.author) && ("stats" in o || "video" in o))
|
|
145
|
+
return tiktokWebItem(o);
|
|
87
146
|
return o;
|
|
88
147
|
}
|
|
89
148
|
/** Envelope noise that sits beside the result list on every TikTok page. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trim-platforms.js","sourceRoot":"","sources":["../../src/lib/trim-platforms.ts"],"names":[],"mappings":"AAwBA,MAAM,KAAK,GAAG,CAAC,CAAU,EAAmB,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAExG,SAAS,IAAI,CAAC,CAAa,EAAE,IAAuB;IAClD,MAAM,GAAG,GAAe,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,IAAI,IAAI;QAAE,IAAI,CAAC,IAAI,CAAC;YAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,6FAA6F;AAC7F,SAAS,QAAQ,CAAC,CAAwB;IACxC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACzF,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvC,CAAC;AAED,oFAAoF;AACpF,SAAS,UAAU,CAAC,CAAwB;IAC1C,OAAO,OAAO,CAA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AAmB,GAAoD;IAClF,MAAM,EAAE,aAAa;IACrB,SAAS,EAAE,gBAAgB;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAqD;IAChF,MAAM,EAAE,aAAa;IACrB,SAAS,EAAE,gBAAgB;CAC5B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP-side shaping for website map, crawl and batch (the Extract family's
|
|
3
|
+
* multi-page operations). The REST API is untouched; this only decides how much
|
|
4
|
+
* of a response lands in a model's context and what the model is told to do
|
|
5
|
+
* next.
|
|
6
|
+
*
|
|
7
|
+
* - map: a site can list 5,000 URLs. When the caller sets no `limit` the tool
|
|
8
|
+
* asks for MCP_MAP_DEFAULT_LIMIT, and a truncated list carries a hint.
|
|
9
|
+
* - crawl/batch status: a result page can hold up to 100 pages of up to 2 MB
|
|
10
|
+
* each. The tool asks for MCP_RESULTS_DEFAULT_LIMIT results per call and
|
|
11
|
+
* clips each page's content to `max_content_chars`, flagging the clip, so a
|
|
12
|
+
* status call stays inside a context window. `next_cursor` always survives.
|
|
13
|
+
*
|
|
14
|
+
* Deterministic and offline. Exported for scripts/trim-check.mjs.
|
|
15
|
+
*/
|
|
16
|
+
import { type JsonValue } from "./trim-response.js";
|
|
17
|
+
export declare const MCP_MAP_DEFAULT_LIMIT = 200;
|
|
18
|
+
export declare const MCP_RESULTS_DEFAULT_LIMIT = 10;
|
|
19
|
+
export declare const MCP_DEFAULT_CONTENT_CHARS = 4000;
|
|
20
|
+
/** MCP clients commonly cancel a tool call at 60 s; stay well inside it. */
|
|
21
|
+
export declare const MAX_WAIT_SECONDS = 50;
|
|
22
|
+
export declare const CRAWL_DEFAULT_WAIT_SECONDS = 30;
|
|
23
|
+
export declare const POLL_INTERVAL_MS = 3000;
|
|
24
|
+
export declare const TERMINAL_STATUSES: Set<string>;
|
|
25
|
+
/** Shape a map response: add a hint when the link list was cut. */
|
|
26
|
+
export declare function shapeMap(raw: unknown): JsonValue;
|
|
27
|
+
export interface JobShapeOptions {
|
|
28
|
+
type: "crawl" | "batch";
|
|
29
|
+
maxContentChars?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Shape a crawl/batch status response: clip page content, then drop nulls, then
|
|
33
|
+
* tell the model what to call next (more results, or wait for a running job).
|
|
34
|
+
*/
|
|
35
|
+
export declare function shapeJobStatus(raw: unknown, opts: JobShapeOptions): JsonValue;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP-side shaping for website map, crawl and batch (the Extract family's
|
|
3
|
+
* multi-page operations). The REST API is untouched; this only decides how much
|
|
4
|
+
* of a response lands in a model's context and what the model is told to do
|
|
5
|
+
* next.
|
|
6
|
+
*
|
|
7
|
+
* - map: a site can list 5,000 URLs. When the caller sets no `limit` the tool
|
|
8
|
+
* asks for MCP_MAP_DEFAULT_LIMIT, and a truncated list carries a hint.
|
|
9
|
+
* - crawl/batch status: a result page can hold up to 100 pages of up to 2 MB
|
|
10
|
+
* each. The tool asks for MCP_RESULTS_DEFAULT_LIMIT results per call and
|
|
11
|
+
* clips each page's content to `max_content_chars`, flagging the clip, so a
|
|
12
|
+
* status call stays inside a context window. `next_cursor` always survives.
|
|
13
|
+
*
|
|
14
|
+
* Deterministic and offline. Exported for scripts/trim-check.mjs.
|
|
15
|
+
*/
|
|
16
|
+
import { shapeResponse } from "./trim-response.js";
|
|
17
|
+
export const MCP_MAP_DEFAULT_LIMIT = 200;
|
|
18
|
+
export const MCP_RESULTS_DEFAULT_LIMIT = 10;
|
|
19
|
+
export const MCP_DEFAULT_CONTENT_CHARS = 4000;
|
|
20
|
+
/** MCP clients commonly cancel a tool call at 60 s; stay well inside it. */
|
|
21
|
+
export const MAX_WAIT_SECONDS = 50;
|
|
22
|
+
export const CRAWL_DEFAULT_WAIT_SECONDS = 30;
|
|
23
|
+
export const POLL_INTERVAL_MS = 3000;
|
|
24
|
+
export const TERMINAL_STATUSES = new Set(["completed", "failed", "cancelled"]);
|
|
25
|
+
function isObject(v) {
|
|
26
|
+
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
27
|
+
}
|
|
28
|
+
/** Shape a map response: add a hint when the link list was cut. */
|
|
29
|
+
export function shapeMap(raw) {
|
|
30
|
+
const out = shapeResponse(raw);
|
|
31
|
+
if (isObject(out) && isObject(out.data) && out.data.truncated === true) {
|
|
32
|
+
const d = out.data;
|
|
33
|
+
return {
|
|
34
|
+
...out,
|
|
35
|
+
_hint: `${d.returned} of ${d.total_found} URLs returned. Raise limit (up to 5,000, or your plan's cap) or narrow with search / include_paths / exclude_paths.`,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Shape a crawl/batch status response: clip page content, then drop nulls, then
|
|
42
|
+
* tell the model what to call next (more results, or wait for a running job).
|
|
43
|
+
*/
|
|
44
|
+
export function shapeJobStatus(raw, opts) {
|
|
45
|
+
const max = opts.maxContentChars ?? MCP_DEFAULT_CONTENT_CHARS;
|
|
46
|
+
const copy = structuredClone(raw ?? {});
|
|
47
|
+
let clipped = 0;
|
|
48
|
+
if (isObject(copy) && isObject(copy.data) && Array.isArray(copy.data.results)) {
|
|
49
|
+
for (const r of copy.data.results) {
|
|
50
|
+
if (isObject(r) && typeof r.content === "string" && r.content.length > max) {
|
|
51
|
+
r.content = r.content.slice(0, max);
|
|
52
|
+
r.content_clipped = true;
|
|
53
|
+
clipped++;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const out = shapeResponse(copy);
|
|
58
|
+
if (!isObject(out) || !isObject(out.data))
|
|
59
|
+
return out;
|
|
60
|
+
const d = out.data;
|
|
61
|
+
const tool = `get_${opts.type}_status`;
|
|
62
|
+
const hints = [];
|
|
63
|
+
const status = typeof d.status === "string" ? d.status : "";
|
|
64
|
+
if (status && !TERMINAL_STATUSES.has(status)) {
|
|
65
|
+
hints.push(`The ${opts.type} is ${status}: call ${tool} with id="${d.id}" and wait_seconds (up to ${MAX_WAIT_SECONDS}) to wait for it.`);
|
|
66
|
+
}
|
|
67
|
+
if (typeof d.next_cursor === "string") {
|
|
68
|
+
hints.push(`More results: call ${tool} with id="${d.id}" and cursor="${d.next_cursor}".`);
|
|
69
|
+
}
|
|
70
|
+
if (clipped > 0) {
|
|
71
|
+
hints.push(`${clipped} page(s) clipped to ${max} characters (content_clipped: true; content_length is the full size). Raise max_content_chars, or filter with status, to read more.`);
|
|
72
|
+
}
|
|
73
|
+
return hints.length ? { ...out, _hint: hints.join(" ") } : out;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=web-jobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-jobs.js","sourceRoot":"","sources":["../../src/lib/web-jobs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,aAAa,EAAmC,MAAM,oBAAoB,CAAC;AAEpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AACzC,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAC5C,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAErC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AAE/E,SAAS,QAAQ,CAAC,CAAU;IAC1B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,mEAAmE;AACnE,MAAM,U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