Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.38.0"
".": "1.39.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 25
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-2460611c25145e2ca049b14c32be0f9ac9f4ded0b95154d29a83b4a6c1453f3e.yml
openapi_spec_hash: ab3a6473e575381cacd245bf54dcf0f7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-4903d5902cec6a80f42b9adaa9cf0defa9805ff22d7ae96970d209a4f867e195.yml
openapi_spec_hash: 1097891c23530dfe0155f23170daf973
config_hash: c7b0cdaba3b9797b77efd89e1754d803
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.39.0 (2026-06-25)

Full Changelog: [v1.38.0...v1.39.0](https://github.com/context-dot-dev/context-typescript-sdk/compare/v1.38.0...v1.39.0)

### Features

* **api:** api update ([ad70731](https://github.com/context-dot-dev/context-typescript-sdk/commit/ad707314e9e2489155fa0286ec783998aa178256))

## 1.38.0 (2026-06-22)

Full Changelog: [v1.37.0...v1.38.0](https://github.com/context-dot-dev/context-typescript-sdk/compare/v1.37.0...v1.38.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context.dev",
"version": "1.38.0",
"version": "1.39.0",
"description": "The official TypeScript library for the Context Dev API",
"author": "Context Dev <hello@context.dev>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dxt_version": "0.2",
"name": "context.dev-mcp",
"version": "1.38.0",
"version": "1.39.0",
"description": "The official MCP Server for the Context Dev API",
"author": {
"name": "Context Dev",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "context.dev-mcp",
"version": "1.38.0",
"version": "1.39.0",
"description": "The official MCP Server for the Context Dev API",
"author": "Context Dev <hello@context.dev>",
"types": "dist/index.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions packages/mcp-server/src/local-docs-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
"handleCookiePopup?: 'true' | 'false';",
'maxAgeMs?: number;',
"page?: 'login' | 'signup' | 'blog' | 'careers' | 'pricing' | 'terms' | 'privacy' | 'contact';",
'scrollOffset?: number;',
'timeoutMS?: number;',
'viewport?: { height?: number; width?: number; };',
'waitForMs?: number;',
],
response:
"{ code?: number; domain?: string; height?: number; key_metadata?: { credits_consumed: number; credits_remaining: number; }; screenshot?: string; screenshotType?: 'viewport' | 'fullPage'; status?: string; width?: number; }",
markdown:
"## screenshot\n\n`client.web.screenshot(directUrl?: string, domain?: string, fullScreenshot?: 'true' | 'false', handleCookiePopup?: 'true' | 'false', maxAgeMs?: number, page?: 'login' | 'signup' | 'blog' | 'careers' | 'pricing' | 'terms' | 'privacy' | 'contact', timeoutMS?: number, viewport?: { height?: number; width?: number; }, waitForMs?: number): { code?: number; domain?: string; height?: number; key_metadata?: object; screenshot?: string; screenshotType?: 'viewport' | 'fullPage'; status?: string; width?: number; }`\n\n**get** `/web/screenshot`\n\nCapture a screenshot of a website.\n\n### Parameters\n\n- `directUrl?: string`\n A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https://example.com/pricing'). When provided, the screenshot is taken of this exact URL. You must provide either 'domain' or 'directUrl', but not both.\n\n- `domain?: string`\n Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. You must provide either 'domain' or 'directUrl', but not both.\n\n- `fullScreenshot?: 'true' | 'false'`\n Optional parameter to determine screenshot type. If 'true', takes a full page screenshot capturing all content. If 'false' or not provided, takes a viewport screenshot (standard browser view).\n\n- `handleCookiePopup?: 'true' | 'false'`\n Optional parameter to control cookie/consent popup handling. If 'true', we dismiss cookie banner before capture. If 'false' or not provided, captures the page without that step.\n\n- `maxAgeMs?: number`\n Return a cached screenshot if a prior screenshot 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 capture fresh.\n\n- `page?: 'login' | 'signup' | 'blog' | 'careers' | 'pricing' | 'terms' | 'privacy' | 'contact'`\n Optional parameter to specify which page type to screenshot. If provided, the system will scrape the domain's links and use heuristics to find the most appropriate URL for the specified page type (30 supported languages). If not provided, screenshots the main domain landing page. Only applicable when using 'domain', not 'directUrl'.\n\n- `timeoutMS?: number`\n Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).\n\n- `viewport?: { height?: number; width?: number; }`\n Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.\n - `height?: number`\n Viewport height in pixels.\n - `width?: number`\n Viewport width in pixels.\n\n- `waitForMs?: number`\n Optional browser wait time in milliseconds after initial page load before taking the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when omitted.\n\n### Returns\n\n- `{ code?: number; domain?: string; height?: number; key_metadata?: { credits_consumed: number; credits_remaining: number; }; screenshot?: string; screenshotType?: 'viewport' | 'fullPage'; status?: string; width?: number; }`\n\n - `code?: number`\n - `domain?: string`\n - `height?: number`\n - `key_metadata?: { credits_consumed: number; credits_remaining: number; }`\n - `screenshot?: string`\n - `screenshotType?: 'viewport' | 'fullPage'`\n - `status?: string`\n - `width?: number`\n\n### Example\n\n```typescript\nimport ContextDev from 'context.dev';\n\nconst client = new ContextDev();\n\nconst response = await client.web.screenshot();\n\nconsole.log(response);\n```",
"## screenshot\n\n`client.web.screenshot(directUrl?: string, domain?: string, fullScreenshot?: 'true' | 'false', handleCookiePopup?: 'true' | 'false', maxAgeMs?: number, page?: 'login' | 'signup' | 'blog' | 'careers' | 'pricing' | 'terms' | 'privacy' | 'contact', scrollOffset?: number, timeoutMS?: number, viewport?: { height?: number; width?: number; }, waitForMs?: number): { code?: number; domain?: string; height?: number; key_metadata?: object; screenshot?: string; screenshotType?: 'viewport' | 'fullPage'; status?: string; width?: number; }`\n\n**get** `/web/screenshot`\n\nCapture a screenshot of a website.\n\n### Parameters\n\n- `directUrl?: string`\n A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https://example.com/pricing'). When provided, the screenshot is taken of this exact URL. You must provide either 'domain' or 'directUrl', but not both.\n\n- `domain?: string`\n Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. You must provide either 'domain' or 'directUrl', but not both.\n\n- `fullScreenshot?: 'true' | 'false'`\n Optional parameter to determine screenshot type. If 'true', takes a full page screenshot capturing all content. If 'false' or not provided, takes a viewport screenshot (standard browser view).\n\n- `handleCookiePopup?: 'true' | 'false'`\n Optional parameter to control cookie/consent popup handling. If 'true', we dismiss cookie banner before capture. If 'false' or not provided, captures the page without that step.\n\n- `maxAgeMs?: number`\n Return a cached screenshot if a prior screenshot 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 capture fresh.\n\n- `page?: 'login' | 'signup' | 'blog' | 'careers' | 'pricing' | 'terms' | 'privacy' | 'contact'`\n Optional parameter to specify which page type to screenshot. If provided, the system will scrape the domain's links and use heuristics to find the most appropriate URL for the specified page type (30 supported languages). If not provided, screenshots the main domain landing page. Only applicable when using 'domain', not 'directUrl'.\n\n- `scrollOffset?: number`\n Optional vertical scroll offset in pixels for capturing a long page in viewport-sized chunks. When provided, the full page is captured once and the returned image is the viewport-sized slice that begins at this Y offset (e.g. request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page top to bottom). The final slice may be shorter than the viewport height. Takes precedence over fullScreenshot. Max: 100000.\n\n- `timeoutMS?: number`\n Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).\n\n- `viewport?: { height?: number; width?: number; }`\n Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.\n - `height?: number`\n Viewport height in pixels.\n - `width?: number`\n Viewport width in pixels.\n\n- `waitForMs?: number`\n Optional browser wait time in milliseconds after initial page load before taking the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when omitted.\n\n### Returns\n\n- `{ code?: number; domain?: string; height?: number; key_metadata?: { credits_consumed: number; credits_remaining: number; }; screenshot?: string; screenshotType?: 'viewport' | 'fullPage'; status?: string; width?: number; }`\n\n - `code?: number`\n - `domain?: string`\n - `height?: number`\n - `key_metadata?: { credits_consumed: number; credits_remaining: number; }`\n - `screenshot?: string`\n - `screenshotType?: 'viewport' | 'fullPage'`\n - `status?: string`\n - `width?: number`\n\n### Example\n\n```typescript\nimport ContextDev from 'context.dev';\n\nconst client = new ContextDev();\n\nconst response = await client.web.screenshot();\n\nconsole.log(response);\n```",
perLanguage: {
typescript: {
method: 'client.web.screenshot',
Expand Down Expand Up @@ -338,7 +339,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
php: {
method: 'web->screenshot',
example:
"<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->web->screenshot(\n directURL: 'https://example.com',\n domain: 'domain',\n fullScreenshot: 'true',\n handleCookiePopup: 'true',\n maxAgeMs: 0,\n page: 'login',\n timeoutMs: 1000,\n viewport: ['height' => 240, 'width' => 240],\n waitForMs: 0,\n);\n\nvar_dump($response);",
"<?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\n$client = new Client(apiKey: 'My API Key');\n\n$response = $client->web->screenshot(\n directURL: 'https://example.com',\n domain: 'domain',\n fullScreenshot: 'true',\n handleCookiePopup: 'true',\n maxAgeMs: 0,\n page: 'login',\n scrollOffset: 0,\n timeoutMs: 1000,\n viewport: ['height' => 240, 'width' => 240],\n waitForMs: 0,\n);\n\nvar_dump($response);",
},
http: {
example:
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const newMcpServer = async ({
new McpServer(
{
name: 'context_dev_api',
version: '1.38.0',
version: '1.39.0',
},
{
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
Expand Down
10 changes: 10 additions & 0 deletions src/resources/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2096,6 +2096,16 @@ export interface WebScreenshotParams {
*/
page?: 'login' | 'signup' | 'blog' | 'careers' | 'pricing' | 'terms' | 'privacy' | 'contact';

/**
* Optional vertical scroll offset in pixels for capturing a long page in
* viewport-sized chunks. When provided, the full page is captured once and the
* returned image is the viewport-sized slice that begins at this Y offset (e.g.
* request scrollOffset=0, then 1080, then 2160 to walk a 1920x1080 landing page
* top to bottom). The final slice may be shorter than the viewport height. Takes
* precedence over fullScreenshot. Max: 100000.
*/
scrollOffset?: number;

/**
* Optional timeout in milliseconds for the request. If the request takes longer
* than this value, it will be aborted with a 408 status code. Maximum allowed
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '1.38.0'; // x-release-please-version
export const VERSION = '1.39.0'; // x-release-please-version
1 change: 1 addition & 0 deletions tests/api-resources/web.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ describe('resource web', () => {
handleCookiePopup: 'true',
maxAgeMs: 0,
page: 'login',
scrollOffset: 0,
timeoutMS: 1000,
viewport: { height: 240, width: 240 },
waitForMs: 0,
Expand Down
Loading