@jupiterone/jupiterone-mcp 2.2.0 → 2.3.2

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.
Files changed (46) hide show
  1. package/README.md +18 -2
  2. package/dist/client/graphql/queries.d.ts +47 -0
  3. package/dist/client/graphql/queries.d.ts.map +1 -1
  4. package/dist/client/graphql/queries.js +325 -1
  5. package/dist/client/graphql/queries.js.map +1 -1
  6. package/dist/client/jupiterone-client.d.ts +8 -0
  7. package/dist/client/jupiterone-client.d.ts.map +1 -1
  8. package/dist/client/jupiterone-client.js +13 -0
  9. package/dist/client/jupiterone-client.js.map +1 -1
  10. package/dist/client/services/threat-service.d.ts +31 -0
  11. package/dist/client/services/threat-service.d.ts.map +1 -0
  12. package/dist/client/services/threat-service.js +72 -0
  13. package/dist/client/services/threat-service.js.map +1 -0
  14. package/dist/generated/description-map.d.ts.map +1 -1
  15. package/dist/generated/description-map.js +233 -41
  16. package/dist/generated/description-map.js.map +1 -1
  17. package/dist/server/mcp-server.d.ts.map +1 -1
  18. package/dist/server/mcp-server.js +29 -13
  19. package/dist/server/mcp-server.js.map +1 -1
  20. package/dist/server/tools/account.d.ts.map +1 -1
  21. package/dist/server/tools/account.js +7 -2
  22. package/dist/server/tools/account.js.map +1 -1
  23. package/dist/server/tools/errors.d.ts +5 -0
  24. package/dist/server/tools/errors.d.ts.map +1 -1
  25. package/dist/server/tools/errors.js +7 -0
  26. package/dist/server/tools/errors.js.map +1 -1
  27. package/dist/server/tools/index.d.ts.map +1 -1
  28. package/dist/server/tools/index.js +2 -0
  29. package/dist/server/tools/index.js.map +1 -1
  30. package/dist/server/tools/telemetry.d.ts +1 -1
  31. package/dist/server/tools/telemetry.d.ts.map +1 -1
  32. package/dist/server/tools/threat.d.ts +3 -0
  33. package/dist/server/tools/threat.d.ts.map +1 -0
  34. package/dist/server/tools/threat.js +284 -0
  35. package/dist/server/tools/threat.js.map +1 -0
  36. package/dist/server/tools/types.d.ts +15 -1
  37. package/dist/server/tools/types.d.ts.map +1 -1
  38. package/dist/server/tools/types.js +21 -3
  39. package/dist/server/tools/types.js.map +1 -1
  40. package/dist/server/tools/usage.d.ts.map +1 -1
  41. package/dist/server/tools/usage.js +46 -3
  42. package/dist/server/tools/usage.js.map +1 -1
  43. package/dist/types/jupiterone.d.ts +132 -0
  44. package/dist/types/jupiterone.d.ts.map +1 -1
  45. package/node_modules/dtrace-provider/build/Makefile +1 -1
  46. package/package.json +1 -1
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ThreatService = void 0;
4
+ const queries_js_1 = require("../graphql/queries.js");
5
+ /**
6
+ * ThreatService — the client for JupiterOne's Emerging Exposures (threat intelligence) queries on
7
+ * the apps-api public subgraph. Mirrors the other per-domain services: thin request wrappers that
8
+ * surface the raw response and rethrow transport/permission errors for the tool chokepoint to frame.
9
+ *
10
+ * The brief and environment queries return GraphQL UNIONS. A `not_found` or an `unavailable` is a
11
+ * valid union member, NOT an error — only transport, schema, or permission failures throw. The tool
12
+ * handlers flatten the unions to a discriminated shape; nothing here interprets an outcome.
13
+ */
14
+ class ThreatService {
15
+ client;
16
+ constructor(client) {
17
+ this.client = client;
18
+ }
19
+ /**
20
+ * Fetch the decision-grade brief for one subject. `detail` selects the full brief; the default
21
+ * fetches the compact selection set. Returns one of the four outcome union members.
22
+ */
23
+ async getThreatBrief(subjectId, options = {}) {
24
+ const document = options.detail ? queries_js_1.GET_THREAT_FULL : queries_js_1.GET_THREAT_COMPACT;
25
+ try {
26
+ const response = await this.client.request(document, { subjectId, assetExposure: options.assetExposure ?? null });
27
+ if (!response?.emergingExposure) {
28
+ throw new Error('Invalid response structure from JupiterOne API: emergingExposure is missing');
29
+ }
30
+ return response.emergingExposure;
31
+ }
32
+ catch (error) {
33
+ console.error('Error fetching threat brief:', error);
34
+ throw error;
35
+ }
36
+ }
37
+ /** Fetch the cached trending region (ranked items). */
38
+ async getThreatTrending() {
39
+ try {
40
+ const response = await this.client.request(queries_js_1.GET_THREAT_TRENDING);
41
+ const trending = response?.emergingExposureTrending;
42
+ if (!trending || !Array.isArray(trending.items)) {
43
+ throw new Error('Invalid response structure from JupiterOne API: emergingExposureTrending is missing ' +
44
+ 'its items');
45
+ }
46
+ return trending;
47
+ }
48
+ catch (error) {
49
+ console.error('Error fetching trending threats:', error);
50
+ throw error;
51
+ }
52
+ }
53
+ /**
54
+ * Fetch this account's own exposure for up to 25 subjects in one batched traversal. Each element
55
+ * carries its own `subjectId`; key off it rather than position.
56
+ */
57
+ async checkThreatExposure(subjectIds) {
58
+ try {
59
+ const response = await this.client.request(queries_js_1.CHECK_THREAT_EXPOSURE, { subjectIds });
60
+ if (!Array.isArray(response?.emergingExposureEnvironments)) {
61
+ throw new Error('Invalid response structure from JupiterOne API: emergingExposureEnvironments is not an array');
62
+ }
63
+ return response.emergingExposureEnvironments;
64
+ }
65
+ catch (error) {
66
+ console.error('Error checking threat exposure:', error);
67
+ throw error;
68
+ }
69
+ }
70
+ }
71
+ exports.ThreatService = ThreatService;
72
+ //# sourceMappingURL=threat-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threat-service.js","sourceRoot":"","sources":["../../../src/client/services/threat-service.ts"],"names":[],"mappings":";;;AAOA,sDAK+B;AAE/B;;;;;;;;GAQG;AACH,MAAa,aAAa;IACJ;IAApB,YAAoB,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C;;;OAGG;IACH,KAAK,CAAC,cAAc,CAClB,SAAiB,EACjB,UAAqE,EAAE;QAEvE,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,4BAAe,CAAC,CAAC,CAAC,+BAAkB,CAAC;QACvE,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACxC,QAAQ,EACR,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,CAAC,aA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AAC,4BAA4B,CAAC;QAC/C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;YACxD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAnED,sCAmEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"description-map.d.ts","sourceRoot":"","sources":["../../src/generated/description-map.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqqGjD,CAAC"}
1
+ {"version":3,"file":"description-map.d.ts","sourceRoot":"","sources":["../../src/generated/description-map.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAq2GjD,CAAC"}
@@ -3,6 +3,54 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.descriptionMap = void 0;
4
4
  /* AUTO-GENERATED — DO NOT EDIT MANUALLY */
5
5
  exports.descriptionMap = {
6
+ "check-threat-exposure.md": `# Check Threat Exposure Tool
7
+
8
+ Answer, from **this account's own graph**, whether it is exposed to one or more
9
+ CVEs — how many of its devices a vulnerability scanner has confirmed carry each
10
+ CVE, a handle to drill into the affected assets, and whether any matched device
11
+ is internet-facing.
12
+
13
+ This is the **direct/strict** match: it joins on the unified vulnerability's
14
+ \`cveId\`, so it sees only what a scanner has already fingerprinted for that
15
+ specific CVE. It is the companion to \`get-threat\` (intelligence about the CVE)
16
+ and \`get-threat-trending\` (what is hot).
17
+
18
+ ## Parameters
19
+ - \`cveIds\` (required): 1–25 CVE identifiers. Each is answered independently and
20
+ carries its own \`subjectId\`; key results off \`subjectId\`, not position. A
21
+ malformed id fails only its own entry.
22
+
23
+ ## Reading the result — the rules that matter
24
+ - **\`status: "checked"\` means the lookup ran and the count is real.** It says nothing about
25
+ whether the vulnerability is remediated — read the count.
26
+ - **\`scannerConfirmedAssetCount: 0\` does NOT mean "not affected."** It means no scanner reported
27
+ it — absence of a finding is not evidence of absence. Render it as "none found," never "not
28
+ affected." There is no not-found outcome: a CVE that does not exist and a real CVE with no
29
+ scanner findings both return \`0\`. Only \`get-threat\` answers existence.
30
+ - **\`status: "unavailable"\` is NOT a zero count.** The graph lookup failed or timed out; it is a
31
+ retry state. Never collapse it into "0 affected."
32
+ - **\`assetExposure: null\` means unknown**, not "not internet-facing." It is set only when a matched
33
+ device carries an exposure classification.
34
+ - **A count is only as fresh as the scanner behind it.** Before calling a count live, drill in and
35
+ check when the findings were last observed; a feed that stopped months ago still reports its last
36
+ findings. \`unifiedVulnerabilityId\` is the \`_id\` of this account's \`unified_entity\` for the CVE:
37
+ \`\`\`
38
+ FIND * WITH _id = '<unifiedVulnerabilityId>' THAT RELATES TO Finding AS f THAT RELATES TO (Host|Device|Domain) AS a RETURN a.displayName, a._type, f._type, f._beginOn ORDER BY f._beginOn DESC LIMIT 50
39
+ \`\`\`
40
+ Restrict the second hop as shown — unrestricted, it is dominated by control tests and alerts.
41
+ - Ids are normalised to upper case before the lookup; casing does not matter.
42
+
43
+ Each result's \`status\` is one of: \`checked\`, \`invalid_input\`, \`unavailable\`.
44
+
45
+ ## Access
46
+ Requires the account's VulnerabilityManagement entitlement and vulnerability read
47
+ permission.
48
+
49
+ ## Example
50
+ \`\`\`json
51
+ { "cveIds": ["CVE-2021-44228", "CVE-2023-4966"] }
52
+ \`\`\`
53
+ `,
6
54
  "create-dashboard-widget.md": `# JupiterOne Create Dashboard Widget Tool
7
55
 
8
56
  **Purpose**: Adds a new widget to a specified JupiterOne dashboard. This tool allows you to programmatically create visual widgets (such as pie charts, bar charts, tables, etc.) on any dashboard, using custom queries and configuration.
@@ -50,7 +98,6 @@ The following values are supported for the \`type\` property when creating a wid
50
98
 
51
99
  \`\`\`typescript
52
100
  export enum ChartType {
53
- Area = 'area',
54
101
  Bar = 'bar',
55
102
  Graph = 'graph',
56
103
  Line = 'line',
@@ -63,6 +110,9 @@ export enum ChartType {
63
110
  }
64
111
  \`\`\`
65
112
 
113
+ \`area\` is not supported: the API stores an area widget but it renders nothing, so this tool
114
+ refuses \`type: "area"\`. Use \`bar\` or \`line\`.
115
+
66
116
  ## Example Usage
67
117
  \`\`\`json
68
118
  {
@@ -123,8 +173,8 @@ and the write still returns success. The response names anything it discarded; r
123
173
  - **\`decimalLimit\`** — \`0\`, \`1\`, \`2\`, \`3\` or \`4\`: decimal places on the data labels. Accepted on
124
174
  \`bar\`, \`line\`, \`number\` and \`pie\`. Counts want \`0\`.
125
175
  - **Readability** — \`showDataLabels\` (bool), \`dataLabelUnit\` (\`'%'\`, \`'$'\`, \`'#'\` or \`''\`) and
126
- \`chartFontSize\` (\`'small'\`, \`'medium'\`, \`'large'\`) on \`bar\`, \`line\`, \`area\` and \`pie\`;
127
- \`xAxisLabel\` and \`yAxisLabel\` (strings) on \`bar\`, \`line\` and \`area\`. Axis labels are worth the
176
+ \`chartFontSize\` (\`'small'\`, \`'medium'\`, \`'large'\`) on \`bar\`, \`line\` and \`pie\`;
177
+ \`xAxisLabel\` and \`yAxisLabel\` (strings) on \`bar\` and \`line\`. Axis labels are worth the
128
178
  two keys — \`x\` and \`y\` tell a reader nothing.
129
179
 
130
180
  ## Number
@@ -414,25 +464,8 @@ Find Person as p that is User as u
414
464
  ---
415
465
 
416
466
  ## Area Chart
417
- The area chart is a graph that combines a line chart and a bar chart to show changes in quantities over time. This chart requires the assets in the query to have relevant dates in their properties. For the best results, these charts can be generated by J1 Questions that have trend collection enabled. (This will soon be available straight from Insights.)
418
-
419
- ### Query Requirements
420
467
  **Not a supported Insights widget type, and \`type: "area"\` is refused.** JupiterOne's documentation lists Number, Pie, Line, Bar, Matrix, Table, Graph and Status, and says "Area Chart is coming soon" — today an area trend comes from a Question. The API accepts an area widget and it renders nothing, so no column arrangement can fix it. Use \`bar\` or \`line\` instead.
421
468
 
422
- ### Example Queries
423
- **Top 5 most open PRs by Person:**
424
- \`\`\`j1ql
425
- FIND Person AS p
426
- THAT IS User AS u
427
- THAT opened PR
428
- WITH state='OPEN' AS pr
429
- RETURN
430
- p.displayName AS x,
431
- count(pr) AS y
432
- ORDER BY y DESC
433
- LIMIT 5
434
- \`\`\`
435
-
436
469
  ---
437
470
 
438
471
  ## Markdown Chart
@@ -1742,19 +1775,116 @@ Get query results from a rule evaluation:
1742
1775
  "rawDataKey": "results-key-123"
1743
1776
  }
1744
1777
  \`\`\``,
1778
+ "get-threat-trending.md": `# Get Trending Threats Tool
1779
+
1780
+ Return the ranked list of currently trending threats — CVEs that have recently
1781
+ escalated (newly exploited in the wild, weaponized, added to a KEV catalog, or a
1782
+ public PoC appeared). Each row carries the escalation reason, the affected
1783
+ vendor/product, whether a commercial-scanner coverage gap exists, and KEV
1784
+ additions.
1785
+
1786
+ This is JupiterOne's threat-intelligence trending region. It says what is hot
1787
+ right now; it does NOT say whether this account is affected — pair it with
1788
+ \`check-threat-exposure\` (direct/scanner match) or, for product-presence, a J1QL
1789
+ query on the row's \`affectedProduct\`.
1790
+
1791
+ ## Parameters
1792
+ - \`limit\` (optional): client-side cap on the number of items returned. The server list is
1793
+ ranked and capped upstream (25 rows at the time of writing), usually all \`act_now\`, so list
1794
+ order is the ranking.
1795
+
1796
+ ## Important
1797
+ - The list is **cached** (~30-minute TTL) — the one non-live path. \`generatedAt\` is the cache
1798
+ fill time of the instance that answered; consecutive calls can differ by a minute.
1799
+ - \`affectedProduct\` and \`impactLabel\` are **null on roughly a third of rows**. For those, a
1800
+ product-presence search is impossible from this result alone. \`get-threat\` may fill the gap — its
1801
+ compact brief carries \`affectedProduct\` — but **often it cannot**: a newly-trending CVE frequently
1802
+ has no product identity anywhere upstream, in the compact brief or under \`detail: true\`. When both
1803
+ are null the row simply cannot be assessed by presence. Use \`check-threat-exposure\` alone, and
1804
+ report the row as **"cannot assess"** — never as "not affected".
1805
+ - A product-presence search matches on **text**, so it also matches your own tooling: searching the
1806
+ graph for \`artifactory\` returns the container images of JupiterOne's *integration for* Artifactory,
1807
+ not a running Artifactory server. Before counting presence hits as exposure, confirm the matched
1808
+ entities are instances of the product rather than code, images, pipelines or alarms named after it.
1809
+
1810
+ ## Access
1811
+ Requires the account's VulnerabilityManagement entitlement and vulnerability read
1812
+ permission.
1813
+
1814
+ ## Example
1815
+ \`\`\`json
1816
+ {}
1817
+ \`\`\`
1818
+ `,
1819
+ "get-threat.md": `# Get Threat Brief Tool
1820
+
1821
+ Return JupiterOne's decision-grade threat brief for a single CVE — how dangerous
1822
+ it is, whether it is being exploited, whether the security ecosystem can detect
1823
+ it, and how fast CISA's directive says to remediate it. This is threat
1824
+ intelligence about the CVE itself; to find out whether **this account** is
1825
+ affected, use \`check-threat-exposure\`.
1826
+
1827
+ ## Parameters
1828
+ - \`cveId\` (required): a CVE identifier, e.g. \`CVE-2021-44228\`. Case-insensitive.
1829
+ - \`assetExposure\` (optional): \`public\` or \`internal\`. The BOD 26-04 asset-exposure
1830
+ hook — when supplied, the remediation section returns a single resolved branch
1831
+ instead of the two-branch conditional. Omit to receive both branches when they differ; when the
1832
+ directive gives the same answer for public and internal assets the section carries one branch.
1833
+ - \`detail\` (optional, default \`false\`): when \`false\`, returns a compact,
1834
+ decision-first summary. When \`true\`, returns the full brief (CPE footprint, threat-actor
1835
+ techniques and control mappings, detection tooling, exploit references, source labels) — a
1836
+ much larger payload. The raw reference URL lists (thousands of rows) are not included.
1837
+
1838
+ The compact result also carries \`affectedProduct\` (vendor, product, version ranges) — the join key
1839
+ for a product-presence search of the graph when a trending row has none. It is **itself null for a
1840
+ substantial share of newly-trending CVEs**, and \`detail: true\` does not fill it in when it is: if
1841
+ the compact brief has no product, the full brief has none either, so do not spend the larger call
1842
+ looking. A CVE with no product identity cannot be assessed by presence at all — say so rather than
1843
+ reporting it as not affected.
1844
+
1845
+ The compact result carries \`ssvc.divergences\` when the sources behind the SSVC triple disagree
1846
+ (e.g. exploitation \`displayed: "active"\` against another source's \`"none"\`). The \`headline\` and
1847
+ \`support\` prose states the displayed value flatly, so when \`divergences\` is non-empty, carry the
1848
+ disagreement into any claim you make about active exploitation.
1849
+
1850
+ ## Outcomes
1851
+ The \`outcome\` field is always one of four, and they are NOT interchangeable:
1852
+ - \`found\` — a brief was returned. This describes the lookup, not the CVE: it says nothing about
1853
+ whether the vulnerability is remediated anywhere.
1854
+ - \`not_found\` — a valid CVE id with no upstream record.
1855
+ - \`invalid_input\` — the input was not a CVE identifier; no lookup was attempted.
1856
+ - \`source_unavailable\` — the upstream was unreachable/timed out/rate-limited.
1857
+ **This is a retry state, never "no such CVE."** Do not tell the user the CVE
1858
+ does not exist; the id is preserved so you can retry.
1859
+
1860
+ ## Access
1861
+ Requires the account's VulnerabilityManagement entitlement and vulnerability read
1862
+ permission. Without them the call returns an access-denied error.
1863
+
1864
+ ## Example
1865
+ \`\`\`json
1866
+ { "cveId": "CVE-2021-44228" }
1867
+ \`\`\`
1868
+ Full detail, with a known internet-facing asset:
1869
+ \`\`\`json
1870
+ { "cveId": "CVE-2023-4966", "assetExposure": "public", "detail": true }
1871
+ \`\`\`
1872
+ `,
1745
1873
  "list-accounts.md": `# List Accounts Tool
1746
1874
 
1747
- List the JupiterOne accounts the authenticated user can access. Returns each account's \`accountId\`, a human-readable \`displayName\`, and — when the host can construct one — \`mcpUrl\`, the connector/server URL that pins that account. The list is scoped to the user's memberships. Membership is not a guarantee of live access, though — an account may still reject the connection if access was revoked or disabled, or if it requires a different sign-in method such as SSO.
1875
+ List the JupiterOne accounts the authenticated user can access. Returns each account's \`accountId\`, a human-readable \`displayName\`, and — when the host can construct one — \`mcpUrl\`, a connector URL pinned to that account. The list is scoped to the user's memberships. Membership is not a guarantee of live access, though — an account may still reject the connection if access was revoked or disabled, or if it requires a different sign-in method such as SSO.
1748
1876
 
1749
1877
  ## When to use
1750
1878
 
1751
- - Call this **first** when no specific account is configured and other tools ask for an \`accountId\`.
1879
+ - Call this **first** when other tools ask for an \`accountId\` and the user has not named one.
1752
1880
  - Use it to map an account **name** the user mentions to the \`accountId\` those tools require — always pass the \`accountId\`, never the display name.
1753
- - When a connection is pinned to an account the user cannot access (data tools return "Not authorized"), call this to find the right account and give the user its \`mcpUrl\` to reconfigure the connector.
1881
+ - When a data tool returns "Not authorized", recovery depends on the connection:
1882
+ - **Tools take an \`accountId\`:** retry with another \`accountId\` from this list. The connection itself is fine; do not ask the user to change it.
1883
+ - **The connection is pinned** (tools take no \`accountId\`, and the error names the pinned account): give the user the \`mcpUrl\` of an account they can access so they can update the connector.
1754
1884
 
1755
1885
  ## Working across multiple accounts
1756
1886
 
1757
- Every other tool acts on **one** account per call (via its \`accountId\` parameter). To operate across several accounts the user can access — for example "check this across all my accounts" — call this tool, then repeat the target tool once per \`accountId\` and aggregate the results.
1887
+ When tools take an \`accountId\`, each call acts on **one** account. To operate across several accounts the user can access — for example "check this across all my accounts" — call this tool, then repeat the target tool once per \`accountId\` and aggregate the results.
1758
1888
 
1759
1889
  ## Parameters
1760
1890
 
@@ -1782,17 +1912,14 @@ Request the first 5 active alerts:
1782
1912
  \`\`\``,
1783
1913
  "list-entity-types.md": `# JupiterOne Entity Types Discoverer
1784
1914
 
1785
- **Purpose**: Discovers all entity classes and types in your JupiterOne account. This tool helps you find relevant entity types when building queries or exploring your data model.
1786
-
1787
- **CRITICAL**: This tool should ALWAYS be run FIRST before writing any J1QL queries. Without knowing what entity classes and types exist in your JupiterOne account, you cannot write valid queries that will return results and are more likely to hallucinate. This is the essential first step for any query-writing task.
1915
+ **Purpose**: Lists the entity classes and types in your JupiterOne account's entity index, with a count for each. Use it to find the classes and types to name in a J1QL query before you write one.
1788
1916
 
1789
- This tool provides a comprehensive count of all entity classes and types in your account using an efficient GraphQL query.
1917
+ Run this before writing J1QL queries. A query that names a class or type the account does not hold returns nothing, and guessing names from memory is how that happens.
1790
1918
 
1791
1919
  ## Features
1792
- - Returns all entity classes and types in your account
1793
- - Shows counts for each class and type
1920
+ - Returns the entity classes and types in the account's index, with a count for each
1794
1921
  - Provides results as key-value pairs for easy lookup
1795
- - Fast and efficient - no pagination required
1922
+ - One call, no pagination
1796
1923
 
1797
1924
  ## Example Usage
1798
1925
 
@@ -1824,15 +1951,16 @@ Example response:
1824
1951
  \`\`\`
1825
1952
 
1826
1953
  ## Use Cases
1827
- - **REQUIRED FIRST STEP**: Run this before writing any J1QL queries to know what entities exist
1954
+ - Run this before writing J1QL queries to see which entities the account holds
1828
1955
  - Discovering available entity types before writing J1QL queries
1829
1956
  - Finding integration-specific entities (e.g., all Snyk entities)
1830
1957
  - Understanding your data model and available entity types
1831
1958
  - Exploring what data is available from specific integrations
1832
1959
 
1833
- ## Why This Is Essential
1960
+ ## Why run it first
1961
+
1962
+ J1QL queries name entity classes (like \`User\`, \`Device\`, \`Finding\`) or entity types (like \`aws_instance\`, \`github_user\`). This tool shows which of them the account holds, so a query names ones that exist instead of guessing.
1834
1963
 
1835
- When writing J1QL queries, you need to specify entity classes (like \`User\`, \`Device\`, \`Finding\`) or entity types (like \`aws_instance\`, \`github_user\`). Without running this tool first, you're essentially guessing what entities exist in your account. This tool provides the complete list of valid entity classes and types that you can query, ensuring your J1QL queries will actually find and return data.
1836
1964
  ## Treat this list as a positive check, not a complete one
1837
1965
 
1838
1966
  The counts come from a stored index, and it is not a superset of the graph: measured on a live
@@ -2005,7 +2133,7 @@ design the board on paper before creating anything.
2005
2133
  → orange → blue, gray for neutral/"other" — color follows meaning, never decoration, and
2006
2134
  never a rainbow of arbitrary hues.
2007
2135
  - **Formatting**: \`decimalLimit\` (0–4) so figures read precisely; \`dataLabelUnit\` ('%', '$',
2008
- '#') on \`bar\`/\`line\`/\`area\`/\`pie\` where the unit is not obvious — a \`number\` tile takes
2136
+ '#') on \`bar\`/\`line\`/\`pie\` where the unit is not obvious — a \`number\` tile takes
2009
2137
  \`currencyFormat\` instead, and percentage mode renders its own \`%\`; axis labels on
2010
2138
  \`bar\`/\`line\` when the axes need naming.
2011
2139
  - **\`drilldownQuery\`** on every counting query: the J1QL a reader lands on when they click the
@@ -2053,6 +2181,54 @@ design the board on paper before creating anything.
2053
2181
  exposed buckets" is a result worth showing; decide whether zero is the point, and if it is,
2054
2182
  keep the widget with its \`noResultMessage\`. Then tell the user what the board shows, what it
2055
2183
  deliberately does not, which reader each tier serves, and give them its URL.
2184
+ `,
2185
+ "prompt-check-trending-threats.md": `Review the currently trending threats. Scope: {{scope}}.
2186
+
2187
+ Use \`get-threat-trending\` to fetch the ranked list. It is cached (~30-minute TTL);
2188
+ \`generatedAt\` is the fill time. Each item carries \`subjectId\`, \`tier\`,
2189
+ \`impactLabel\`, \`affectedProduct\` (vendor/product), the escalation \`reason\` (event,
2190
+ date, days ago), \`trendingMilestones\`, \`coverageGap\`, and KEV additions.
2191
+
2192
+ Interpret the scope as follows.
2193
+
2194
+ ## scope = all (default)
2195
+ Present every trending threat, regardless of whether this account is affected.
2196
+ Rank them as returned (most recently escalated first). For each, state the
2197
+ escalation reason and age, the tier, and flag a \`coverageGap\` (no commercial
2198
+ scanner can detect it — the sharpest signal a row carries). Do not filter.
2199
+
2200
+ ## scope = environment
2201
+ Show only trending threats that are relevant to this account's environment. Two
2202
+ applicability bars — use PRODUCT PRESENCE as the default bar:
2203
+
2204
+ 1. **Product presence (loose, version-agnostic — the default).** For each trending
2205
+ item, take \`affectedProduct.vendor\` / \`affectedProduct.product\` and use
2206
+ \`execute-j1ql-query\` to check whether the account runs that product AT ALL,
2207
+ regardless of version. Search across the plausible entity classes (e.g.
2208
+ Application, Host, Device, and installed-software/CodeModule entities) matching
2209
+ on name/displayName/vendor. Treat ANY match as "product present." A trending
2210
+ threat on one version of a product is shown if the customer has any instance of
2211
+ that product. **This is a heuristic name match** — it can over-match (an
2212
+ unrelated product of the same name) or under-match (the graph names the product
2213
+ differently); label these results "product likely present, version unconfirmed"
2214
+ and never state a definitive version-specific exposure from this bar alone.
2215
+ Rows with \`affectedProduct: null\` (roughly a third) cannot be checked this way: call
2216
+ \`get-threat\` for the row and use the compact brief's \`affectedProduct\` if present;
2217
+ otherwise rely on the direct match alone and say so in the output.
2218
+
2219
+ 2. **Direct match (strict — an overlay, not the gate).** Also call
2220
+ \`check-threat-exposure\` with the trending \`subjectId\`s (batched, ≤25) to get the
2221
+ scanner-confirmed signal. Where \`scannerConfirmedAssetCount > 0\`, annotate the
2222
+ row as "scanner-confirmed on N assets" — a stronger statement than product
2223
+ presence. Remember: count \`0\` means "none found," not "not affected," and
2224
+ \`unavailable\` is a retry state, not a zero.
2225
+
2226
+ Present the relevant threats ranked, each showing which bar it met (product present
2227
+ vs scanner-confirmed) and its escalation reason and remediation urgency. If nothing
2228
+ is relevant, say so plainly rather than padding the list.
2229
+
2230
+ (A future option may let the user require a direct match only; for now the default
2231
+ bar is product presence.)
2056
2232
  `,
2057
2233
  "server-instructions.md": `JupiterOne is a security asset graph. Assets are entities, connected by relationships, queried with
2058
2234
  J1QL. Use these tools for anything about the user's real inventory, misconfigurations,
@@ -2122,12 +2298,13 @@ that is never populated) and merely notes it otherwise. Build in this order:
2122
2298
  \`create-dashboard\` → \`create-dashboard-widget\` once per widget → \`update-dashboard\` with
2123
2299
  \`autoLayout\`. Never leave widgets at their default size.
2124
2300
 
2125
- ## One connection, one account
2301
+ ## One call, one account
2126
2302
 
2127
- Everything here runs against the account this connection is bound to — there is no cross-account
2128
- query. Before presenting findings as a customer's, confirm which account you are on with
2129
- \`test-connection\`; validating against a demo or dev tenant and delivering the result as production
2130
- is the most expensive mistake available here, because nothing about the output looks wrong.
2303
+ Every call acts on one account — there is no cross-account query. A connection is either pinned
2304
+ to one account or takes an \`accountId\` on every tool. Before presenting findings as a customer's,
2305
+ confirm which account you are on with \`test-connection\`; validating against a demo or dev tenant
2306
+ and delivering the result as production is the most expensive mistake available here, because
2307
+ nothing about the output looks wrong.
2131
2308
 
2132
2309
  ## Paging differs by tool
2133
2310
 
@@ -2143,6 +2320,21 @@ cursor silently re-returns the first page rather than advancing.
2143
2320
  \`get-rule-evaluation-details\` for that run's conditions and actions, or a \`rawDataKey\` to
2144
2321
  \`get-rule-evaluation-query-results\` for the entities it matched.
2145
2322
 
2323
+ ## Threat intelligence vs. your own environment
2324
+
2325
+ Three threat tools answer three different questions, and conflating them is the trap. \`get-threat\`
2326
+ is intelligence about a CVE itself (how dangerous, exploited, detectable, remediation deadline).
2327
+ \`get-threat-trending\` is what has recently escalated across the ecosystem. \`check-threat-exposure\`
2328
+ is the only one that reads THIS account's graph — whether a scanner has confirmed the CVE on the
2329
+ account's devices. A trending or high-tier CVE says nothing about whether the account is affected
2330
+ until you check exposure. For a looser read than a scanner match — the account runs the affected
2331
+ product at any version — take a trending row's \`affectedProduct\` (vendor/product) and search the
2332
+ graph with \`execute-j1ql-query\`; treat a name match as "product likely present, version
2333
+ unconfirmed", never a definitive exposure.
2334
+
2335
+ These tools also need the account's VulnerabilityManagement entitlement and vulnerability read
2336
+ permission. An access-denied from them says so; do not read it as a revoked account.
2337
+
2146
2338
  ## Permissions are advisory, never a reason to refuse
2147
2339
 
2148
2340
  \`test-connection\` reports \`permissions.resourceAreas\` and \`permissions.hasBroadAccess\`. Both
@@ -2172,7 +2364,7 @@ None required.
2172
2364
  - \`permissions.hasBroadAccess\`: true when the caller holds the \`accessAdmin\` statement. It is one signal among several the authorizer uses, so \`false\` does not mean restricted — sessions with \`hasBroadAccess: false\` and every area \`false\` have created, updated and deleted dashboards. **Never refuse an operation on the basis of either field.** Attempt it and let the API answer.
2173
2365
 
2174
2366
  ## Failure
2175
- A failed test returns an error result whose text explains why and what to do next. When the failure is an authorization rejection and account discovery is available, the text includes the accounts your sign-in CAN access (with connector URLs) — relay these to the user so they can fix the connector's account binding. Do not loop on re-authentication: if the text says the pinned account is inaccessible, re-authenticating will not fix it.
2367
+ A failed test returns an error result whose text explains why and what to do next. When the failure is an authorization rejection and account discovery is available, the text lists the accounts your sign-in CAN access. If tools take an \`accountId\`, retry with one of those — the connection itself needs no change. If the connection is pinned, the list carries each account's connector URL — relay it so the user can fix the connector's account binding. Do not loop on re-authentication: if the text says the pinned account is inaccessible, re-authenticating will not fix it.
2176
2368
  `,
2177
2369
  "update-dashboard-widget.md": `# Update Dashboard Widget Tool
2178
2370
 
@@ -1 +1 @@
1
- {"version":3,"file":"description-map.js","sourceRoot":"","sources":["../../src/generated/description-map.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAC9B,QAAA,cAAc,GAA2B;IACpD,4BAA4B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FAyc2D;IACzF,qBAAqB,EAAE;;;;;;;;;;;;;iGAawE;IAC/F,gCAAgC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Q;IAKhB,oDAAoD;IACpD,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,gBAAgB;IAsBxB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IA2BjB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAC0G;YAE3I,MAAM;IA0DpB;;;;;;;;OAQG;IACH,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;KAAE,GAAG,cAAc;IAI3E,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAStB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAM5B"}
@@ -35,6 +35,17 @@ function isStandardSchema(outputSchema) {
35
35
  function buildOutputSchema(outputSchema) {
36
36
  return isStandardSchema(outputSchema) ? outputSchema : zod_1.z.object(outputSchema).loose();
37
37
  }
38
+ /**
39
+ * A prompt's single user message, built from a description template with every `{{name}}` filled
40
+ * from `vars`. Function replacement, because as a string `$&`, `$'` and `$1` in a user-supplied value
41
+ * would be read as replacement patterns and silently rewrite what they typed. Global, because a
42
+ * template may name the same argument in several steps. A placeholder `vars` does not name is left
43
+ * as written.
44
+ */
45
+ function promptFromTemplate(file, vars) {
46
+ const text = (0, load_description_js_1.loadDescription)(file).replace(/\{\{(\w+)\}\}/g, (placeholder, name) => Object.hasOwn(vars, name) ? vars[name] : placeholder);
47
+ return { messages: [{ role: 'user', content: { type: 'text', text } }] };
48
+ }
38
49
  class JupiterOneMcpServer {
39
50
  server;
40
51
  client;
@@ -94,19 +105,23 @@ class JupiterOneMcpServer {
94
105
  .string()
95
106
  .describe('What the dashboard is for, e.g. "a CISO view of internet-exposed risk"'),
96
107
  },
97
- }, ({ objective }) => ({
98
- messages: [
99
- {
100
- role: 'user',
101
- content: {
102
- type: 'text',
103
- // A function replacement: as a string, `$&`, `$'` and `$1` in the objective would be
104
- // read as replacement patterns and silently rewrite what the user typed.
105
- text: (0, load_description_js_1.loadDescription)('prompt-build-dashboard.md').replace('{{objective}}', () => objective),
106
- },
107
- },
108
- ],
109
- }));
108
+ }, ({ objective }) => promptFromTemplate('prompt-build-dashboard.md', { objective }));
109
+ // Trending-threat triage: a multi-tool sequence no single tool description can own (trending
110
+ // -> product presence via J1QL -> scanner-confirmed exposure as an overlay). A per-CVE
111
+ // investigation needs no prompt: get-threat and check-threat-exposure each name the other.
112
+ server.registerPrompt('check-trending-threats', {
113
+ title: 'Check trending threats',
114
+ description: 'Review the currently trending threats. Default shows all trending threats; scope ' +
115
+ '"environment" filters to those relevant to this account (product presence, with the ' +
116
+ 'scanner-confirmed match as an overlay).',
117
+ argsSchema: {
118
+ scope: zod_1.z
119
+ .enum(['all', 'environment'])
120
+ .optional()
121
+ .describe('all (default) = every trending threat; environment = only those relevant to this ' +
122
+ "account's environment."),
123
+ },
124
+ }, ({ scope }) => promptFromTemplate('prompt-check-trending-threats.md', { scope: scope ?? 'all' }));
110
125
  for (const tool of index_js_1.allTools) {
111
126
  // Account-discovery tools need a host-supplied resolver (the multi-tenant remote); skip them
112
127
  // when none is provided (stdio / fixed-account connectors have nothing to list or select).
@@ -219,6 +234,7 @@ class JupiterOneMcpServer {
219
234
  ? (0, errors_js_1.accessDeniedResult)(deniedStatus, {
220
235
  hasAccountDiscovery: !!this.resolveAccounts,
221
236
  pinnedAccountId: this.envAccountId,
237
+ hint: tool.accessDeniedHint,
222
238
  })
223
239
  : tool.formatError
224
240
  ? tool.formatError(error, toolParams, this.validator)
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../../src/server/mcp-server.ts"],"names":[],"mappings":";;;AAAA,8DAAgE;AAChE,yDAA2E;AAM3E,6BAAwB;AACxB,yEAAkE;AAElE,qDAA6C;AAC7C,kEAA2D;AAC3D,+CAA4C;AAC5C,iDAA4F;AAE5F,uDAA2E;AAC3E,uCAA4C;AAC5C,sEAA+D;AAC/D,+CAAmF;AAgCnF,mGAAmG;AACnG,SAAS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;;AAxRH,kDAyRC"}
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/server/tools/account.ts"],"names":[],"mappings":"AAKA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAqCxE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAEhE;AAED,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAExF;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,KAAK,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,GAClH,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAe7B;AAiBD,eAAO,MAAM,YAAY,EAAE,cAAc,EAyExC,CAAC"}
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/server/tools/account.ts"],"names":[],"mappings":"AAKA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAqCxE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAEhE;AAED,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAExF;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,KAAK,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,GAClH,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAe7B;AAiBD,eAAO,MAAM,YAAY,EAAE,cAAc,EAiFxC,CAAC"}
@@ -124,14 +124,19 @@ exports.accountTools = [
124
124
  ? error.message
125
125
  : 'Unknown error';
126
126
  // On an authz failure with discovery available, list what the caller CAN reach — this turns a
127
- // wrong-account binding from a multi-day loop into a one-shot diagnosis.
127
+ // wrong-account binding from a multi-day loop into a one-shot diagnosis. Connector URLs are
128
+ // the fix only for a pinned connection. A multi-tenant one recovers by passing another
129
+ // accountId, and its own URL may be unchangeable (an OpenAI directory listing's is), so
130
+ // naming per-account URLs there steers the user off a connection that works.
128
131
  if (deniedStatus !== null && context.resolveAccounts) {
129
132
  const accounts = await context.resolveAccounts().catch(() => null);
130
133
  if (accounts && accounts.length > 0) {
134
+ const withUrl = !!context.pinnedAccountId;
131
135
  reason +=
132
136
  '\n\nAccounts your sign-in can access:\n' +
133
137
  accounts
134
- .map((a) => `- ${a.displayName} (${a.accountId})${a.mcpUrl ? ` — ${a.mcpUrl}` : ''}`)
138
+ .map((a) => `- ${a.displayName} (${a.accountId})` +
139
+ (withUrl && a.mcpUrl ? ` — ${a.mcpUrl}` : ''))
135
140
  .join('\n');
136
141
  }
137
142
  }