Skip to content

Commit b42f876

Browse files
cameroncookecodex
andcommitted
feat: support snapshot resource ids
Allow get_sentry_resource to fetch preprod snapshots by resourceType='snapshot' and snapshot images by resourceType='snapshotImage' with resourceId '<snapshotId>:<image_file_name>'. Regenerate MCP definitions and cover explicit snapshot resource lookup paths. Co-Authored-By: Codex CLI <noreply@openai.com>
1 parent 6e4b175 commit b42f876

4 files changed

Lines changed: 203 additions & 43 deletions

File tree

packages/mcp-core/src/skillDefinitions.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
},
5050
{
5151
"name": "get_sentry_resource",
52-
"description": "Fetch a Sentry resource by URL or by type and ID. Pass a Sentry URL directly and the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, replays, breadcrumbs, and preprod snapshots.\nSentry URLs require authentication that this tool handles.\nTrace lookups return a condensed overview by default.\n\nFor preprod snapshot URLs (matching 'sentry.io/preprod/snapshots/'):\n- Without ?selectedSnapshot=: returns the snapshot diff summary (changed, added, removed images)\n- With ?selectedSnapshot=<image_file_name>: returns the specific image preview and full metadata\n- With ?selectedSnapshot=<image_file_name>&imageResolution=full: returns original full-resolution image bytes\n\nFor `resourceType='span'`, pass `resourceId` as `<traceId>:<spanId>`.\n\n<examples>\n### From a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\n\n### Breadcrumbs from a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/', resourceType='breadcrumbs')\n\n### By type and ID\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\n\n### Span by trace and span ID\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='a4d1aae7216b47ff8117cf4e09ce9d0a:aa8e7f3384ef4ff5')\n\n### Replay by ID\nget_sentry_resource(resourceType='replay', organizationSlug='my-org', resourceId='7e07485f-12f9-416b-8b14-26260799b51f')\n\n### AI conversation by ID\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\n\n### Investigate a failed snapshot test from CI\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/')\n\n### View a specific changed snapshot image preview\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n\n### View a specific changed snapshot image at full resolution\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png&imageResolution=full')\n</examples>",
52+
"description": "Fetch a Sentry resource by URL, or by resourceType plus resourceId.\nPass a Sentry URL directly when possible; the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, breadcrumbs, replays, preprod snapshots, and snapshot images.\nTrace lookups return a condensed overview by default.\n\nPreprod snapshot URLs:\n- /preprod/snapshots/<id>/ returns the snapshot diff summary.\n- Add ?selectedSnapshot=<image_file_name> to return an image preview and metadata.\n- Add &imageResolution=full to return original full-resolution image bytes.\n\nResource IDs:\n- span: <traceId>:<spanId>\n- snapshot: <snapshotId>\n- snapshotImage: <snapshotId>:<image_file_name>\n\n<examples>\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='<traceId>:<spanId>')\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\nget_sentry_resource(resourceType='snapshot', organizationSlug='my-org', resourceId='241539')\nget_sentry_resource(resourceType='snapshotImage', organizationSlug='my-org', resourceId='241539:login_screen.png')\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n</examples>",
5353
"requiredScopes": ["event:read", "project:read"]
5454
},
5555
{
@@ -99,7 +99,7 @@
9999
},
100100
{
101101
"name": "get_sentry_resource",
102-
"description": "Fetch a Sentry resource by URL or by type and ID. Pass a Sentry URL directly and the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, replays, breadcrumbs, and preprod snapshots.\nSentry URLs require authentication that this tool handles.\nTrace lookups return a condensed overview by default.\n\nFor preprod snapshot URLs (matching 'sentry.io/preprod/snapshots/'):\n- Without ?selectedSnapshot=: returns the snapshot diff summary (changed, added, removed images)\n- With ?selectedSnapshot=<image_file_name>: returns the specific image preview and full metadata\n- With ?selectedSnapshot=<image_file_name>&imageResolution=full: returns original full-resolution image bytes\n\nFor `resourceType='span'`, pass `resourceId` as `<traceId>:<spanId>`.\n\n<examples>\n### From a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\n\n### Breadcrumbs from a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/', resourceType='breadcrumbs')\n\n### By type and ID\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\n\n### Span by trace and span ID\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='a4d1aae7216b47ff8117cf4e09ce9d0a:aa8e7f3384ef4ff5')\n\n### Replay by ID\nget_sentry_resource(resourceType='replay', organizationSlug='my-org', resourceId='7e07485f-12f9-416b-8b14-26260799b51f')\n\n### AI conversation by ID\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\n\n### Investigate a failed snapshot test from CI\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/')\n\n### View a specific changed snapshot image preview\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n\n### View a specific changed snapshot image at full resolution\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png&imageResolution=full')\n</examples>",
102+
"description": "Fetch a Sentry resource by URL, or by resourceType plus resourceId.\nPass a Sentry URL directly when possible; the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, breadcrumbs, replays, preprod snapshots, and snapshot images.\nTrace lookups return a condensed overview by default.\n\nPreprod snapshot URLs:\n- /preprod/snapshots/<id>/ returns the snapshot diff summary.\n- Add ?selectedSnapshot=<image_file_name> to return an image preview and metadata.\n- Add &imageResolution=full to return original full-resolution image bytes.\n\nResource IDs:\n- span: <traceId>:<spanId>\n- snapshot: <snapshotId>\n- snapshotImage: <snapshotId>:<image_file_name>\n\n<examples>\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='<traceId>:<spanId>')\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\nget_sentry_resource(resourceType='snapshot', organizationSlug='my-org', resourceId='241539')\nget_sentry_resource(resourceType='snapshotImage', organizationSlug='my-org', resourceId='241539:login_screen.png')\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n</examples>",
103103
"requiredScopes": ["event:read", "project:read"]
104104
},
105105
{
@@ -179,7 +179,7 @@
179179
},
180180
{
181181
"name": "get_sentry_resource",
182-
"description": "Fetch a Sentry resource by URL or by type and ID. Pass a Sentry URL directly and the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, replays, breadcrumbs, and preprod snapshots.\nSentry URLs require authentication that this tool handles.\nTrace lookups return a condensed overview by default.\n\nFor preprod snapshot URLs (matching 'sentry.io/preprod/snapshots/'):\n- Without ?selectedSnapshot=: returns the snapshot diff summary (changed, added, removed images)\n- With ?selectedSnapshot=<image_file_name>: returns the specific image preview and full metadata\n- With ?selectedSnapshot=<image_file_name>&imageResolution=full: returns original full-resolution image bytes\n\nFor `resourceType='span'`, pass `resourceId` as `<traceId>:<spanId>`.\n\n<examples>\n### From a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\n\n### Breadcrumbs from a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/', resourceType='breadcrumbs')\n\n### By type and ID\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\n\n### Span by trace and span ID\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='a4d1aae7216b47ff8117cf4e09ce9d0a:aa8e7f3384ef4ff5')\n\n### Replay by ID\nget_sentry_resource(resourceType='replay', organizationSlug='my-org', resourceId='7e07485f-12f9-416b-8b14-26260799b51f')\n\n### AI conversation by ID\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\n\n### Investigate a failed snapshot test from CI\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/')\n\n### View a specific changed snapshot image preview\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n\n### View a specific changed snapshot image at full resolution\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png&imageResolution=full')\n</examples>",
182+
"description": "Fetch a Sentry resource by URL, or by resourceType plus resourceId.\nPass a Sentry URL directly when possible; the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, breadcrumbs, replays, preprod snapshots, and snapshot images.\nTrace lookups return a condensed overview by default.\n\nPreprod snapshot URLs:\n- /preprod/snapshots/<id>/ returns the snapshot diff summary.\n- Add ?selectedSnapshot=<image_file_name> to return an image preview and metadata.\n- Add &imageResolution=full to return original full-resolution image bytes.\n\nResource IDs:\n- span: <traceId>:<spanId>\n- snapshot: <snapshotId>\n- snapshotImage: <snapshotId>:<image_file_name>\n\n<examples>\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='<traceId>:<spanId>')\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\nget_sentry_resource(resourceType='snapshot', organizationSlug='my-org', resourceId='241539')\nget_sentry_resource(resourceType='snapshotImage', organizationSlug='my-org', resourceId='241539:login_screen.png')\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n</examples>",
183183
"requiredScopes": ["event:read", "project:read"]
184184
},
185185
{
@@ -289,7 +289,7 @@
289289
},
290290
{
291291
"name": "get_sentry_resource",
292-
"description": "Fetch a Sentry resource by URL or by type and ID. Pass a Sentry URL directly and the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, replays, breadcrumbs, and preprod snapshots.\nSentry URLs require authentication that this tool handles.\nTrace lookups return a condensed overview by default.\n\nFor preprod snapshot URLs (matching 'sentry.io/preprod/snapshots/'):\n- Without ?selectedSnapshot=: returns the snapshot diff summary (changed, added, removed images)\n- With ?selectedSnapshot=<image_file_name>: returns the specific image preview and full metadata\n- With ?selectedSnapshot=<image_file_name>&imageResolution=full: returns original full-resolution image bytes\n\nFor `resourceType='span'`, pass `resourceId` as `<traceId>:<spanId>`.\n\n<examples>\n### From a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\n\n### Breadcrumbs from a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/', resourceType='breadcrumbs')\n\n### By type and ID\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\n\n### Span by trace and span ID\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='a4d1aae7216b47ff8117cf4e09ce9d0a:aa8e7f3384ef4ff5')\n\n### Replay by ID\nget_sentry_resource(resourceType='replay', organizationSlug='my-org', resourceId='7e07485f-12f9-416b-8b14-26260799b51f')\n\n### AI conversation by ID\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\n\n### Investigate a failed snapshot test from CI\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/')\n\n### View a specific changed snapshot image preview\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n\n### View a specific changed snapshot image at full resolution\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png&imageResolution=full')\n</examples>",
292+
"description": "Fetch a Sentry resource by URL, or by resourceType plus resourceId.\nPass a Sentry URL directly when possible; the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, breadcrumbs, replays, preprod snapshots, and snapshot images.\nTrace lookups return a condensed overview by default.\n\nPreprod snapshot URLs:\n- /preprod/snapshots/<id>/ returns the snapshot diff summary.\n- Add ?selectedSnapshot=<image_file_name> to return an image preview and metadata.\n- Add &imageResolution=full to return original full-resolution image bytes.\n\nResource IDs:\n- span: <traceId>:<spanId>\n- snapshot: <snapshotId>\n- snapshotImage: <snapshotId>:<image_file_name>\n\n<examples>\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='<traceId>:<spanId>')\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\nget_sentry_resource(resourceType='snapshot', organizationSlug='my-org', resourceId='241539')\nget_sentry_resource(resourceType='snapshotImage', organizationSlug='my-org', resourceId='241539:login_screen.png')\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n</examples>",
293293
"requiredScopes": ["event:read", "project:read"]
294294
},
295295
{

packages/mcp-core/src/toolDefinitions.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@
635635
},
636636
{
637637
"name": "get_sentry_resource",
638-
"description": "Fetch a Sentry resource by URL or by type and ID. Pass a Sentry URL directly and the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, replays, breadcrumbs, and preprod snapshots.\nSentry URLs require authentication that this tool handles.\nTrace lookups return a condensed overview by default.\n\nFor preprod snapshot URLs (matching 'sentry.io/preprod/snapshots/'):\n- Without ?selectedSnapshot=: returns the snapshot diff summary (changed, added, removed images)\n- With ?selectedSnapshot=<image_file_name>: returns the specific image preview and full metadata\n- With ?selectedSnapshot=<image_file_name>&imageResolution=full: returns original full-resolution image bytes\n\nFor `resourceType='span'`, pass `resourceId` as `<traceId>:<spanId>`.\n\n<examples>\n### From a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\n\n### Breadcrumbs from a Sentry URL\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/', resourceType='breadcrumbs')\n\n### By type and ID\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\n\n### Span by trace and span ID\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='a4d1aae7216b47ff8117cf4e09ce9d0a:aa8e7f3384ef4ff5')\n\n### Replay by ID\nget_sentry_resource(resourceType='replay', organizationSlug='my-org', resourceId='7e07485f-12f9-416b-8b14-26260799b51f')\n\n### AI conversation by ID\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\n\n### Investigate a failed snapshot test from CI\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/')\n\n### View a specific changed snapshot image preview\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n\n### View a specific changed snapshot image at full resolution\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png&imageResolution=full')\n</examples>",
638+
"description": "Fetch a Sentry resource by URL, or by resourceType plus resourceId.\nPass a Sentry URL directly when possible; the resource type is auto-detected.\n\nSupports issues, events, traces, spans, AI conversations, breadcrumbs, replays, preprod snapshots, and snapshot images.\nTrace lookups return a condensed overview by default.\n\nPreprod snapshot URLs:\n- /preprod/snapshots/<id>/ returns the snapshot diff summary.\n- Add ?selectedSnapshot=<image_file_name> to return an image preview and metadata.\n- Add &imageResolution=full to return original full-resolution image bytes.\n\nResource IDs:\n- span: <traceId>:<spanId>\n- snapshot: <snapshotId>\n- snapshotImage: <snapshotId>:<image_file_name>\n\n<examples>\nget_sentry_resource(url='https://sentry.io/issues/PROJECT-123/')\nget_sentry_resource(resourceType='issue', organizationSlug='my-org', resourceId='PROJECT-123')\nget_sentry_resource(resourceType='span', organizationSlug='my-org', resourceId='<traceId>:<spanId>')\nget_sentry_resource(resourceType='ai_conversation', organizationSlug='my-org', resourceId='conversation-123')\nget_sentry_resource(resourceType='snapshot', organizationSlug='my-org', resourceId='241539')\nget_sentry_resource(resourceType='snapshotImage', organizationSlug='my-org', resourceId='241539:login_screen.png')\nget_sentry_resource(url='https://sentry.sentry.io/preprod/snapshots/241539/?selectedSnapshot=login_screen.png')\n</examples>",
639639
"inputSchema": {
640640
"type": "object",
641641
"properties": {
@@ -653,13 +653,15 @@
653653
"span",
654654
"ai_conversation",
655655
"breadcrumbs",
656-
"replay"
656+
"replay",
657+
"snapshot",
658+
"snapshotImage"
657659
],
658-
"description": "Resource type. With a URL, can override the auto-detected type for breadcrumbs on an issue/event URL or for `trace` on a span-focused trace URL."
660+
"description": "Resource type. With a URL, can override the auto-detected type for breadcrumbs on an issue/event URL or for `trace` on a span-focused trace URL. Use `snapshot` with a snapshot artifact ID, or `snapshotImage` with `<snapshotId>:<image_file_name>`."
659661
},
660662
"resourceId": {
661663
"type": "string",
662-
"description": "Resource identifier: issue shortId (e.g., 'PROJECT-123'), event ID, trace ID, AI conversation ID, replay ID, or `traceId:spanId` for span resources. Required when not using a URL."
664+
"description": "Resource identifier: issue shortId (e.g., 'PROJECT-123'), event ID, trace ID, AI conversation ID, replay ID, snapshot artifact ID, `<snapshotId>:<image_file_name>` for snapshot image resources, or `traceId:spanId` for span resources. Required when not using a URL."
663665
},
664666
"organizationSlug": {
665667
"type": "string",

0 commit comments

Comments
 (0)