@chainpatrol/mcp 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @chainpatrol/mcp
2
2
 
3
+ ## 1.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ac640ce: `/detection/list` now returns up to 1000 detections per page (was 100). The
8
+ default page size stays at 50, and larger result sets still page with
9
+ `nextCursor`.
10
+
11
+ - `@chainpatrol/mcp`: the generated `detection_list` tool accepts `limit` up to
12
+ 1000 and documents `startDate`/`endDate` for incremental syncs.
13
+
14
+ Server-side work lives in @chainpatrol/external-trpc and @chainpatrol/database;
15
+ both are private packages and don't need version bumps.
16
+
17
+ - 2552904: Add Time to Detection: `getMetricsTimeToDetection` in the SDK,
18
+ `chainpatrol metrics time-to-detection` in the CLI, and the
19
+ `metrics_time_to_detection` MCP tool, all backed by the new
20
+ `POST /metrics/time-to-detection` endpoint. It reports how long threats were
21
+ already live before the earliest automated detection of the asset, for any
22
+ organization, per asset type. The clock runs from when the asset was first
23
+ seen live to its earliest automated detection; a human report does not stop
24
+ it. Each number is a minimum, published with how many blocked assets are in
25
+ the sample. Server-side work lives in @chainpatrol/external-trpc,
26
+ @chainpatrol/validation and @chainpatrol/metrics; those are private packages
27
+ and need no version bump.
28
+ - 878241c: Adds the `GET /v2/organization/threats` endpoint, which returns every asset an
29
+ organization has reported together with the lifecycle state of that
30
+ investigation — report opened, escalated to the customer, blocklisted, takedown
31
+ submitted, takedown completed — as a state projection a threat-intel platform
32
+ can poll and upsert on asset ID. Built for the OpenCTI connector. The MCP tool
33
+ surface is regenerated from the public API schemas, so the new operation shows
34
+ up there; the handler lives in the private `@chainpatrol/external-trpc` and
35
+ `@chainpatrol/validation` packages, which changesets ignores.
36
+
3
37
  ## 1.11.0
4
38
 
5
39
  ### Minor Changes
