Skip to content

Commit 0787993

Browse files
feat(api): api update
1 parent 4fa2550 commit 0787993

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 21
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-c023cdf4ae403e8c32724869eff157cb24d4436b7c048809571c41f08dd20e03.yml
3-
openapi_spec_hash: b92878e27bdb184e1506f4baf3280118
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-8ef1d8ed8ceacb8e8e73a5b6069c63adc9c0fd74d9b9aa9dee8b218cf94eac41.yml
3+
openapi_spec_hash: 5271c711707ccf1deb2a47e0fb1119b7
44
config_hash: 682b89b02a20f5d1c13e2c91ecbcf5ce

packages/mcp-server/src/local-docs-search.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
8888
name: 'web_scrape_md',
8989
endpoint: '/web/scrape/markdown',
9090
httpMethod: 'get',
91-
summary: 'Scrape URL and convert to Markdown',
92-
description: 'Scrapes the given URL, converts the HTML content to Markdown, and returns the result.',
91+
summary: 'Scrape Markdown',
92+
description: 'Scrapes the given URL into LLM usable Markdown.',
9393
stainlessPath: '(resource) web > (method) web_scrape_md',
9494
qualified: 'client.web.webScrapeMd',
9595
params: [
@@ -102,7 +102,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
102102
],
103103
response: '{ markdown: string; success: true; url: string; }',
104104
markdown:
105-
"## web_scrape_md\n\n`client.web.webScrapeMd(url: string, includeImages?: boolean, includeLinks?: boolean, maxAgeMs?: number, shortenBase64Images?: boolean, useMainContentOnly?: boolean): { markdown: string; success: true; url: string; }`\n\n**get** `/web/scrape/markdown`\n\nScrapes the given URL, converts the HTML content to Markdown, and returns the result.\n\n### Parameters\n\n- `url: string`\n Full URL to scrape and convert to markdown (must include http:// or https:// protocol)\n\n- `includeImages?: boolean`\n Include image references in Markdown output\n\n- `includeLinks?: boolean`\n Preserve hyperlinks in Markdown output\n\n- `maxAgeMs?: number`\n Return a cached result if a prior scrape for the same parameters exists and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when omitted. Set to 0 to always scrape fresh.\n\n- `shortenBase64Images?: boolean`\n Shorten base64-encoded image data in the Markdown output\n\n- `useMainContentOnly?: boolean`\n Extract only the main content of the page, excluding headers, footers, sidebars, and navigation\n\n### Returns\n\n- `{ markdown: string; success: true; url: string; }`\n\n - `markdown: string`\n - `success: true`\n - `url: string`\n\n### Example\n\n```typescript\nimport ContextDev from 'context.dev';\n\nconst client = new ContextDev();\n\nconst response = await client.web.webScrapeMd({ url: 'https://example.com' });\n\nconsole.log(response);\n```",
105+
"## web_scrape_md\n\n`client.web.webScrapeMd(url: string, includeImages?: boolean, includeLinks?: boolean, maxAgeMs?: number, shortenBase64Images?: boolean, useMainContentOnly?: boolean): { markdown: string; success: true; url: string; }`\n\n**get** `/web/scrape/markdown`\n\nScrapes the given URL into LLM usable Markdown.\n\n### Parameters\n\n- `url: string`\n Full URL to scrape into LLM usable Markdown (must include http:// or https:// protocol)\n\n- `includeImages?: boolean`\n Include image references in Markdown output\n\n- `includeLinks?: boolean`\n Preserve hyperlinks in Markdown output\n\n- `maxAgeMs?: number`\n Return a cached result if a prior scrape for the same parameters exists and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.\n\n- `shortenBase64Images?: boolean`\n Shorten base64-encoded image data in the Markdown output\n\n- `useMainContentOnly?: boolean`\n Extract only the main content of the page, excluding headers, footers, sidebars, and navigation\n\n### Returns\n\n- `{ markdown: string; success: true; url: string; }`\n\n - `markdown: string`\n - `success: true`\n - `url: string`\n\n### Example\n\n```typescript\nimport ContextDev from 'context.dev';\n\nconst client = new ContextDev();\n\nconst response = await client.web.webScrapeMd({ url: 'https://example.com' });\n\nconsole.log(response);\n```",
106106
perLanguage: {
107107
http: {
108108
example:

src/resources/web.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ export class Web extends APIResource {
5151
}
5252

5353
/**
54-
* Scrapes the given URL, converts the HTML content to Markdown, and returns the
55-
* result.
54+
* Scrapes the given URL into LLM usable Markdown.
5655
*/
5756
webScrapeMd(query: WebWebScrapeMdParams, options?: RequestOptions): APIPromise<WebWebScrapeMdResponse> {
5857
return this._client.get('/web/scrape/markdown', { query, ...options });
@@ -401,7 +400,7 @@ export interface WebWebScrapeImagesParams {
401400

402401
export interface WebWebScrapeMdParams {
403402
/**
404-
* Full URL to scrape and convert to markdown (must include http:// or https://
403+
* Full URL to scrape into LLM usable Markdown (must include http:// or https://
405404
* protocol)
406405
*/
407406
url: string;
@@ -419,7 +418,7 @@ export interface WebWebScrapeMdParams {
419418
/**
420419
* Return a cached result if a prior scrape for the same parameters exists and is
421420
* younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
422-
* omitted. Set to 0 to always scrape fresh.
421+
* omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
423422
*/
424423
maxAgeMs?: number;
425424

0 commit comments

Comments
 (0)