@unified-product-graph/mcp-server 0.9.0 → 0.9.1

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/TOOLS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # UPG MCP Server: Tool Reference
2
2
 
3
- Reference for the 106 tools exposed by `@unified-product-graph/mcp-server`. Generated from JSDoc on `src/tools/*.ts` (do not edit by hand).
3
+ Reference for the 108 tools exposed by `@unified-product-graph/mcp-server`. Generated from JSDoc on `src/tools/*.ts` (do not edit by hand).
4
4
 
5
5
  ## Contents
6
6
 
@@ -8,7 +8,7 @@ Reference for the 106 tools exposed by `@unified-product-graph/mcp-server`. Gene
8
8
  - [Nodes](#nodes): 15 tools
9
9
  - [Edges](#edges): 9 tools
10
10
  - [Areas & Change Log](#areas-change-log): 10 tools
11
- - [Workspace & Portfolios](#workspace-portfolios): 15 tools
11
+ - [Workspace & Portfolios](#workspace-portfolios): 17 tools
12
12
  - [Schema](#schema): 1 tool
13
13
  - [Spec Introspection](#spec-introspection): 45 tools
14
14
  - [Cloud Sync](#cloud-sync): 3 tools
@@ -1219,6 +1219,8 @@ _Multi-product discovery, switching, init, cross-product edges._
1219
1219
  - [`list_portfolio_cross_edges`](#list-portfolio-cross-edges)
1220
1220
  - [`list_portfolios`](#list-portfolios)
1221
1221
  - [`migrate_cross_edges`](#migrate-cross-edges)
1222
+ - [`portfolio_digest`](#portfolio-digest)
1223
+ - [`portfolio_query`](#portfolio-query)
1222
1224
  - [`switch_product`](#switch-product)
1223
1225
  - [`update_product`](#update-product)
1224
1226
 
@@ -1276,7 +1278,7 @@ or when no portfolio document exists (pass `auto_create_portfolio: true` to mint
1276
1278
 
1277
1279
  ### `create_cross_product_edge`
1278
1280
 
1279
- Create a cross-product relationship between two entities in different products within a portfolio graph. Types: `shares_persona`, `shares_competitor`, `shares_metric`, `depends_on_product`, `cannibalises`, `succeeds`, `hosts` (host product runs the hosted product inside itself, directed host to hosted).
1281
+ Create a cross-product relationship between two entities in different products within a portfolio graph. Types: `shares_persona`, `shares_competitor`, `shares_metric`, `depends_on_product`, `cannibalises`, `succeeds`, `hosts` (host product runs the hosted product inside itself, directed host to hosted), `contributes_to` (a product strategy entity rolls up to a higher-level one, e.g. product objective → company objective, product key_result → company key_result; directed subordinate to superior).
1280
1282
 
1281
1283
  **Atomicity:** `non-atomic. Portfolio file create (if new) + edge append are
1282
1284
  separate filesystem operations.`
@@ -1289,7 +1291,7 @@ separate filesystem operations.`
1289
1291
  | `source_product_id` | string | | Product ID of the source node |
1290
1292
  | `target_id` | string | ✓ | Target node ID |
1291
1293
  | `target_product_id` | string | | Product ID of the target node |
1292
- | `type` | `shares_persona` \| `shares_competitor` \| `shares_metric` \| `depends_on_product` \| `cannibalises` \| `succeeds` \| `hosts` | ✓ | Cross-product relationship type |
1294
+ | `type` | `shares_persona` \| `shares_competitor` \| `shares_metric` \| `depends_on_product` \| `cannibalises` \| `succeeds` \| `hosts` \| `contributes_to` | ✓ | Cross-product relationship type |
1293
1295
 
1294
1296
  **Returns:**
1295
1297
 
@@ -1530,6 +1532,61 @@ inline cross-edges and reports `migrated: []`.
1530
1532
  **See also:** `create_cross_product_edge`, `list_portfolio_cross_edges`, `list_cross_edge_types`, `init_workspace`
1531
1533
 
1532
1534
 
1535
+ ### `portfolio_digest`
1536
+
1537
+ Roll up every product's counts, health, and stage-coverage in one call (the multi-product `get_graph_digest`). The strategic-surface read that otherwise required `switch_product` + `get_graph_digest` per graph. Returns per-product summaries plus a portfolio rollup (totals, products-by-stage). Read-only; never mutates active-product state.
1538
+
1539
+ **Atomicity:** `atomic (read-only). Never mutates active-product state.`
1540
+
1541
+ **Arguments:**
1542
+
1543
+ | Name | Type | Required | Description |
1544
+ | ---- | ---- | -------- | ----------- |
1545
+ | `scope` | array | | Product IDs (or files) to summarise. Omit to summarise ALL products in the workspace. |
1546
+
1547
+ **Returns:**
1548
+
1549
+ JSON: `{ products: Array<{ product_id, file, title, stage,
1550
+ total_nodes, total_edges, health, coverage_pct, top_types }>, rollup:
1551
+ { products, total_nodes, total_edges, by_stage }, errored_products?,
1552
+ unmatched_scope? }`. `health`/`coverage_pct` come from `computeGraphDigest`,
1553
+ identical to what `get_graph_digest` reports per product.
1554
+
1555
+ **See also:** `get_graph_digest`, `portfolio_query`
1556
+
1557
+
1558
+ ### `portfolio_query`
1559
+
1560
+ Traverse the graph ACROSS products in one call (the multi-product `query`). Runs the same BFS (typed-edge traversal + field projection) against every product in scope and tags each subgraph with its source `product_id`, without `switch_product` (the active product is read live; others are read-only). Use for portfolio-level questions ("every product's strategy region", "which products have a persona"). `from_id` only matches in its owning product. Read-only.
1561
+
1562
+ **Atomicity:** `atomic (read-only). Never mutates active-product state.`
1563
+
1564
+ **Arguments:**
1565
+
1566
+ | Name | Type | Required | Description |
1567
+ | ---- | ---- | -------- | ----------- |
1568
+ | `depth` | number | | Max traversal depth (default 3, max 10) |
1569
+ | `edge_include` | array | | Edge fields to return: "id", "type", "source", "target". Empty array = no edges. Default: all fields. |
1570
+ | `from` | string | | Start from all nodes of this type (in each product) |
1571
+ | `from_id` | string | | Start from a specific node ID. Node IDs are product-local; only the owning product returns results. |
1572
+ | `include` | array | | Fields per node: "title", "status", "tags", "description", "properties" (default: title, status, type) |
1573
+ | `limit` | number | | Max nodes per product (default 100, max 1000) |
1574
+ | `property_include` | array | | When "properties" is in include, only return these property keys. |
1575
+ | `scope` | array | | Product IDs (or files) to query. Omit to query ALL products in the workspace. Match by product id, relative file, or basename. |
1576
+ | `traverse` | array | | Edge types to follow at each level (in order). If omitted, follows all edges. Prefix with ! to exclude. |
1577
+
1578
+ **Returns:**
1579
+
1580
+ JSON: `{ products: Array<{ product_id, file, title, total_nodes,
1581
+ total_edges, nodes, edges, truncated? }>, products_searched,
1582
+ products_with_matches, empty_products, unmatched_scope? }`. Products that
1583
+ matched zero nodes are summarised in `empty_products`, not expanded, to
1584
+ keep the payload lean. `from_id` only matches in its owning product; the
1585
+ rest report empty.
1586
+
1587
+ **See also:** `query`, `portfolio_digest`, `list_local_products`
1588
+
1589
+
1533
1590
  ### `switch_product`
1534
1591
 
1535
1592
  Switch to a different .upg file without restarting the server. In workspace mode, accepts just a filename (e.g. "client-project" or "client-project.upg").
@@ -2159,7 +2216,7 @@ JSON: `{ kind, total, count, benchmarks: ... }`
2159
2216
 
2160
2217
  ### `list_cross_edge_types`
2161
2218
 
2162
- List the canonical cross-product edge types from `UPG_CROSS_EDGE_TYPES`: `shares_persona`, `shares_competitor`, `shares_metric`, `depends_on_product`, `cannibalises`, `succeeds`, `hosts`. Portfolio-level relationships across products. Distinct from the within-product `UPG_EDGE_CATALOG`.
2219
+ List the canonical cross-product edge types from `UPG_CROSS_EDGE_TYPES`: `shares_persona`, `shares_competitor`, `shares_metric`, `depends_on_product`, `cannibalises`, `succeeds`, `hosts`, `contributes_to`. Portfolio-level relationships across products. Distinct from the within-product `UPG_EDGE_CATALOG`.
2163
2220
 
2164
2221
  **Atomicity:** `atomic (read-only)`
2165
2222