: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(mcp): route widget setting edits away from dashboard-update (#120099)
Thomas Obermüller392bcdef24e0
diff --git a/.agents/skills/manage-dashboard-widgets/references/mcp.md b/.agents/skills/manage-dashboard-widgets/references/mcp.mdindex 2294b00f5270..d7799dadbaee 100644--- a/.agents/skills/manage-dashboard-widgets/references/mcp.md+++ b/.agents/skills/manage-dashboard-widgets/references/mcp.md@@ -6,17 +6,18 @@ Tool config: `products/dashboards/mcp/tools.yaml` — regenerate MCP handlers af## Tool map-| Goal | MCP tool | Notes |-| ------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------- |-| Discover widget types + config schema | `dashboard-widget-catalog-list` | Read-only catalog; per-type `config_schema` = Pydantic JSON schema (bounds, choices, defaults) |-| Read dashboard tiles + widget config | `dashboard-get` | Widget tiles have `widget.widget_type` and `widget.config`; no live data |-| Add widget tile(s) | `dashboard-widgets-batch-add` | Atomic batch via `POST .../widgets/batch/` (1–10 tiles; one tile = single-element `widgets`) |-| Update widget tile(s) | `dashboard-update` | PATCH dashboard with `tiles[]`: each tile `id` + `widget.id` + fields to change |-| Run widget queries | `dashboard-widgets-run` | Query: `tile_ids` comma-separated from dashboard-get |-| Copy widget tile to another dashboard | `dashboard-tile-copy` | Deep-clones widget; destination is path dashboard ID |-| Move widget tile between dashboards | `dashboards-move-tile-partial-update` | Source dashboard is path `id`; pass `to_dashboard` and `tile.id` from dashboard-get |--There is no dedicated single-tile create or per-tile `PATCH .../widgets/:tile_id/` REST endpoint — the UI and MCP use batch add and dashboard PATCH respectively.+| Goal | MCP tool | Notes |+| ------------------------------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------- |+| Discover widget types + config schema | `dashboard-widget-catalog-list` | Read-only catalog; per-type `config_schema` = Pydantic JSON schema (bounds, choices, defaults) |+| Read dashboard tiles + widget config | `dashboard-get` | Widget tiles have `widget.widget_type` and `widget.config`; no live data |+| Add widget tile(s) | `dashboard-widgets-batch-add` | Atomic batch via `POST .../widgets/batch/` (1–10 tiles; one tile = single-element `widgets`) |+| Update widget tile(s) | `dashboard-widgets-batch-update` | Atomic batch (1–10): each entry `tile_id` + the fields to change (`config`, `name`, `description`) |+| Resize or move widget tile(s) | `dashboard-update` | PATCH dashboard with `tiles[]`: each tile `id` + `layouts`; it does not change widget settings |+| Run widget queries | `dashboard-widgets-run` | Query: `tile_ids` comma-separated from dashboard-get |+| Copy widget tile to another dashboard | `dashboard-tile-copy` | Deep-clones widget; destination is path dashboard ID |+| Move widget tile between dashboards | `dashboards-move-tile-partial-update` | Source dashboard is path `id`; pass `to_dashboard` and `tile.id` from dashboard-get |++There is no dedicated single-tile create or per-tile `PATCH .../widgets/:tile_id/` REST endpoint. MCP uses the batch endpoints for both. The UI adds with the batch endpoint and edits widget settings through the dashboard PATCH with a nested `widget`, which the `dashboard-update` MCP tool does not expose.## Typical agent flow@@ -25,7 +26,7 @@ There is no dedicated single-tile create or per-tile `PATCH .../widgets/:tile_id3. `dashboard-get` — confirm tile ID(s), widget row `id`, and layout4. `dashboard-widgets-run` — fetch live widget data for `tile_ids` (private dashboards only — public/shared views do not call `run_widgets`)-For updates: `dashboard-update` with `tiles` containing `{ id, widget: { id, config?, name?, description? } }`, then `dashboard-widgets-run` when live data should refresh.+For updates: `dashboard-widgets-batch-update` with `widgets` containing `{ tile_id, config?, name?, description? }`, then `dashboard-widgets-run` when live data should refresh. A `config` update merges into the stored config.Multi-tile add from the UI uses `POST .../widgets/batch/` (`addWidgetTiles`), same as MCP batch add.@@ -35,7 +36,8 @@ Multi-tile add from the UI uses `POST .../widgets/batch/` (`addWidgetTiles`), sa| ------------------------------------- | ------------------------------------------------------------- || `dashboard-widget-catalog-list` | `GET .../dashboards/widget_catalog/` || `dashboard-widgets-batch-add` | `POST .../dashboards/:id/widgets/batch/` (1–10 tiles, atomic) |-| `dashboard-update` (widget tiles) | `PATCH .../dashboards/:id` with `tiles[]` and nested `widget` |+| `dashboard-widgets-batch-update` | `PATCH .../dashboards/:id/widgets/batch_update/` |+| `dashboard-update` (tile layout) | `PATCH .../dashboards/:id` with `tiles[]` and `layouts` || `dashboard-widgets-run` | `GET .../dashboards/:id/run_widgets/?tile_ids=` || `dashboard-tile-copy` | `POST .../dashboards/:id/copy_tile/` || `dashboards-move-tile-partial-update` | `PATCH .../dashboards/:id/move_tile/` |diff --git a/products/dashboards/mcp/tools.yaml b/products/dashboards/mcp/tools.yamlindex 73b93c1615f6..fb12f0b84536 100644--- a/products/dashboards/mcp/tools.yaml+++ b/products/dashboards/mcp/tools.yaml@@ -436,16 +436,14 @@ tools:replaces the tile's whole layout, so send a complete box, not just the value you want to change. Boxes arestored as sent and overlaps are not resolved, so plan the whole grid and send every tile you move in onerequest. Only set `layouts.sm`: the dashboard derives the mobile layout from the sm order and heights. Use- dashboard-reorder-tiles only to repack the whole dashboard with preserved or uniform tile sizes. The same- `tiles` array also updates a widget tile's own settings: add a nested `widget.id` from dashboard-get plus- the fields to change (`config`, `name`, `description`). That is the same PATCH path the UI uses, but prefer- dashboard-widgets-batch-update, which takes just a tile_id per widget. To group tiles, give each tile in the- group the same `group_key`, and set the group's title in `group_titles` (a map from group key to title,- which replaces the stored map). To mark a tile, set its `badge`: `winner` shows a crown, for example on the- best tile in a group, and `cheeky-hog` shows a hedgehog on hover. Set `badge` or `group_key` to null to- remove it. To add new widget tiles to this dashboard, use dashboard-widgets-batch-add instead. The returned- tiles omit insight results to save context — use dashboard-insights-run to fetch the actual data for each- insight.+ dashboard-reorder-tiles only to repack the whole dashboard with preserved or uniform tile sizes. This tool+ does not change a widget tile's own settings (`config`, `name`, `description`): use+ dashboard-widgets-batch-update for that. To group tiles, give each tile in the group the same `group_key`,+ and set the group's title in `group_titles` (a map from group key to title, which replaces the stored map).+ To mark a tile, set its `badge`: `winner` shows a crown, for example on the best tile in a group, and+ `cheeky-hog` shows a hedgehog on hover. Set `badge` or `group_key` to null to remove it. To add new widget+ tiles to this dashboard, use dashboard-widgets-batch-add instead. The returned tiles omit insight results to+ save context — use dashboard-insights-run to fetch the actual data for each insight.exclude_params:- creation_mode- is_shared@@ -455,9 +453,15 @@ tools:- persisted_filters- persisted_variables- _create_in_folder+ - tiles.*.widgetparam_overrides:id:cast: string-int+ tiles:+ description: >+ Dashboard tiles to update, each identified by its tile id. Any tile type accepts `layouts` to set+ its grid position and size. To change a widget tile's config, name, or description, use+ dashboard-widgets-batch-update.response:exclude:- user_access_leveldiff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex b491889f1cf7..49768cba2ee3 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -3870,7 +3870,7 @@}},"dashboard-update": {- "description": "Resize, reposition, or update dashboard tiles. It can also update the dashboard name, description, pinned status, tags, and filters. After you create or add insight tiles, call dashboard-get to get their tile IDs, then pass `tiles` with each tile's `id` and a `layouts` object holding x, y, w, and h per breakpoint. This works for every tile type, including insight tiles. The desktop grid (`layouts.sm`) is 12 columns wide. Set each tile's width and height for its content and importance. Width can be any whole number from 1 to 12, subject to the tile's minimum size. Mixed rows such as 8-wide and 4-wide tiles can show hierarchy. A write replaces the tile's whole layout, so send a complete box, not just the value you want to change. Boxes are stored as sent and overlaps are not resolved, so plan the whole grid and send every tile you move in one request. Only set `layouts.sm`: the dashboard derives the mobile layout from the sm order and heights. Use dashboard-reorder-tiles only to repack the whole dashboard with preserved or uniform tile sizes. The same `tiles` array also updates a widget tile's own settings: add a nested `widget.id` from dashboard-get plus the fields to change (`config`, `name`, `description`). That is the same PATCH path the UI uses, but prefer dashboard-widgets-batch-update, which takes just a tile_id per widget. To group tiles, give each tile in the group the same `group_key`, and set the group's title in `group_titles` (a map from group key to title, which replaces the stored map). To mark a tile, set its `badge`: `winner` shows a crown, for example on the best tile in a group, and `cheeky-hog` shows a hedgehog on hover. Set `badge` or `group_key` to null to remove it. To add new widget tiles to this dashboard, use dashboard-widgets-batch-add instead. The returned tiles omit insight results to save context — use dashboard-insights-run to fetch the actual data for each insight.",+ "description": "Resize, reposition, or update dashboard tiles. It can also update the dashboard name, description, pinned status, tags, and filters. After you create or add insight tiles, call dashboard-get to get their tile IDs, then pass `tiles` with each tile's `id` and a `layouts` object holding x, y, w, and h per breakpoint. This works for every tile type, including insight tiles. The desktop grid (`layouts.sm`) is 12 columns wide. Set each tile's width and height for its content and importance. Width can be any whole number from 1 to 12, subject to the tile's minimum size. Mixed rows such as 8-wide and 4-wide tiles can show hierarchy. A write replaces the tile's whole layout, so send a complete box, not just the value you want to change. Boxes are stored as sent and overlaps are not resolved, so plan the whole grid and send every tile you move in one request. Only set `layouts.sm`: the dashboard derives the mobile layout from the sm order and heights. Use dashboard-reorder-tiles only to repack the whole dashboard with preserved or uniform tile sizes. This tool does not change a widget tile's own settings (`config`, `name`, `description`): use dashboard-widgets-batch-update for that. To group tiles, give each tile in the group the same `group_key`, and set the group's title in `group_titles` (a map from group key to title, which replaces the stored map). To mark a tile, set its `badge`: `winner` shows a crown, for example on the best tile in a group, and `cheeky-hog` shows a hedgehog on hover. Set `badge` or `group_key` to null to remove it. To add new widget tiles to this dashboard, use dashboard-widgets-batch-add instead. The returned tiles omit insight results to save context — use dashboard-insights-run to fetch the actual data for each insight.","category": "Dashboards","feature": "dashboards","summary": "Update dashboard",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 49f38601afb8..3d4d920b6bf8 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -3885,7 +3885,7 @@}},"dashboard-update": {- "description": "Resize, reposition, or update dashboard tiles. It can also update the dashboard name, description, pinned status, tags, and filters. After you create or add insight tiles, call dashboard-get to get their tile IDs, then pass `tiles` with each tile's `id` and a `layouts` object holding x, y, w, and h per breakpoint. This works for every tile type, including insight tiles. The desktop grid (`layouts.sm`) is 12 columns wide. Set each tile's width and height for its content and importance. Width can be any whole number from 1 to 12, subject to the tile's minimum size. Mixed rows such as 8-wide and 4-wide tiles can show hierarchy. A write replaces the tile's whole layout, so send a complete box, not just the value you want to change. Boxes are stored as sent and overlaps are not resolved, so plan the whole grid and send every tile you move in one request. Only set `layouts.sm`: the dashboard derives the mobile layout from the sm order and heights. Use dashboard-reorder-tiles only to repack the whole dashboard with preserved or uniform tile sizes. The same `tiles` array also updates a widget tile's own settings: add a nested `widget.id` from dashboard-get plus the fields to change (`config`, `name`, `description`). That is the same PATCH path the UI uses, but prefer dashboard-widgets-batch-update, which takes just a tile_id per widget. To group tiles, give each tile in the group the same `group_key`, and set the group's title in `group_titles` (a map from group key to title, which replaces the stored map). To mark a tile, set its `badge`: `winner` shows a crown, for example on the best tile in a group, and `cheeky-hog` shows a hedgehog on hover. Set `badge` or `group_key` to null to remove it. To add new widget tiles to this dashboard, use dashboard-widgets-batch-add instead. The returned tiles omit insight results to save context — use dashboard-insights-run to fetch the actual data for each insight.",+ "description": "Resize, reposition, or update dashboard tiles. It can also update the dashboard name, description, pinned status, tags, and filters. After you create or add insight tiles, call dashboard-get to get their tile IDs, then pass `tiles` with each tile's `id` and a `layouts` object holding x, y, w, and h per breakpoint. This works for every tile type, including insight tiles. The desktop grid (`layouts.sm`) is 12 columns wide. Set each tile's width and height for its content and importance. Width can be any whole number from 1 to 12, subject to the tile's minimum size. Mixed rows such as 8-wide and 4-wide tiles can show hierarchy. A write replaces the tile's whole layout, so send a complete box, not just the value you want to change. Boxes are stored as sent and overlaps are not resolved, so plan the whole grid and send every tile you move in one request. Only set `layouts.sm`: the dashboard derives the mobile layout from the sm order and heights. Use dashboard-reorder-tiles only to repack the whole dashboard with preserved or uniform tile sizes. This tool does not change a widget tile's own settings (`config`, `name`, `description`): use dashboard-widgets-batch-update for that. To group tiles, give each tile in the group the same `group_key`, and set the group's title in `group_titles` (a map from group key to title, which replaces the stored map). To mark a tile, set its `badge`: `winner` shows a crown, for example on the best tile in a group, and `cheeky-hog` shows a hedgehog on hover. Set `badge` or `group_key` to null to remove it. To add new widget tiles to this dashboard, use dashboard-widgets-batch-add instead. The returned tiles omit insight results to save context — use dashboard-insights-run to fetch the actual data for each insight.","category": "Dashboards","feature": "dashboards","summary": "Update dashboard",diff --git a/services/mcp/src/generated/dashboards/api.ts b/services/mcp/src/generated/dashboards/api.tsindex b01ca0964d7f..b934b8a28e68 100644--- a/services/mcp/src/generated/dashboards/api.ts+++ b/services/mcp/src/generated/dashboards/api.ts@@ -273,64 +273,6 @@ export const dashboardsPartialUpdateBodyTilesItemLayoutsOneXsOneWMax = 12export const dashboardsPartialUpdateBodyTilesItemGroupKeyMax = 100-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneOneNotebookShortIdOneMax = 128--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoLimitDefault = 25-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoLimitMax = 50--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemKeyMax = 400--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemLabelOneMax = 400--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemValueOneItemOneMax = 4000--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemValueOneMax = 100--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemValueTwoMax = 4000--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneMax = 20--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeLimitDefault = 10-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeLimitMax = 25--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeOrderByDefault = `occurrences`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeOrderDirectionDefault = `DESC`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeStatusDefault = `active`--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFourLimitDefault = 10-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFourLimitMax = 25--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFourOrderByDefault = `start_time`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFourOrderDirectionDefault = `DESC`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveLimitDefault = 10-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveLimitMax = 25--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveOrderByDefault = `created_at`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveOrderDirectionDefault = `DESC`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveStatusDefault = `all`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenLimitDefault = 10-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenLimitMax = 25--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitDefault = 50-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitMax = 100--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightOrderByDefault = `latest`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightWrapLinesDefault = false-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightTimezoneDefault = `UTC`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineLimitDefault = 10-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineLimitMax = 25--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineStatusDefault = `all`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineChannelDefault = `all`-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineAssigneesMax = 100--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineSearchDefault = ``-export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineSearchMax = 200--export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineSavedViewIdOneMax = 12--export const dashboardsPartialUpdateBodyTilesItemWidgetOneNameMax = 400-export const DashboardsPartialUpdateBody = () => zod.object({name: zod.string().max(dashboardsPartialUpdateBodyNameMax).nullish(),@@ -510,748 +452,6 @@ export const DashboardsPartialUpdateBody = () => zod.describe('Badge on the tile. winner shows a crown in the top left corner, for example to mark the best tile in a group. cheeky-hog shows a hedgehog when a person hovers over the tile. Null removes the badge. More than one tile in a group can have the winner badge.\n\n\* `winner` - Winner\n\* `cheeky-hog` - Cheeky hog'),- widget: zod- .object({- id: zod- .string()- .optional()- .describe('Existing widget row ID when updating a widget tile via dashboard PATCH.'),- widget_type: zod- .enum([- 'activity_events_list',- 'canvas_app',- 'conversations_recent_tickets',- 'error_tracking_list',- 'experiment_results',- 'experiments_list',- 'logs_list',- 'notebook_widget',- 'session_replay_list',- 'survey_results',- ])- .describe(- '\* `activity_events_list` - activity_events_list\n\* `canvas_app` - canvas_app\n\* `conversations_recent_tickets` - conversations_recent_tickets\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `notebook_widget` - notebook_widget\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results'- )- .optional()- .describe(- 'Widget type identifier (cannot be changed on update).\n\n\* `activity_events_list` - activity_events_list\n\* `canvas_app` - canvas_app\n\* `conversations_recent_tickets` - conversations_recent_tickets\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `notebook_widget` - notebook_widget\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results'- ),- config: zod- .union([- zod.object({- notebookShortId: zod- .union([- zod- .string()- .min(1)- .max(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneOneNotebookShortIdOneMax- ),- zod.null(),- ])- .optional()- .describe('Source notebook short ID.'),- snapshotId: zod- .union([zod.string(), zod.null()])- .optional()- .describe(- "Immutable notebook widget snapshot. Add one from a notebook widget's menu."- ),- }),- zod.object({- dateRange: zod- .union([- zod.object({- date_from: zod- .union([- zod.enum([- '-1M',- '-30M',- '-1h',- '-3h',- '-24h',- '-7d',- '-14d',- '-30d',- '-90d',- ]),- zod.null(),- ])- .optional(),- }),- zod.null(),- ])- .optional(),- filterTestAccounts: zod.union([zod.boolean(), zod.null()]).optional(),- widgetFilters: zod- .union([- zod.record(- zod.string(),- zod.object({- filterId: zod.string().min(1),- propertyName: zod.string().min(1),- optionId: zod.string().min(1),- operator: zod.enum([- 'exact',- 'is_not',- 'icontains',- 'not_icontains',- 'starts_with',- 'not_starts_with',- 'ends_with',- 'not_ends_with',- 'regex',- 'not_regex',- 'gt',- 'gte',- 'lt',- 'lte',- 'is_set',- 'is_not_set',- 'is_date_exact',- 'is_date_before',- 'is_date_after',- 'between',- 'not_between',- 'min',- 'max',- 'in',- 'not_in',- 'is_cleaned_path_exact',- 'is_cleaned_path_not_exact',- 'flag_evaluates_to',- 'semver_eq',- 'semver_neq',- 'semver_gt',- 'semver_gte',- 'semver_lt',- 'semver_lte',- 'semver_tilde',- 'semver_caret',- 'semver_wildcard',- 'icontains_multi',- 'not_icontains_multi',- ]),- value: zod- .union([zod.string(), zod.array(zod.string()), zod.null()])- .optional(),- })- ),- zod.null(),- ])- .optional(),- limit: zod- .number()- .min(1)- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoLimitMax)- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoLimitDefault- )- .describe('Maximum number of events to return.'),- eventName: zod- .union([zod.string().min(1), zod.null()])- .optional()- .describe(- 'Limit the feed to a single event name. Omit or null for all events.'- ),- properties: zod- .union([- zod- .array(- zod.object({- key: zod- .string()- .min(1)- .max(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemKeyMax- ),- label: zod- .union([- zod- .string()- .max(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemLabelOneMax- ),- zod.null(),- ])- .optional(),- operator: zod.enum([- 'exact',- 'is_not',- 'icontains',- 'not_icontains',- 'starts_with',- 'not_starts_with',- 'ends_with',- 'not_ends_with',- 'regex',- 'not_regex',- 'gt',- 'gte',- 'lt',- 'lte',- 'is_set',- 'is_not_set',- 'is_date_exact',- 'is_date_before',- 'is_date_after',- 'between',- 'not_between',- 'min',- 'max',- 'in',- 'not_in',- 'is_cleaned_path_exact',- 'is_cleaned_path_not_exact',- 'flag_evaluates_to',- 'semver_eq',- 'semver_neq',- 'semver_gt',- 'semver_gte',- 'semver_lt',- 'semver_lte',- 'semver_tilde',- 'semver_caret',- 'semver_wildcard',- 'icontains_multi',- 'not_icontains_multi',- ]),- type: zod.enum(['event', 'person']),- value: zod- .union([- zod- .array(- zod.union([- zod- .string()- .max(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemValueOneItemOneMax- ),- zod.number(),- zod.boolean(),- ])- )- .max(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemValueOneMax- ),- zod- .string()- .max(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneItemValueTwoMax- ),- zod.number(),- zod.boolean(),- zod.null(),- ])- .optional(),- })- )- .max(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneTwoPropertiesOneMax- ),- zod.null(),- ])- .optional()- .describe(- 'Event and person property filters, matching Activity > Explore events.'- ),- }),- zod.object({- dateRange: zod- .union([- zod.object({- date_from: zod- .union([- zod.enum([- '-1M',- '-30M',- '-1h',- '-3h',- '-24h',- '-7d',- '-14d',- '-30d',- '-90d',- ]),- zod.null(),- ])- .optional(),- }),- zod.null(),- ])- .optional(),- filterTestAccounts: zod.union([zod.boolean(), zod.null()]).optional(),- widgetFilters: zod- .union([- zod.record(- zod.string(),- zod.object({- filterId: zod.string().min(1),- propertyName: zod.string().min(1),- optionId: zod.string().min(1),- operator: zod.enum([- 'exact',- 'is_not',- 'icontains',- 'not_icontains',- 'starts_with',- 'not_starts_with',- 'ends_with',- 'not_ends_with',- 'regex',- 'not_regex',- 'gt',- 'gte',- 'lt',- 'lte',- 'is_set',- 'is_not_set',- 'is_date_exact',- 'is_date_before',- 'is_date_after',- 'between',- 'not_between',- 'min',- 'max',- 'in',- 'not_in',- 'is_cleaned_path_exact',- 'is_cleaned_path_not_exact',- 'flag_evaluates_to',- 'semver_eq',- 'semver_neq',- 'semver_gt',- 'semver_gte',- 'semver_lt',- 'semver_lte',- 'semver_tilde',- 'semver_caret',- 'semver_wildcard',- 'icontains_multi',- 'not_icontains_multi',- ]),- value: zod- .union([zod.string(), zod.array(zod.string()), zod.null()])- .optional(),- })- ),- zod.null(),- ])- .optional(),- limit: zod- .number()- .min(1)- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeLimitMax)- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeLimitDefault- )- .describe('Maximum number of issues to return.'),- orderBy: zod- .enum([- 'last_seen',- 'first_seen',- 'occurrences',- 'users',- 'sessions',- 'severity',- ])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeOrderByDefault- )- .describe('Issue ranking column.'),- orderDirection: zod- .enum(['ASC', 'DESC'])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeOrderDirectionDefault- )- .describe('Sort direction for orderBy.'),- status: zod- .enum([- 'archived',- 'active',- 'resolved',- 'pending_release',- 'suppressed',- 'all',- ])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneThreeStatusDefault- )- .describe('Issue status filter.'),- assignee: zod- .union([- zod.object({- id: zod.union([zod.string(), zod.number()]),- type: zod.enum(['user', 'role']),- }),- zod.null(),- ])- .optional()- .describe(- 'Filter by assignee ({type: user|role, id}). Omit for any assignee.'- ),- }),- zod.object({- dateRange: zod- .union([- zod.object({- date_from: zod- .union([- zod.enum([- '-1M',- '-30M',- '-1h',- '-3h',- '-24h',- '-7d',- '-14d',- '-30d',- '-90d',- ]),- zod.null(),- ])- .optional(),- }),- zod.null(),- ])- .optional(),- filterTestAccounts: zod.union([zod.boolean(), zod.null()]).optional(),- widgetFilters: zod- .union([- zod.record(- zod.string(),- zod.object({- filterId: zod.string().min(1),- propertyName: zod.string().min(1),- optionId: zod.string().min(1),- operator: zod.enum([- 'exact',- 'is_not',- 'icontains',- 'not_icontains',- 'starts_with',- 'not_starts_with',- 'ends_with',- 'not_ends_with',- 'regex',- 'not_regex',- 'gt',- 'gte',- 'lt',- 'lte',- 'is_set',- 'is_not_set',- 'is_date_exact',- 'is_date_before',- 'is_date_after',- 'between',- 'not_between',- 'min',- 'max',- 'in',- 'not_in',- 'is_cleaned_path_exact',- 'is_cleaned_path_not_exact',- 'flag_evaluates_to',- 'semver_eq',- 'semver_neq',- 'semver_gt',- 'semver_gte',- 'semver_lt',- 'semver_lte',- 'semver_tilde',- 'semver_caret',- 'semver_wildcard',- 'icontains_multi',- 'not_icontains_multi',- ]),- value: zod- .union([zod.string(), zod.array(zod.string()), zod.null()])- .optional(),- })- ),- zod.null(),- ])- .optional(),- limit: zod- .number()- .min(1)- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFourLimitMax)- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFourLimitDefault- )- .describe('Maximum number of recordings to return.'),- orderBy: zod- .enum([- 'start_time',- 'activity_score',- 'recording_duration',- 'duration',- 'click_count',- 'console_error_count',- ])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFourOrderByDefault- )- .describe('Recording ranking column.'),- orderDirection: zod- .enum(['ASC', 'DESC'])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFourOrderDirectionDefault- )- .describe('Sort direction for orderBy.'),- savedFilterId: zod- .union([zod.string(), zod.null()])- .optional()- .describe(- 'short_id of a saved session replay filter to refine the recordings shown. When set, the saved filter owns the date range and property filters; only orderBy, orderDirection, and limit still apply. Combine with collectionId to filter within a collection.'- ),- collectionId: zod- .union([zod.string(), zod.null()])- .optional()- .describe(- 'short_id of a session replay collection to scope the widget to its pinned recordings. Combine with savedFilterId or property filters to narrow within the collection; orderBy, orderDirection, and limit still apply.'- ),- }),- zod.object({- limit: zod- .number()- .min(1)- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveLimitMax)- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveLimitDefault- )- .describe('Maximum number of experiments to return.'),- orderBy: zod- .enum(['created_at', 'name', 'start_date'])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveOrderByDefault- )- .describe('Experiment list sort column.'),- orderDirection: zod- .enum(['ASC', 'DESC'])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveOrderDirectionDefault- )- .describe('Sort direction for orderBy.'),- status: zod- .enum(['draft', 'running', 'paused', 'exposure_frozen', 'stopped', 'all'])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneFiveStatusDefault- )- .describe('Experiment status filter.'),- createdBy: zod- .union([zod.number(), zod.null()])- .optional()- .describe('Filter by creator (user id). Omit for any creator.'),- }),- zod.object({- experimentId: zod- .union([zod.number(), zod.null()])- .optional()- .describe(- 'Experiment to show results for. Null until the user picks one in the widget settings.'- ),- }),- zod.object({- dateRange: zod- .union([- zod.object({- date_from: zod- .union([- zod.enum([- '-1M',- '-30M',- '-1h',- '-3h',- '-24h',- '-7d',- '-14d',- '-30d',- '-90d',- ]),- zod.null(),- ])- .optional(),- }),- zod.null(),- ])- .optional()- .describe("Null or omitted means all time (the survey's full lifetime)."),- surveyId: zod- .union([zod.string(), zod.null()])- .optional()- .describe(- 'Survey to show performance stats and recent responses for. Null until the user picks one.'- ),- limit: zod- .number()- .min(1)- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenLimitMax)- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenLimitDefault- )- .describe('Maximum number of recent responses to return.'),- }),- zod.object({- dateRange: zod- .union([- zod.object({- date_from: zod- .union([- zod.enum([- '-1M',- '-30M',- '-1h',- '-3h',- '-24h',- '-7d',- '-14d',- '-30d',- '-90d',- ]),- zod.null(),- ])- .optional(),- }),- zod.null(),- ])- .optional(),- limit: zod- .number()- .min(1)- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitMax)- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitDefault- )- .describe('Maximum number of log lines to return.'),- orderBy: zod- .enum(['latest', 'earliest'])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightOrderByDefault- )- .describe('Sort by newest (latest) or oldest (earliest) first.'),- severityLevels: zod- .array(zod.enum(['trace', 'debug', 'info', 'warn', 'error', 'fatal']))- .optional()- .describe(- 'Only show logs at these severity levels. Empty shows all levels.'- ),- serviceNames: zod- .array(zod.string())- .optional()- .describe('Only show logs from these services. Empty shows all services.'),- wrapLines: zod- .boolean()- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightWrapLinesDefault- )- .describe(- 'Wrap long log lines instead of truncating them to a single row.'- ),- timezone: zod- .enum(['UTC', 'local'])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightTimezoneDefault- )- .describe(- "Render log timestamps in UTC or in each viewer's local timezone."- ),- savedViewId: zod- .union([zod.string(), zod.null()])- .optional()- .describe(- 'short_id of a saved logs view to use as the source. When set, the saved view owns the date range, severity, service, and property filters; only orderBy and limit still apply.'- ),- }),- zod.object({- limit: zod- .number()- .min(1)- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineLimitMax)- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineLimitDefault- )- .describe('Maximum number of tickets to return.'),- status: zod- .enum(['new', 'open', 'pending', 'on_hold', 'resolved', 'all'])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineStatusDefault- )- .describe('Ticket status filter.'),- priorities: zod- .array(zod.enum(['low', 'medium', 'high', 'critical']))- .optional()- .describe(- 'Only show tickets with these priorities. Empty shows all priorities.'- ),- channel: zod- .enum(['widget', 'email', 'slack', 'teams', 'github', 'all'])- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineChannelDefault- )- .describe('Ticket channel filter.'),- assignees: zod- .array(- zod.union([- zod.enum(['me', 'unassigned']),- zod.object({- id: zod.union([zod.string(), zod.number()]),- type: zod.enum(['user', 'role']),- }),- ])- )- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineAssigneesMax)- .optional()- .describe(- "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees."- ),- search: zod- .string()- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineSearchMax)- .default(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineSearchDefault- )- .describe(- 'Search requester name or email, ticket subject, message text, or ticket number.'- ),- savedViewId: zod- .union([- zod- .string()- .max(- dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneNineSavedViewIdOneMax- ),- zod.null(),- ])- .optional()- .describe(- 'short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit.'- ),- }),- zod.object({- canvasId: zod- .union([zod.string(), zod.null()])- .optional()- .describe(- 'Canvas to render in the tile. Null until the user picks one in the widget settings.'- ),- }),- ])- .optional()- .describe("Widget-specific configuration. Shape depends on the tile's widget_type."),- name: zod- .string()- .max(dashboardsPartialUpdateBodyTilesItemWidgetOneNameMax)- .nullish()- .describe('Optional custom display name for the widget tile.'),- description: zod- .string()- .optional()- .describe('Optional markdown description shown when show_description is enabled.'),- })- .optional()- .describe('Nested widget row updates.'),})).optional()diff --git a/services/mcp/src/tools/generated/dashboards.ts b/services/mcp/src/tools/generated/dashboards.tsindex 77120e89d030..03bec81389cd 100644--- a/services/mcp/src/tools/generated/dashboards.ts+++ b/services/mcp/src/tools/generated/dashboards.ts@@ -553,7 +553,12 @@ const DashboardUpdateSchema = () => {return DashboardsPartialUpdateParams.omit({ project_id: true }).extend(DashboardsPartialUpdateQueryParams.omit({ format: true }).shape).extend(DashboardsPartialUpdateBody.shape)- .extend({ id: z.preprocess(castStringToInt, DashboardsPartialUpdateParams.shape['id']) })+ .extend({+ id: z.preprocess(castStringToInt, DashboardsPartialUpdateParams.shape['id']),+ tiles: DashboardsPartialUpdateBody.shape['tiles'].describe(+ "Dashboard tiles to update, each identified by its tile id. Any tile type accepts `layouts` to set its grid position and size. To change a widget tile's config, name, or description, use dashboard-widgets-batch-update."+ ),+ })}const dashboardUpdate = (): ToolBase<diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.jsonindex 0b64985162b6..a35ce3a3ef82 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.json@@ -189,7 +189,7 @@"type": "array"},"tiles": {- "description": "Dashboard tiles to update, each identified by its tile id. Any tile type accepts `layouts` to set its grid position and size. Widget tiles also accept nested widget.config patches.",+ "description": "Dashboard tiles to update, each identified by its tile id. Any tile type accepts `layouts` to set its grid position and size. To change a widget tile's config, name, or description, use dashboard-widgets-batch-update.","items": {"properties": {"badge": {@@ -289,1073 +289,6 @@"show_description": {"description": "Whether to show the tile's description underneath its title on the dashboard. Works for every tile type. The description itself is unaffected and still comes from the tile's insight, text, or widget content — this only toggles whether it renders on the dashboard.","type": "boolean"- },- "widget": {- "description": "Nested widget row updates.",- "properties": {- "config": {- "anyOf": [- {- "properties": {- "notebookShortId": {- "anyOf": [- {- "maxLength": 128,- "minLength": 1,- "type": "string"- },- {- "type": "null"- }- ],- "description": "Source notebook short ID."- },- "snapshotId": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Immutable notebook widget snapshot. Add one from a notebook widget's menu."- }- },- "type": "object"- },- {- "properties": {- "dateRange": {- "anyOf": [- {- "properties": {- "date_from": {- "anyOf": [- {- "enum": [- "-1M",- "-30M",- "-1h",- "-3h",- "-24h",- "-7d",- "-14d",- "-30d",- "-90d"- ],- "type": "string"- },- {- "type": "null"- }- ]- }- },- "type": "object"- },- {- "type": "null"- }- ]- },- "eventName": {- "anyOf": [- {- "minLength": 1,- "type": "string"- },- {- "type": "null"- }- ],- "description": "Limit the feed to a single event name. Omit or null for all events."- },- "filterTestAccounts": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "limit": {- "default": 25,- "description": "Maximum number of events to return.",- "maximum": 50,- "minimum": 1,- "type": "number"- },- "properties": {- "anyOf": [- {- "items": {- "properties": {- "key": {- "maxLength": 400,- "minLength": 1,- "type": "string"- },- "label": {- "anyOf": [- {- "maxLength": 400,- "type": "string"- },- {- "type": "null"- }- ]- },- "operator": {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "starts_with",- "not_starts_with",- "ends_with",- "not_ends_with",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "is_cleaned_path_not_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- "type": {- "enum": ["event", "person"],- "type": "string"- },- "value": {- "anyOf": [- {- "items": {- "anyOf": [- {- "maxLength": 4000,- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- }- ]- },- "maxItems": 100,- "type": "array"- },- {- "maxLength": 4000,- "type": "string"- },- {- "type": "number"- },- {- "type": "boolean"- },- {- "type": "null"- }- ]- }- },- "required": ["key", "operator", "type"],- "type": "object"- },- "maxItems": 20,- "type": "array"- },- {- "type": "null"- }- ],- "description": "Event and person property filters, matching Activity > Explore events."- },- "widgetFilters": {- "anyOf": [- {- "additionalProperties": {- "properties": {- "filterId": {- "minLength": 1,- "type": "string"- },- "operator": {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "starts_with",- "not_starts_with",- "ends_with",- "not_ends_with",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "is_cleaned_path_not_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- "optionId": {- "minLength": 1,- "type": "string"- },- "propertyName": {- "minLength": 1,- "type": "string"- },- "value": {- "anyOf": [- {- "type": "string"- },- {- "items": {- "type": "string"- },- "type": "array"- },- {- "type": "null"- }- ]- }- },- "required": [- "filterId",- "propertyName",- "optionId",- "operator"- ],- "type": "object"- },- "propertyNames": {- "type": "string"- },- "type": "object"- },- {- "type": "null"- }- ]- }- },- "type": "object"- },- {- "properties": {- "assignee": {- "anyOf": [- {- "properties": {- "id": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- }- ]- },- "type": {- "enum": ["user", "role"],- "type": "string"- }- },- "required": ["id", "type"],- "type": "object"- },- {- "type": "null"- }- ],- "description": "Filter by assignee ({type: user|role, id}). Omit for any assignee."- },- "dateRange": {- "anyOf": [- {- "properties": {- "date_from": {- "anyOf": [- {- "enum": [- "-1M",- "-30M",- "-1h",- "-3h",- "-24h",- "-7d",- "-14d",- "-30d",- "-90d"- ],- "type": "string"- },- {- "type": "null"- }- ]- }- },- "type": "object"- },- {- "type": "null"- }- ]- },- "filterTestAccounts": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "limit": {- "default": 10,- "description": "Maximum number of issues to return.",- "maximum": 25,- "minimum": 1,- "type": "number"- },- "orderBy": {- "default": "occurrences",- "description": "Issue ranking column.",- "enum": [- "last_seen",- "first_seen",- "occurrences",- "users",- "sessions",- "severity"- ],- "type": "string"- },- "orderDirection": {- "default": "DESC",- "description": "Sort direction for orderBy.",- "enum": ["ASC", "DESC"],- "type": "string"- },- "status": {- "default": "active",- "description": "Issue status filter.",- "enum": [- "archived",- "active",- "resolved",- "pending_release",- "suppressed",- "all"- ],- "type": "string"- },- "widgetFilters": {- "anyOf": [- {- "additionalProperties": {- "properties": {- "filterId": {- "minLength": 1,- "type": "string"- },- "operator": {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "starts_with",- "not_starts_with",- "ends_with",- "not_ends_with",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "is_cleaned_path_not_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- "optionId": {- "minLength": 1,- "type": "string"- },- "propertyName": {- "minLength": 1,- "type": "string"- },- "value": {- "anyOf": [- {- "type": "string"- },- {- "items": {- "type": "string"- },- "type": "array"- },- {- "type": "null"- }- ]- }- },- "required": [- "filterId",- "propertyName",- "optionId",- "operator"- ],- "type": "object"- },- "propertyNames": {- "type": "string"- },- "type": "object"- },- {- "type": "null"- }- ]- }- },- "type": "object"- },- {- "properties": {- "collectionId": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "short_id of a session replay collection to scope the widget to its pinned recordings. Combine with savedFilterId or property filters to narrow within the collection; orderBy, orderDirection, and limit still apply."- },- "dateRange": {- "anyOf": [- {- "properties": {- "date_from": {- "anyOf": [- {- "enum": [- "-1M",- "-30M",- "-1h",- "-3h",- "-24h",- "-7d",- "-14d",- "-30d",- "-90d"- ],- "type": "string"- },- {- "type": "null"- }- ]- }- },- "type": "object"- },- {- "type": "null"- }- ]- },- "filterTestAccounts": {- "anyOf": [- {- "type": "boolean"- },- {- "type": "null"- }- ]- },- "limit": {- "default": 10,- "description": "Maximum number of recordings to return.",- "maximum": 25,- "minimum": 1,- "type": "number"- },- "orderBy": {- "default": "start_time",- "description": "Recording ranking column.",- "enum": [- "start_time",- "activity_score",- "recording_duration",- "duration",- "click_count",- "console_error_count"- ],- "type": "string"- },- "orderDirection": {- "default": "DESC",- "description": "Sort direction for orderBy.",- "enum": ["ASC", "DESC"],- "type": "string"- },- "savedFilterId": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "short_id of a saved session replay filter to refine the recordings shown. When set, the saved filter owns the date range and property filters; only orderBy, orderDirection, and limit still apply. Combine with collectionId to filter within a collection."- },- "widgetFilters": {- "anyOf": [- {- "additionalProperties": {- "properties": {- "filterId": {- "minLength": 1,- "type": "string"- },- "operator": {- "enum": [- "exact",- "is_not",- "icontains",- "not_icontains",- "starts_with",- "not_starts_with",- "ends_with",- "not_ends_with",- "regex",- "not_regex",- "gt",- "gte",- "lt",- "lte",- "is_set",- "is_not_set",- "is_date_exact",- "is_date_before",- "is_date_after",- "between",- "not_between",- "min",- "max",- "in",- "not_in",- "is_cleaned_path_exact",- "is_cleaned_path_not_exact",- "flag_evaluates_to",- "semver_eq",- "semver_neq",- "semver_gt",- "semver_gte",- "semver_lt",- "semver_lte",- "semver_tilde",- "semver_caret",- "semver_wildcard",- "icontains_multi",- "not_icontains_multi"- ],- "type": "string"- },- "optionId": {- "minLength": 1,- "type": "string"- },- "propertyName": {- "minLength": 1,- "type": "string"- },- "value": {- "anyOf": [- {- "type": "string"- },- {- "items": {- "type": "string"- },- "type": "array"- },- {- "type": "null"- }- ]- }- },- "required": [- "filterId",- "propertyName",- "optionId",- "operator"- ],- "type": "object"- },- "propertyNames": {- "type": "string"- },- "type": "object"- },- {- "type": "null"- }- ]- }- },- "type": "object"- },- {- "properties": {- "createdBy": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Filter by creator (user id). Omit for any creator."- },- "limit": {- "default": 10,- "description": "Maximum number of experiments to return.",- "maximum": 25,- "minimum": 1,- "type": "number"- },- "orderBy": {- "default": "created_at",- "description": "Experiment list sort column.",- "enum": ["created_at", "name", "start_date"],- "type": "string"- },- "orderDirection": {- "default": "DESC",- "description": "Sort direction for orderBy.",- "enum": ["ASC", "DESC"],- "type": "string"- },- "status": {- "default": "all",- "description": "Experiment status filter.",- "enum": [- "draft",- "running",- "paused",- "exposure_frozen",- "stopped",- "all"- ],- "type": "string"- }- },- "type": "object"- },- {- "properties": {- "experimentId": {- "anyOf": [- {- "type": "number"- },- {- "type": "null"- }- ],- "description": "Experiment to show results for. Null until the user picks one in the widget settings."- }- },- "type": "object"- },- {- "properties": {- "dateRange": {- "anyOf": [- {- "properties": {- "date_from": {- "anyOf": [- {- "enum": [- "-1M",- "-30M",- "-1h",- "-3h",- "-24h",- "-7d",- "-14d",- "-30d",- "-90d"- ],- "type": "string"- },- {- "type": "null"- }- ]- }- },- "type": "object"- },- {- "type": "null"- }- ],- "description": "Null or omitted means all time (the survey's full lifetime)."- },- "limit": {- "default": 10,- "description": "Maximum number of recent responses to return.",- "maximum": 25,- "minimum": 1,- "type": "number"- },- "surveyId": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Survey to show performance stats and recent responses for. Null until the user picks one."- }- },- "type": "object"- },- {- "properties": {- "dateRange": {- "anyOf": [- {- "properties": {- "date_from": {- "anyOf": [- {- "enum": [- "-1M",- "-30M",- "-1h",- "-3h",- "-24h",- "-7d",- "-14d",- "-30d",- "-90d"- ],- "type": "string"- },- {- "type": "null"- }- ]- }- },- "type": "object"- },- {- "type": "null"- }- ]- },- "limit": {- "default": 50,- "description": "Maximum number of log lines to return.",- "maximum": 100,- "minimum": 1,- "type": "number"- },- "orderBy": {- "default": "latest",- "description": "Sort by newest (latest) or oldest (earliest) first.",- "enum": ["latest", "earliest"],- "type": "string"- },- "savedViewId": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "short_id of a saved logs view to use as the source. When set, the saved view owns the date range, severity, service, and property filters; only orderBy and limit still apply."- },- "serviceNames": {- "description": "Only show logs from these services. Empty shows all services.",- "items": {- "type": "string"- },- "type": "array"- },- "severityLevels": {- "description": "Only show logs at these severity levels. Empty shows all levels.",- "items": {- "enum": ["trace", "debug", "info", "warn", "error", "fatal"],- "type": "string"- },- "type": "array"- },- "timezone": {- "default": "UTC",- "description": "Render log timestamps in UTC or in each viewer's local timezone.",- "enum": ["UTC", "local"],- "type": "string"- },- "wrapLines": {- "default": false,- "description": "Wrap long log lines instead of truncating them to a single row.",- "type": "boolean"- }- },- "type": "object"- },- {- "properties": {- "assignees": {- "description": "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees.",- "items": {- "anyOf": [- {- "enum": ["me", "unassigned"],- "type": "string"- },- {- "properties": {- "id": {- "anyOf": [- {- "type": "string"- },- {- "type": "number"- }- ]- },- "type": {- "enum": ["user", "role"],- "type": "string"- }- },- "required": ["id", "type"],- "type": "object"- }- ]- },- "maxItems": 100,- "type": "array"- },- "channel": {- "default": "all",- "description": "Ticket channel filter.",- "enum": ["widget", "email", "slack", "teams", "github", "all"],- "type": "string"- },- "limit": {- "default": 10,- "description": "Maximum number of tickets to return.",- "maximum": 25,- "minimum": 1,- "type": "number"- },- "priorities": {- "description": "Only show tickets with these priorities. Empty shows all priorities.",- "items": {- "enum": ["low", "medium", "high", "critical"],- "type": "string"- },- "type": "array"- },- "savedViewId": {- "anyOf": [- {- "maxLength": 12,- "type": "string"- },- {- "type": "null"- }- ],- "description": "short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit."- },- "search": {- "default": "",- "description": "Search requester name or email, ticket subject, message text, or ticket number.",- "maxLength": 200,- "type": "string"- },- "status": {- "default": "all",- "description": "Ticket status filter.",- "enum": ["new", "open", "pending", "on_hold", "resolved", "all"],- "type": "string"- }- },- "type": "object"- },- {- "properties": {- "canvasId": {- "anyOf": [- {- "type": "string"- },- {- "type": "null"- }- ],- "description": "Canvas to render in the tile. Null until the user picks one in the widget settings."- }- },- "type": "object"- }- ],- "description": "Widget-specific configuration. Shape depends on the tile's widget_type."- },- "description": {- "description": "Optional markdown description shown when show_description is enabled.",- "type": "string"- },- "id": {- "description": "Existing widget row ID when updating a widget tile via dashboard PATCH.",- "type": "string"- },- "name": {- "anyOf": [- {- "maxLength": 400,- "type": "string"- },- {- "type": "null"- }- ],- "description": "Optional custom display name for the widget tile."- },- "widget_type": {- "description": "Widget type identifier (cannot be changed on update).\n\n* `activity_events_list` - activity_events_list\n* `canvas_app` - canvas_app\n* `conversations_recent_tickets` - conversations_recent_tickets\n* `error_tracking_list` - error_tracking_list\n* `experiment_results` - experiment_results\n* `experiments_list` - experiments_list\n* `logs_list` - logs_list\n* `notebook_widget` - notebook_widget\n* `session_replay_list` - session_replay_list\n* `survey_results` - survey_results",- "enum": [- "activity_events_list",- "canvas_app",- "conversations_recent_tickets",- "error_tracking_list",- "experiment_results",- "experiments_list",- "logs_list",- "notebook_widget",- "session_replay_list",- "survey_results"- ],- "type": "string"- }- },- "type": "object"}},"type": "object"diff --git a/services/mcp/tests/unit/dashboard-update-schema.test.ts b/services/mcp/tests/unit/dashboard-update-schema.test.tsindex b1371ff43df3..26a4fe2afb0d 100644--- a/services/mcp/tests/unit/dashboard-update-schema.test.ts+++ b/services/mcp/tests/unit/dashboard-update-schema.test.ts@@ -37,12 +37,24 @@ describe('dashboard-update schema', () => {use_template: '',use_dashboard: null,delete_insights: false,- tiles: [{ id: 1, widget: { config: { limit: 10 } } }],+ tiles: [{ id: 1, layouts: { sm: { x: 0, y: 0, w: 6, h: 4 } } }],})expect(result.success).toBe(true)})+ // Widget settings go through dashboard-widgets-batch-update. Every widget type's config schema+ // would otherwise be copied into this tool, which loads without the dashboard-widgets flag.+ it('leaves widget settings out of tiles', () => {+ const tiles = z.toJSONSchema(tool.schema, { io: 'input' }).properties?.tiles as {+ items?: { properties?: Record<string, unknown> }+ }+ const tileProperties = tiles.items?.properties++ expect(tileProperties).toHaveProperty('layouts')+ expect(tileProperties).not.toHaveProperty('widget')+ })+// The schema used to accept any JSON for this field, and its description read as a color// mapping, so agents sent a dictionary of breakdown values to hex colors. The dashboard cannot// read that shape.diff --git a/services/mcp/tests/unit/tool-schema-snapshots.test.ts b/services/mcp/tests/unit/tool-schema-snapshots.test.tsindex 7a071f5b9771..e239fa38bcae 100644--- a/services/mcp/tests/unit/tool-schema-snapshots.test.ts+++ b/services/mcp/tests/unit/tool-schema-snapshots.test.ts@@ -153,7 +153,7 @@ describe('Tool schema snapshots', () => {describe('schema budgets', () => {// Ratchet: the number of oversized tool schemas may only go down.- const OVERSIZED_SCHEMA_COUNT = 44+ const OVERSIZED_SCHEMA_COUNT = 43// Ratchet: the share of nested properties with a description may only go up.const NESTED_DESCRIPTION_COVERAGE_FLOOR_PERCENT = 55