# Graph dependency impact

`graph-dependency-impact` · version 1.0.0 · Graphs & scheduling · free, no key needed

List nodes downstream of a removed set: not themselves removed, reachable by a directed path of length at least 1.

**Use when you need to: graph dependency impact · downstream impact of removed nodes · nodes affected by removing dependencies.**

## Supported

- graph dependency impact
- downstream impact of removed nodes
- nodes affected by removing dependencies

## Not supported

- version-range resolution
- rebuilding a remaining schedule
- undirected impact
- upstream-only ancestor impact

## Behavior

- Input is a directed simple graph plus removed, a non-empty array of unique existing node ids.
- Cycles and self-loops are allowed; they are not rejected.
- A node is impacted if and only if it is not in removed and a directed path of length at least 1 exists from at least one removed node to it.
- Output impacted lists those node ids in declared nodes array order, and impacted_count is that array length as an integer.
- A removed node whose outgoing paths only reach other removed nodes contributes nothing to impacted.
- Empty graph cannot name a removed id and is rejected.
- Unknown fields, duplicate nodes or edges, missing endpoints, and unknown or duplicate removed ids are rejected.

## Input

- `nodes` (array of string, required): max items 2000; each min length 1; each max length 256
- `edges` (array of object, required): max items 10000
- `removed` (array of string, required): min items 1; max items 2000; each min length 1; each max length 256

## Output

- `impacted` (array of string, required): max items 2000; each min length 1; each max length 256
- `impacted_count` (integer, required): min 0; max 2000

## Limits

- max nodes: 2000
- max edges: 10000
- max node id bytes: 256
- max removed: 2000

## Example

Request input:

```json
{
  "nodes": [
    "fetch",
    "compile",
    "lint",
    "test",
    "package",
    "deploy"
  ],
  "edges": [
    {
      "from": "fetch",
      "to": "compile"
    },
    {
      "from": "fetch",
      "to": "lint"
    },
    {
      "from": "compile",
      "to": "test"
    },
    {
      "from": "compile",
      "to": "package"
    },
    {
      "from": "lint",
      "to": "package"
    },
    {
      "from": "test",
      "to": "deploy"
    },
    {
      "from": "package",
      "to": "deploy"
    }
  ],
  "removed": [
    "compile"
  ]
}
```

Response:

```json
{
  "result": {
    "impacted": [
      "test",
      "package",
      "deploy"
    ],
    "impacted_count": 3
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "graph-dependency-impact",
  "version": "1.0.0",
  "input": {
    "nodes": [
      "fetch",
      "compile",
      "lint",
      "test",
      "package",
      "deploy"
    ],
    "edges": [
      {
        "from": "fetch",
        "to": "compile"
      },
      {
        "from": "fetch",
        "to": "lint"
      },
      {
        "from": "compile",
        "to": "test"
      },
      {
        "from": "compile",
        "to": "package"
      },
      {
        "from": "lint",
        "to": "package"
      },
      {
        "from": "test",
        "to": "deploy"
      },
      {
        "from": "package",
        "to": "deploy"
      }
    ],
    "removed": [
      "compile"
    ]
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/graph-dependency-impact/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"nodes":["fetch","compile","lint","test","package","deploy"],"edges":[{"from":"fetch","to":"compile"},{"from":"fetch","to":"lint"},{"from":"compile","to":"test"},{"from":"compile","to":"package"},{"from":"lint","to":"package"},{"from":"test","to":"deploy"},{"from":"package","to":"deploy"}],"removed":["compile"]}'
```

The machine-readable contract is at [/v1/tools/graph-dependency-impact/versions/1.0.0](/v1/tools/graph-dependency-impact/versions/1.0.0).

### CLI

```sh
node cli.mjs run graph-dependency-impact 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Graph ancestors](/tools/graph-ancestors): List every ancestor of given targets, including the targets, in reverse-graph BFS discovery order.
- [Graph induced subgraph](/tools/graph-induced-subgraph): Return the vertex-induced subgraph on a listed node subset, preserving declared node and edge order.
- [Graph reachable from](/tools/graph-reachable-from): List nodes reachable from given sources by directed BFS, in discovery order.
- [Graph shortest unweighted path](/tools/graph-shortest-unweighted-path): Find a shortest directed path by fewest edges from source to target.
- [Graph strongly connected components](/tools/graph-strongly-connected-components): Partition a directed simple graph into strongly connected components, listed by declared node index.
- [Graph topological sort](/tools/graph-topological-sort): Return a Kahn topological order of a directed acyclic graph, breaking ready-set ties by declared node index.