@@ -195,7 +195,7 @@ var tools_default = {
195
195
  properties: {
196
196
  type: {
197
197
  type: "string",
198
- description: "Asset type One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
198
+ description: "Asset type One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
199
199
  },
200
200
  content: {
201
201
  type: "string",
@@ -321,7 +321,7 @@ var tools_default = {
321
321
  properties: {
322
322
  type: {
323
323
  type: "string",
324
- description: "Asset type to retrieve. Omit the field entirely to retrieve assets of every type in a single paginated sweep; an explicit null is rejected. One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
324
+ description: "Asset type to retrieve. Omit the field entirely to retrieve assets of every type in a single paginated sweep; an explicit null is rejected. One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
325
325
  },
326
326
  status: {
327
327
  type: "string",
@@ -619,7 +619,7 @@ var tools_default = {
619
619
  },
620
620
  source: {
621
621
  type: "string",
622
- description: "Detection source key, from `GET /detection/sources`. The source must support the `organization` scope; global-only sources cannot be configured per organization. One of 58 values, e.g. meta_ads_search, telegram_channels_search, telegram_user_search, telegram_channels_search_vetric, telegram_user_search_vetric, facebook_page_search_vetric, facebook_user_search_vetric, facebook_post_search_vetric. Full list: resource chainpatrol://enums/source"
622
+ description: "Detection source key, from `GET /detection/sources`. The source must support the `organization` scope; global-only sources cannot be configured per organization. One of 59 values, e.g. meta_ads_search, telegram_channels_search, telegram_user_search, telegram_channels_search_vetric, telegram_user_search_vetric, facebook_page_search_vetric, facebook_user_search_vetric, facebook_post_search_vetric. Full list: resource chainpatrol://enums/source"
623
623
  },
624
624
  status: {
625
625
  type: "string",
@@ -994,7 +994,7 @@ var tools_default = {
994
994
  path: "/detection/list",
995
995
  pathParams: [],
996
996
  title: "List threat detection results for organization",
997
- description: "List threat detection results for an organization using API key authentication. Returns human-readable confidence levels (none, low, medium, high) and report status. Supports filtering by source, confidence level, asset status, and asset type. Includes pagination and search capabilities.",
997
+ description: "List threat detection results for an organization using API key authentication, newest first. Returns human-readable confidence levels (none, low, medium, high) and report status. Supports filtering by source, confidence level, asset status, asset type and creation time, plus search. Pages hold up to 1000 results: pass `nextCursor` back as `cursor` until it is absent, and use `startDate` to fetch only detections created since your last sync.",
998
998
  tags: [
999
999
  "detection"
1000
1000
  ],
@@ -1009,18 +1009,18 @@ var tools_default = {
1009
1009
  },
1010
1010
  cursor: {
1011
1011
  type: "number",
1012
- description: "Cursor for pagination"
1012
+ description: "Pass the `nextCursor` from the previous response to fetch the next page. Omit it for the first page."
1013
1013
  },
1014
1014
  limit: {
1015
1015
  type: "number",
1016
1016
  minimum: 1,
1017
- maximum: 100,
1017
+ maximum: 1e3,
1018
1018
  default: 50,
1019
- description: "Number of results to return"
1019
+ description: "Number of results per page, between 1 and 1000. Defaults to 50."
1020
1020
  },
1021
1021
  filters: {
1022
1022
  type: "array",
1023
- description: "Filters to apply to the results. Each clause filters on one property. Accepted values per property \u2014 `source`: One of 58 values, e.g. meta_ads_search, telegram_channels_search, telegram_user_search, telegram_channels_search_vetric, telegram_user_search_vetric, facebook_page_search_vetric, facebook_user_search_vetric, facebook_post_search_vetric. Full list: resource chainpatrol://enums/source; `confidence`: none, low, medium, high; `liveness`: UNKNOWN, ALIVE, DEAD; `watchlist`: ENABLED, DISABLED; `assetStatus`: UNKNOWN, ALLOWED, BLOCKED; `reported`: reported, not_reported; `assetType`: One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type; `brand`: number values; `deleted`: string values; `countryCode`: string values.",
1023
+ description: "Filters to apply to the results. Each clause filters on one property. Accepted values per property \u2014 `source`: One of 59 values, e.g. meta_ads_search, telegram_channels_search, telegram_user_search, telegram_channels_search_vetric, telegram_user_search_vetric, facebook_page_search_vetric, facebook_user_search_vetric, facebook_post_search_vetric. Full list: resource chainpatrol://enums/source; `confidence`: none, low, medium, high; `liveness`: UNKNOWN, ALIVE, DEAD; `watchlist`: ENABLED, DISABLED; `assetStatus`: UNKNOWN, ALLOWED, BLOCKED; `reported`: reported, not_reported; `assetType`: One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type; `brand`: number values; `deleted`: string values; `countryCode`: string values.",
1024
1024
  items: {
1025
1025
  type: "object",
1026
1026
  properties: {
@@ -1075,12 +1075,12 @@ var tools_default = {
1075
1075
  startDate: {
1076
1076
  type: "string",
1077
1077
  format: "date-time",
1078
- description: "Start date for filtering results"
1078
+ description: "Only return detections created at or after this time (inclusive). For incremental syncs, pass the time your previous sync started minus a few minutes of overlap, and de-duplicate by `id`."
1079
1079
  },
1080
1080
  endDate: {
1081
1081
  type: "string",
1082
1082
  format: "date-time",
1083
- description: "End date for filtering results"
1083
+ description: "Only return detections created at or before this time (inclusive). Pin it to the time a sync starts so every page of that sync sees the same result set."
1084
1084
  }
1085
1085
  },
1086
1086
  required: [
@@ -1236,7 +1236,7 @@ var tools_default = {
1236
1236
  type: "array",
1237
1237
  items: {
1238
1238
  type: "string",
1239
- description: "One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
1239
+ description: "One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
1240
1240
  }
1241
1241
  },
1242
1242
  reviewedByUserId: {
@@ -2245,7 +2245,7 @@ var tools_default = {
2245
2245
  type: "array",
2246
2246
  items: {
2247
2247
  type: "string",
2248
- description: "One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
2248
+ description: "One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
2249
2249
  },
2250
2250
  maxItems: 5,
2251
2251
  description: "Break the trend down by these asset types, one series each. Omit for a single series pooled across every asset type"
@@ -2286,6 +2286,60 @@ var tools_default = {
2286
2286
  ]
2287
2287
  }
2288
2288
  },
2289
+ {
2290
+ name: "metrics_time_to_detection",
2291
+ procedure: "metricsTimeToDetection",
2292
+ method: "POST",
2293
+ path: "/metrics/time-to-detection",
2294
+ pathParams: [],
2295
+ title: "Get organization time to detection by asset type",
2296
+ description: "How long threats were already live before the earliest automated detection of the asset, for any organization. Broken down by asset type, for distinct assets this organization blocked in the date range that are still blocked today. The clock runs from when the asset was first seen live to its earliest automated detection; a human report does not stop it. Each median is a minimum.",
2297
+ tags: [
2298
+ "metrics"
2299
+ ],
2300
+ readOnly: true,
2301
+ deprecated: false,
2302
+ inputSchema: {
2303
+ type: "object",
2304
+ properties: {
2305
+ slug: {
2306
+ type: "string",
2307
+ minLength: 1,
2308
+ description: "Organization slug"
2309
+ },
2310
+ startDate: {
2311
+ type: "string",
2312
+ format: "date-time",
2313
+ description: "Only include assets blocked on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
2314
+ },
2315
+ endDate: {
2316
+ type: "string",
2317
+ format: "date-time",
2318
+ description: "Only include assets blocked on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
2319
+ },
2320
+ brandIds: {
2321
+ type: "array",
2322
+ items: {
2323
+ type: "integer",
2324
+ exclusiveMinimum: 0
2325
+ },
2326
+ description: "Only include assets belonging to these brands"
2327
+ },
2328
+ countryCodes: {
2329
+ type: "array",
2330
+ items: {
2331
+ type: "string",
2332
+ minLength: 2,
2333
+ maxLength: 2
2334
+ },
2335
+ description: "Only include assets scanned from these ISO 3166-1 alpha-2 countries"
2336
+ }
2337
+ },
2338
+ required: [
2339
+ "slug"
2340
+ ]
2341
+ }
2342
+ },
2289
2343
  {
2290
2344
  name: "operations_queues_snapshot",
2291
2345
  procedure: "operationsQueuesSnapshot",
@@ -2539,7 +2593,7 @@ var tools_default = {
2539
2593
  },
2540
2594
  type: {
2541
2595
  type: "string",
2542
- description: "Filter by asset type (URL, ADDRESS, etc.) One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
2596
+ description: "Filter by asset type (URL, ADDRESS, etc.) One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
2543
2597
  },
2544
2598
  groupId: {
2545
2599
  type: "integer",
@@ -3082,7 +3136,7 @@ var tools_default = {
3082
3136
  type: "array",
3083
3137
  items: {
3084
3138
  type: "string",
3085
- description: "One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
3139
+ description: "One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
3086
3140
  }
3087
3141
  },
3088
3142
  brandIds: {
@@ -3124,6 +3178,63 @@ var tools_default = {
3124
3178
  ]
3125
3179
  }
3126
3180
  },
3181
+ {
3182
+ name: "organization_threats_list",
3183
+ procedure: "organizationThreatsList",
3184
+ method: "GET",
3185
+ path: "/organization/threats",
3186
+ pathParams: [],
3187
+ title: "List organization threats",
3188
+ description: "List every asset your organization has reported, with the lifecycle state of each investigation: report opened, escalated, blocklisted, takedown submitted, takedown completed. Built for threat-intel platforms that poll for changes and upsert on asset ID. Supports pagination.",
3189
+ tags: [
3190
+ "organization"
3191
+ ],
3192
+ readOnly: true,
3193
+ deprecated: false,
3194
+ inputSchema: {
3195
+ type: "object",
3196
+ properties: {
3197
+ slug: {
3198
+ type: "string",
3199
+ description: "Organization slug. Optional for organization-scoped API keys, which resolve the organization from the key itself. Required when your credentials can reach more than one organization."
3200
+ },
3201
+ updatedSince: {
3202
+ type: "string",
3203
+ description: "Only return threats touched at or after this ISO 8601 timestamp. Compared against the most recent change to the asset, its reports, and its takedown \u2014 whichever is latest. Omit for a full backfill. Overlap your windows by a few minutes: writes that land mid-request can otherwise fall between two polls."
3204
+ },
3205
+ assetType: {
3206
+ type: "string",
3207
+ description: "Filter by asset type. Omit to return every type. One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
3208
+ },
3209
+ per_page: {
3210
+ type: "integer",
3211
+ minimum: 1,
3212
+ maximum: 1e3,
3213
+ default: 100,
3214
+ description: "The number of threats to return per page (max 1000)"
3215
+ },
3216
+ next_page: {
3217
+ anyOf: [
3218
+ {
3219
+ anyOf: [
3220
+ {
3221
+ not: {}
3222
+ },
3223
+ {
3224
+ type: "string"
3225
+ }
3226
+ ]
3227
+ },
3228
+ {
3229
+ type: "null"
3230
+ }
3231
+ ],
3232
+ description: "Cursor for fetching the next page of results"
3233
+ }
3234
+ },
3235
+ description: "List organization threats request body\n\nReturns every asset this organization has filed a report against, together with\nthe lifecycle state of that investigation \u2014 report opened, escalated, blocked,\ntakedown submitted, takedown completed.\n\nThis is a projection of current state, not an event stream: each threat is\nreturned with the facts as they stand right now, so a consumer that upserts on\n`id` converges regardless of which intermediate transitions it saw. Results are\nordered by asset ID ascending and paginated with `next_page`."
3236
+ }
3237
+ },
3127
3238
  {
3128
3239
  name: "report_create",
3129
3240
  procedure: "reportCreate",
@@ -3225,7 +3336,7 @@ var tools_default = {
3225
3336
  properties: {
3226
3337
  type: {
3227
3338
  type: "string",
3228
- description: "Enrichment type One of 45 values, e.g. content_and_metadata, browser_capture, ownership_and_registration, geolocation_and_ip, dns, tls, tcp, hostname_first_seen. Full list: resource chainpatrol://enums/asset_scan_enrichment_type"
3339
+ description: "Enrichment type One of 49 values, e.g. content_and_metadata, browser_capture, ownership_and_registration, geolocation_and_ip, dns, tls, tcp, hostname_first_seen. Full list: resource chainpatrol://enums/asset_scan_enrichment_type"
3229
3340
  },
3230
3341
  source: {
3231
3342
  type: "string",
@@ -3396,7 +3507,7 @@ var tools_default = {
3396
3507
  type: "array",
3397
3508
  items: {
3398
3509
  type: "string",
3399
- description: "One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
3510
+ description: "One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
3400
3511
  },
3401
3512
  description: "Filter by asset types"
3402
3513
  },
@@ -3556,7 +3667,7 @@ var tools_default = {
3556
3667
  type: "array",
3557
3668
  items: {
3558
3669
  type: "string",
3559
- description: "One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
3670
+ description: "One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
3560
3671
  },
3561
3672
  description: "Filter by asset types"
3562
3673
  },
@@ -3812,7 +3923,7 @@ var tools_default = {
3812
3923
  type: "array",
3813
3924
  items: {
3814
3925
  type: "string",
3815
- description: "One of 94 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
3926
+ description: "One of 95 values, e.g. URL, PAGE, ADDRESS, DISCORD, LINKEDIN, TWITTER, FACEBOOK, YOUTUBE. Full list: resource chainpatrol://enums/asset_type"
3816
3927
  },
3817
3928
  minItems: 1
3818
3929
  }
@@ -4035,6 +4146,7 @@ var tools_default = {
4035
4146
  "apple_app_store_listing",
4036
4147
  "google_play_store_listing",
4037
4148
  "mozilla_addon",
4149
+ "github_comment",
4038
4150
  "reddit_subreddit",
4039
4151
  "email_validation",
4040
4152
  "phone_lookup",
@@ -4056,7 +4168,10 @@ var tools_default = {
4056
4168
  "meta_ad",
4057
4169
  "google_ad",
4058
4170
  "adlibrary_ad",
4059
- "contract_deployer"
4171
+ "contract_deployer",
4172
+ "threat_intel",
4173
+ "list_membership",
4174
+ "threat_score"
4060
4175
  ],
4061
4176
  usedBy: [
4062
4177
  "report_create.type"
@@ -4158,7 +4273,8 @@ var tools_default = {
4158
4273
  "SMARTMONEYMATCH",
4159
4274
  "APK_GOLD",
4160
4275
  "GLASSDOOR",
4161
- "PUMP_FUN"
4276
+ "PUMP_FUN",
4277
+ "TUMBLR"
4162
4278
  ],
4163
4279
  usedBy: [
4164
4280
  "asset_changelog.type",
@@ -4168,6 +4284,7 @@ var tools_default = {
4168
4284
  "metrics_takedown_time_trend.assetTypes",
4169
4285
  "organization_assets_list.type",
4170
4286
  "organization_reports_list.assetTypes",
4287
+ "organization_threats_list.assetType",
4171
4288
  "takedowns_list.assetType",
4172
4289
  "threats_list.assetType",
4173
4290
  "user_orgs.assetTypes"
@@ -4196,6 +4313,7 @@ var tools_default = {
4196
4313
  "blocklist",
4197
4314
  "apple_app_store",
4198
4315
  "google_ads_search",
4316
+ "google_ads_transparency_search",
4199
4317
  "mozilla_addon_search",
4200
4318
  "reddit_subreddit_search",
4201
4319
  "asset_check",
@@ -4536,7 +4654,7 @@ var package_default = {
4536
4654
  name: "@chainpatrol/mcp",
4537
4655
  description: "The official ChainPatrol MCP server \u2014 every public API capability as an MCP tool",
4538
4656
  author: "ChainPatrol <support@chainpatrol.io>",
4539
- version: "1.11.0",
4657
+ version: "1.12.0",
4540
4658
  license: "UNLICENSED",
4541
4659
  homepage: "https://chainpatrol.com/docs/mcp",
4542
4660
  keywords: [
@@ -4613,4 +4731,4 @@ export {
4613
4731
  toolsFromEnvironment,
4614
4732
  PACKAGE_VERSION
4615
4733
  };
4616
- //# sourceMappingURL=chunk-7U4RIDQZ.js.map
4734
+ //# sourceMappingURL=chunk-JE3KUTYE.js.map