Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(vision): MCP write tools (#60165)

Kim Svatos Dugan2f7ddbfb9d9c
diff --git a/products/replay_vision/mcp/tools.yaml b/products/replay_vision/mcp/tools.yaml
index 2697aa17069a..1f5c62a2d346 100644
--- a/products/replay_vision/mcp/tools.yaml
+++ b/products/replay_vision/mcp/tools.yaml
@@ -17,10 +17,49 @@ tools:
enabled: false
vision-scanners-create:
operation: vision_scanners_create
- enabled: false
- vision-scanners-destroy:
+ enabled: true
+ scopes:
+ - replay_scanner:write
+ - session_recording:read
+ annotations:
+ readOnly: false
+ destructive: false
+ idempotent: false
+ title: Create replay vision scanner
+ description: >
+ Create a replay vision scanner. Pick a `scanner_type` — `monitor` (open-ended observations), `classifier`
+ (assign a tag from a fixed label set), `scorer` (numeric rubric), `summarizer` (free-text summary), or
+ `indexer` (structured extraction for embeddings) — and fill `scanner_config` to match:
+ monitor/classifier/scorer/summarizer need a `prompt`; classifiers also need `tags`; scorers also need
+ `scale`; indexers reject `prompt`. `query` is a `RecordingsQuery` shape that defines which sessions the
+ scanner watches — `date_from` and `date_to` are ignored (the schedule controls time). `sampling_rate` is a
+ 0..1 random downsample applied after the query matches (default 1.0). `model` chooses the LLM. Names must be
+ unique within the team.
+ exclude_params:
+ - id
+ - scanner_version
+ - last_swept_at
+ - created_at
+ - created_by
+ - updated_at
+ requires_ai_consent: true
+ feature_flag: replay-vision
+ vision-scanners-delete:
operation: vision_scanners_destroy
- enabled: false
+ enabled: true
+ scopes:
+ - replay_scanner:write
+ annotations:
+ readOnly: false
+ destructive: true
+ idempotent: true
+ title: Delete replay vision scanner
+ description: >
+ Permanently delete a replay vision scanner by ID. The scanner stops scanning immediately and its scheduled
+ Temporal jobs are removed by the reconciler. Past observations recorded by this scanner are deleted along
+ with it. Use sparingly — to stop a scanner without losing its history, set `enabled: false` via
+ `vision-scanners-update` instead.
+ feature_flag: replay-vision
vision-scanners-estimate-create:
operation: vision_scanners_estimate_create
enabled: false
@@ -117,3 +156,29 @@ tools:
you're examining.
requires_ai_consent: true
feature_flag: replay-vision
+ vision-scanners-update:
+ operation: vision_scanners_partial_update
+ enabled: true
+ scopes:
+ - replay_scanner:write
+ - session_recording:read
+ annotations:
+ readOnly: false
+ destructive: false
+ idempotent: true
+ title: Update replay vision scanner
+ description: >
+ Partially update a replay vision scanner by ID. Send only the fields you want to change. Common changes:
+ toggle `enabled` to pause/resume scanning, adjust `sampling_rate`, tweak the `scanner_config` prompt or
+ tags, or refine the `query` to watch a different slice of sessions. `scanner_type` is locked after creation
+ — to change it, delete and recreate. Editing any config field bumps `scanner_version`; existing observations
+ keep a snapshot of the previous config for reproducibility.
+ exclude_params:
+ - id
+ - scanner_version
+ - last_swept_at
+ - created_at
+ - created_by
+ - updated_at
+ requires_ai_consent: true
+ feature_flag: replay-vision
diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.json
index 2b4e0447ea91..daf0ef173565 100644
--- a/services/mcp/schema/generated-tool-definitions.json
+++ b/services/mcp/schema/generated-tool-definitions.json
@@ -5535,6 +5535,39 @@
"readOnlyHint": false
}
},
+ "vision-scanners-create": {
+ "description": "Create a replay vision scanner. Pick a `scanner_type` — `monitor` (open-ended observations), `classifier` (assign a tag from a fixed label set), `scorer` (numeric rubric), `summarizer` (free-text summary), or `indexer` (structured extraction for embeddings) — and fill `scanner_config` to match: monitor/classifier/scorer/summarizer need a `prompt`; classifiers also need `tags`; scorers also need `scale`; indexers reject `prompt`. `query` is a `RecordingsQuery` shape that defines which sessions the scanner watches — `date_from` and `date_to` are ignored (the schedule controls time). `sampling_rate` is a 0..1 random downsample applied after the query matches (default 1.0). `model` chooses the LLM. Names must be unique within the team.",
+ "category": "Replay vision",
+ "feature": "replay_vision",
+ "summary": "Create replay vision scanner",
+ "title": "Create replay vision scanner",
+ "required_scopes": ["replay_scanner:write", "session_recording:read"],
+ "new_mcp": true,
+ "annotations": {
+ "destructiveHint": false,
+ "idempotentHint": false,
+ "openWorldHint": true,
+ "readOnlyHint": false
+ },
+ "requires_ai_consent": true,
+ "feature_flag": "replay-vision"
+ },
+ "vision-scanners-delete": {
+ "description": "Permanently delete a replay vision scanner by ID. The scanner stops scanning immediately and its scheduled Temporal jobs are removed by the reconciler. Past observations recorded by this scanner are deleted along with it. Use sparingly — to stop a scanner without losing its history, set `enabled: false` via `vision-scanners-update` instead.",
+ "category": "Replay vision",
+ "feature": "replay_vision",
+ "summary": "Delete replay vision scanner",
+ "title": "Delete replay vision scanner",
+ "required_scopes": ["replay_scanner:write"],
+ "new_mcp": true,
+ "annotations": {
+ "destructiveHint": true,
+ "idempotentHint": true,
+ "openWorldHint": true,
+ "readOnlyHint": false
+ },
+ "feature_flag": "replay-vision"
+ },
"vision-scanners-get": {
"description": "Get a single replay vision scanner by ID. Returns the full configuration including `scanner_config` (the type-specific prompt and response schema parameters), the `RecordingsQuery` used to select sessions, and operational fields like `enabled`, `sampling_rate`, `provider`, `model`, `emits_signals`, `scanner_version`, and `last_swept_at`.",
"category": "Replay vision",
@@ -5616,6 +5649,23 @@
"requires_ai_consent": true,
"feature_flag": "replay-vision"
},
+ "vision-scanners-update": {
+ "description": "Partially update a replay vision scanner by ID. Send only the fields you want to change. Common changes: toggle `enabled` to pause/resume scanning, adjust `sampling_rate`, tweak the `scanner_config` prompt or tags, or refine the `query` to watch a different slice of sessions. `scanner_type` is locked after creation — to change it, delete and recreate. Editing any config field bumps `scanner_version`; existing observations keep a snapshot of the previous config for reproducibility.",
+ "category": "Replay vision",
+ "feature": "replay_vision",
+ "summary": "Update replay vision scanner",
+ "title": "Update replay vision scanner",
+ "required_scopes": ["replay_scanner:write", "session_recording:read"],
+ "new_mcp": true,
+ "annotations": {
+ "destructiveHint": false,
+ "idempotentHint": true,
+ "openWorldHint": true,
+ "readOnlyHint": false
+ },
+ "requires_ai_consent": true,
+ "feature_flag": "replay-vision"
+ },
"visual-review-repos-list": {
"description": "List visual review repos (test suites) for the current project. A repo typically maps to a GitHub repository and owns the baselines, runs, and tolerated hashes for that codebase. Returns repo id, external id, full name, baseline file paths, and pr-comment configuration.",
"category": "Visual review",
diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.json
index 409a7804ea08..cc2eed112ba7 100644
--- a/services/mcp/schema/tool-definitions-all.json
+++ b/services/mcp/schema/tool-definitions-all.json
@@ -6032,6 +6032,39 @@
"readOnlyHint": false
}
},
+ "vision-scanners-create": {
+ "description": "Create a replay vision scanner. Pick a `scanner_type` — `monitor` (open-ended observations), `classifier` (assign a tag from a fixed label set), `scorer` (numeric rubric), `summarizer` (free-text summary), or `indexer` (structured extraction for embeddings) — and fill `scanner_config` to match: monitor/classifier/scorer/summarizer need a `prompt`; classifiers also need `tags`; scorers also need `scale`; indexers reject `prompt`. `query` is a `RecordingsQuery` shape that defines which sessions the scanner watches — `date_from` and `date_to` are ignored (the schedule controls time). `sampling_rate` is a 0..1 random downsample applied after the query matches (default 1.0). `model` chooses the LLM. Names must be unique within the team.",
+ "category": "Replay vision",
+ "feature": "replay_vision",
+ "summary": "Create replay vision scanner",
+ "title": "Create replay vision scanner",
+ "required_scopes": ["replay_scanner:write", "session_recording:read"],
+ "new_mcp": true,
+ "annotations": {
+ "destructiveHint": false,
+ "idempotentHint": false,
+ "openWorldHint": true,
+ "readOnlyHint": false
+ },
+ "requires_ai_consent": true,
+ "feature_flag": "replay-vision"
+ },
+ "vision-scanners-delete": {
+ "description": "Permanently delete a replay vision scanner by ID. The scanner stops scanning immediately and its scheduled Temporal jobs are removed by the reconciler. Past observations recorded by this scanner are deleted along with it. Use sparingly — to stop a scanner without losing its history, set `enabled: false` via `vision-scanners-update` instead.",
+ "category": "Replay vision",
+ "feature": "replay_vision",
+ "summary": "Delete replay vision scanner",
+ "title": "Delete replay vision scanner",
+ "required_scopes": ["replay_scanner:write"],
+ "new_mcp": true,
+ "annotations": {
+ "destructiveHint": true,
+ "idempotentHint": true,
+ "openWorldHint": true,
+ "readOnlyHint": false
+ },
+ "feature_flag": "replay-vision"
+ },
"vision-scanners-get": {
"description": "Get a single replay vision scanner by ID. Returns the full configuration including `scanner_config` (the type-specific prompt and response schema parameters), the `RecordingsQuery` used to select sessions, and operational fields like `enabled`, `sampling_rate`, `provider`, `model`, `emits_signals`, `scanner_version`, and `last_swept_at`.",
"category": "Replay vision",
@@ -6113,6 +6146,23 @@
"requires_ai_consent": true,
"feature_flag": "replay-vision"
},
+ "vision-scanners-update": {
+ "description": "Partially update a replay vision scanner by ID. Send only the fields you want to change. Common changes: toggle `enabled` to pause/resume scanning, adjust `sampling_rate`, tweak the `scanner_config` prompt or tags, or refine the `query` to watch a different slice of sessions. `scanner_type` is locked after creation — to change it, delete and recreate. Editing any config field bumps `scanner_version`; existing observations keep a snapshot of the previous config for reproducibility.",
+ "category": "Replay vision",
+ "feature": "replay_vision",
+ "summary": "Update replay vision scanner",
+ "title": "Update replay vision scanner",
+ "required_scopes": ["replay_scanner:write", "session_recording:read"],
+ "new_mcp": true,
+ "annotations": {
+ "destructiveHint": false,
+ "idempotentHint": true,
+ "openWorldHint": true,
+ "readOnlyHint": false
+ },
+ "requires_ai_consent": true,
+ "feature_flag": "replay-vision"
+ },
"visual-review-repos-list": {
"description": "List visual review repos (test suites) for the current project. A repo typically maps to a GitHub repository and owns the baselines, runs, and tolerated hashes for that codebase. Returns repo id, external id, full name, baseline file paths, and pr-comment configuration.",
"category": "Visual review",
diff --git a/services/mcp/src/generated/replay_vision/api.ts b/services/mcp/src/generated/replay_vision/api.ts
index b95514683644..93070df1ce06 100644
--- a/services/mcp/src/generated/replay_vision/api.ts
+++ b/services/mcp/src/generated/replay_vision/api.ts
@@ -3,7 +3,7 @@
* MCP service uses these Zod schemas for generated tool handlers.
* To regenerate: hogli build:openapi
*
- * PostHog API - MCP 5 enabled ops
+ * PostHog API - MCP 8 enabled ops
* OpenAPI spec version: 1.0.0
*/
import * as zod from 'zod'
@@ -38,6 +38,78 @@ export const VisionScannersListQueryParams = /* @__PURE__ */ zod.object({
),
})
+/**
+ * CRUD for Replay Vision scanners.
+ */
+export const VisionScannersCreateParams = /* @__PURE__ */ zod.object({
+ project_id: zod
+ .string()
+ .describe(
+ "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."
+ ),
+})
+
+export const visionScannersCreateBodyNameMax = 255
+
+export const visionScannersCreateBodySamplingRateMin = 0
+export const visionScannersCreateBodySamplingRateMax = 1
+
+export const VisionScannersCreateBody = /* @__PURE__ */ zod.object({
+ name: zod
+ .string()
+ .max(visionScannersCreateBodyNameMax)
+ .describe('Human-readable scanner name. Unique within the team.'),
+ description: zod.string().optional().describe('Free-form description shown in the scanner management UI.'),
+ scanner_type: zod
+ .enum(['monitor', 'classifier', 'scorer', 'summarizer', 'indexer'])
+ .describe(
+ '* `monitor` - Monitor\n* `classifier` - Classifier\n* `scorer` - Scorer\n* `summarizer` - Summarizer\n* `indexer` - Indexer'
+ )
+ .describe(
+ 'What the scanner does: monitor, classifier, scorer, summarizer, or indexer.\n\n* `monitor` - Monitor\n* `classifier` - Classifier\n* `scorer` - Scorer\n* `summarizer` - Summarizer\n* `indexer` - Indexer'
+ ),
+ scanner_config: zod
+ .unknown()
+ .describe(
+ 'Type-specific configuration. Monitor/classifier/scorer/summarizer require `prompt`; classifiers add `tags`, scorers add `scale`. Indexer is fixed-task and rejects `prompt`.'
+ ),
+ query: zod
+ .unknown()
+ .optional()
+ .describe(
+ 'Persisted `RecordingsQuery` shape used to pick candidate sessions. `date_from`/`date_to` are stripped on save — the schedule controls time, not the user.'
+ ),
+ sampling_rate: zod
+ .number()
+ .min(visionScannersCreateBodySamplingRateMin)
+ .max(visionScannersCreateBodySamplingRateMax)
+ .optional()
+ .describe('0..1 random downsample applied after the query matches. Defaults to 1.0 (no downsampling).'),
+ provider: zod
+ .enum(['google'])
+ .describe('* `google` - Google')
+ .optional()
+ .describe('LLM provider. v1 is Google-only.\n\n* `google` - Google'),
+ model: zod
+ .enum(['gemini-3-flash-preview', 'gemini-3.1-flash-lite-preview'])
+ .describe(
+ '* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.1-flash-lite-preview` - Gemini 3 Flash Lite'
+ )
+ .describe(
+ 'Concrete model to use for this scanner.\n\n* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.1-flash-lite-preview` - Gemini 3 Flash Lite'
+ ),
+ enabled: zod
+ .boolean()
+ .optional()
+ .describe("When false, the reconciler removes the scanner's Temporal schedule. On-demand triggers still work."),
+ emits_signals: zod
+ .boolean()
+ .optional()
+ .describe(
+ 'When true, the prompt is augmented with the Signal side mission and the scanner emits PostHog Signals.'
+ ),
+})
+
/**
* CRUD for Replay Vision scanners.
*/
@@ -50,6 +122,95 @@ export const VisionScannersRetrieveParams = /* @__PURE__ */ zod.object({
),
})
+/**
+ * CRUD for Replay Vision scanners.
+ */
+export const VisionScannersPartialUpdateParams = /* @__PURE__ */ zod.object({
+ id: zod.string().describe('A UUID string identifying this replay scanner.'),
+ project_id: zod
+ .string()
+ .describe(
+ "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."
+ ),
+})
+
+export const visionScannersPartialUpdateBodyNameMax = 255
+
+export const visionScannersPartialUpdateBodySamplingRateMin = 0
+export const visionScannersPartialUpdateBodySamplingRateMax = 1
+
+export const VisionScannersPartialUpdateBody = /* @__PURE__ */ zod.object({
+ name: zod
+ .string()
+ .max(visionScannersPartialUpdateBodyNameMax)
+ .optional()
+ .describe('Human-readable scanner name. Unique within the team.'),
+ description: zod.string().optional().describe('Free-form description shown in the scanner management UI.'),
+ scanner_type: zod
+ .enum(['monitor', 'classifier', 'scorer', 'summarizer', 'indexer'])
+ .describe(
+ '* `monitor` - Monitor\n* `classifier` - Classifier\n* `scorer` - Scorer\n* `summarizer` - Summarizer\n* `indexer` - Indexer'
+ )
+ .optional()
+ .describe(
+ 'What the scanner does: monitor, classifier, scorer, summarizer, or indexer.\n\n* `monitor` - Monitor\n* `classifier` - Classifier\n* `scorer` - Scorer\n* `summarizer` - Summarizer\n* `indexer` - Indexer'
+ ),
+ scanner_config: zod
+ .unknown()
+ .optional()
+ .describe(
+ 'Type-specific configuration. Monitor/classifier/scorer/summarizer require `prompt`; classifiers add `tags`, scorers add `scale`. Indexer is fixed-task and rejects `prompt`.'
+ ),
+ query: zod
+ .unknown()
+ .optional()
+ .describe(
+ 'Persisted `RecordingsQuery` shape used to pick candidate sessions. `date_from`/`date_to` are stripped on save — the schedule controls time, not the user.'
+ ),
+ sampling_rate: zod
+ .number()
+ .min(visionScannersPartialUpdateBodySamplingRateMin)
+ .max(visionScannersPartialUpdateBodySamplingRateMax)
+ .optional()
+ .describe('0..1 random downsample applied after the query matches. Defaults to 1.0 (no downsampling).'),
+ provider: zod
+ .enum(['google'])
+ .describe('* `google` - Google')
+ .optional()
+ .describe('LLM provider. v1 is Google-only.\n\n* `google` - Google'),
+ model: zod
+ .enum(['gemini-3-flash-preview', 'gemini-3.1-flash-lite-preview'])
+ .describe(
+ '* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.1-flash-lite-preview` - Gemini 3 Flash Lite'
+ )
+ .optional()
+ .describe(
+ 'Concrete model to use for this scanner.\n\n* `gemini-3-flash-preview` - Gemini 3 Flash\n* `gemini-3.1-flash-lite-preview` - Gemini 3 Flash Lite'
+ ),
+ enabled: zod
+ .boolean()
+ .optional()
+ .describe("When false, the reconciler removes the scanner's Temporal schedule. On-demand triggers still work."),
+ emits_signals: zod
+ .boolean()
+ .optional()
+ .describe(
+ 'When true, the prompt is augmented with the Signal side mission and the scanner emits PostHog Signals.'
+ ),
+})
+
+/**
+ * CRUD for Replay Vision scanners.
+ */
+export const VisionScannersDestroyParams = /* @__PURE__ */ zod.object({
+ id: zod.string().describe('A UUID string identifying this replay scanner.'),
+ project_id: zod
+ .string()
+ .describe(
+ "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."
+ ),
+})
+
/**
* Apply this scanner to one specific session, on demand. Returns 202 with the workflow handle.
*/
diff --git a/services/mcp/src/tools/generated/replay_vision.ts b/services/mcp/src/tools/generated/replay_vision.ts
index 29b0c03a3296..a7c31d693d31 100644
--- a/services/mcp/src/tools/generated/replay_vision.ts
+++ b/services/mcp/src/tools/generated/replay_vision.ts
@@ -3,17 +3,83 @@ import { z } from 'zod'
import type { Schemas } from '@/api/generated'
import {
+ VisionScannersCreateBody,
+ VisionScannersDestroyParams,
VisionScannersListQueryParams,
VisionScannersObservationsListParams,
VisionScannersObservationsListQueryParams,
VisionScannersObservationsRetrieveParams,
VisionScannersObserveCreateBody,
VisionScannersObserveCreateParams,
+ VisionScannersPartialUpdateBody,
+ VisionScannersPartialUpdateParams,
VisionScannersRetrieveParams,
} from '@/generated/replay_vision/api'
import { withPostHogUrl, type WithPostHogUrl } from '@/tools/tool-utils'
import type { Context, ToolBase, ZodObjectAny } from '@/tools/types'
+const VisionScannersCreateSchema = VisionScannersCreateBody
+
+const visionScannersCreate = (): ToolBase<typeof VisionScannersCreateSchema, Schemas.ReplayScanner> => ({
+ name: 'vision-scanners-create',
+ schema: VisionScannersCreateSchema,
+ handler: async (context: Context, params: z.infer<typeof VisionScannersCreateSchema>) => {
+ const projectId = await context.stateManager.getProjectId()
+ const body: Record<string, unknown> = {}
+ if (params.name !== undefined) {
+ body['name'] = params.name
+ }
+ if (params.description !== undefined) {
+ body['description'] = params.description
+ }
+ if (params.scanner_type !== undefined) {
+ body['scanner_type'] = params.scanner_type
+ }
+ if (params.scanner_config !== undefined) {
+ body['scanner_config'] = params.scanner_config
+ }
+ if (params.query !== undefined) {
+ body['query'] = params.query
+ }
+ if (params.sampling_rate !== undefined) {
+ body['sampling_rate'] = params.sampling_rate
+ }
+ if (params.provider !== undefined) {
+ body['provider'] = params.provider
+ }
+ if (params.model !== undefined) {
+ body['model'] = params.model
+ }
+ if (params.enabled !== undefined) {
+ body['enabled'] = params.enabled
+ }
+ if (params.emits_signals !== undefined) {
+ body['emits_signals'] = params.emits_signals
+ }
+ const result = await context.api.request<Schemas.ReplayScanner>({
+ method: 'POST',
+ path: `/api/environments/${encodeURIComponent(String(projectId))}/vision/scanners/`,
+ body,
+ })
+ return result
+ },
+})
+
+const VisionScannersDeleteSchema = VisionScannersDestroyParams.omit({ project_id: true })
+
+const visionScannersDelete = (): ToolBase<typeof VisionScannersDeleteSchema, unknown> => ({
+ name: 'vision-scanners-delete',
+ schema: VisionScannersDeleteSchema,
+ handler: async (context: Context, params: z.infer<typeof VisionScannersDeleteSchema>) => {
+ const projectId = await context.stateManager.getProjectId()
+ const result = await context.api.request<unknown>({
+ method: 'DELETE',
+ path: `/api/environments/${encodeURIComponent(String(projectId))}/vision/scanners/${encodeURIComponent(String(params.id))}/`,
+ })
+ return result
+ },
+})
+
const VisionScannersGetSchema = VisionScannersRetrieveParams.omit({ project_id: true })
const visionScannersGet = (): ToolBase<typeof VisionScannersGetSchema, Schemas.ReplayScanner> => ({
@@ -123,10 +189,62 @@ const visionScannersScanSession = (): ToolBase<typeof VisionScannersScanSessionS
},
})
+const VisionScannersUpdateSchema = VisionScannersPartialUpdateParams.omit({ project_id: true }).extend(
+ VisionScannersPartialUpdateBody.shape
+)
+
+const visionScannersUpdate = (): ToolBase<typeof VisionScannersUpdateSchema, Schemas.ReplayScanner> => ({
+ name: 'vision-scanners-update',
+ schema: VisionScannersUpdateSchema,
+ handler: async (context: Context, params: z.infer<typeof VisionScannersUpdateSchema>) => {
+ const projectId = await context.stateManager.getProjectId()
+ const body: Record<string, unknown> = {}
+ if (params.name !== undefined) {
+ body['name'] = params.name
+ }
+ if (params.description !== undefined) {
+ body['description'] = params.description
+ }
+ if (params.scanner_type !== undefined) {
+ body['scanner_type'] = params.scanner_type
+ }
+ if (params.scanner_config !== undefined) {
+ body['scanner_config'] = params.scanner_config
+ }
+ if (params.query !== undefined) {
+ body['query'] = params.query
+ }
+ if (params.sampling_rate !== undefined) {
+ body['sampling_rate'] = params.sampling_rate
+ }
+ if (params.provider !== undefined) {
+ body['provider'] = params.provider
+ }
+ if (params.model !== undefined) {
+ body['model'] = params.model
+ }
+ if (params.enabled !== undefined) {
+ body['enabled'] = params.enabled
+ }
+ if (params.emits_signals !== undefined) {
+ body['emits_signals'] = params.emits_signals
+ }
+ const result = await context.api.request<Schemas.ReplayScanner>({
+ method: 'PATCH',
+ path: `/api/environments/${encodeURIComponent(String(projectId))}/vision/scanners/${encodeURIComponent(String(params.id))}/`,
+ body,
+ })
+ return result
+ },
+})
+
export const GENERATED_TOOLS: Record<string, () => ToolBase<ZodObjectAny>> = {
+ 'vision-scanners-create': visionScannersCreate,
+ 'vision-scanners-delete': visionScannersDelete,
'vision-scanners-get': visionScannersGet,
'vision-scanners-list': visionScannersList,
'vision-scanners-observations-get': visionScannersObservationsGet,
'vision-scanners-observations-list': visionScannersObservationsList,
'vision-scanners-scan-session': visionScannersScanSession,
+ 'vision-scanners-update': visionScannersUpdate,
}