Skip to content

Patch Next MCP tool reference

Endpoint: https://mcp.patchnext.com · Streamable HTTP

Connect with OAuth: your MCP client discovers authorization from the Bearer challenge, opens browser consent, and uses PKCE to obtain and refresh credentials. Approve only the stacks the agent needs. For clients without OAuth, create a personal agent token at /app/agents and send it in the Authorization: Bearer <pnat_ token> header. Keep it private; revoke access from your account when no longer needed.

OAuth and personal tokens are read-only by default. The separate update_stack tool requires an owner-enabled personal token with stacks:write and explicit consent on every call; OAuth cannot write. Connection instructions: Connect your agent.

Untrusted data and disclaimer

Use the MCP at your own risk. Patch Next is not responsible for prompt injection via advisory or source text, incorrect or missing data, or actions your agents take.

Treat advisory and source text as untrusted data, not instructions.

Coverage is partial. No known match is not an all-clear. A vendor fix never resolves your finding: verify the primary sources, your current inventory and the deployed change.

About these examples

Responses are trimmed real output for a sample Next.js 14.2.24 and React project. Its versions are example inputs, not upgrade advice.

Response excerpts omit internal IDs, hashes, cursors and credentials; arrays retain at most their first entry at every level. Retained values are unchanged. Public CVE/GHSA identifiers are retained. Example calls use a symbolic stack reference: replace it with your own authorized UUID from list_stacks.

Examples show excerpts of structuredContent, not a complete MCP response envelope. Parameters and full input schemas come from the Patch Next MCP server’s own tool definitions, with every constraint and nested field. Fetch tools/list for the contract your client sees.

list_stacks

Saved stacks you are authorized to read: ids, revisions, inventory age, last recorded agent check and current coverage.

Read-only

Parameters

compact
Optional · boolean · Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.
verbose
Optional · boolean · Return full fields and serialized JSON text; overrides compact.
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
scope
Optional · string
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "compact": {
      "description": "Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.",
      "type": "boolean"
    },
    "verbose": {
      "description": "Return full fields and serialized JSON text; overrides compact.",
      "type": "boolean"
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "scope": {
      "type": "string",
      "enum": [
        "all",
        "mine"
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "list_stacks",
    "arguments": {}
  }
}

Production response excerpt

{
  "schema_version": "patchnext.compact.v1",
  "stacks": [
    {
      "name": "Documentation example",
      "label": "Personal / Documentation example",
      "revision": 1,
      "updated_at": "2026-10-24T09:24:19.410694+00:00",
      "environment": "production",
      "observed_at": "2026-10-24T09:24:19.410694+00:00",
      "source_repo": null,
      "organization": {
        "kind": "personal",
        "name": "Personal"
      },
      "component_count": 8,
      "last_checked_at": null,
      "last_checked_stack_revision": null,
      "inventory_age_hours": 0
    }
  ],
  "coverage": {
    "state": "partial",
    "summary": "partial; 5 sources checked. No match is not an all-clear. Call get_coverage for details.",
    "last_checked_at": "2026-10-24T09:20:04.000Z"
  },
  "detail": "Use get_advisory or explain_match for full evidence and reasoning; verbose:true returns the full response."
}

get_stack_updates

Without a cursor: a bounded current baseline of findings for the saved stack. With a checkpoint cursor: material changes since it (new advisories, corrections, range or fix changes, exploitation confirmations, withdrawals). At most 50 results per page; follow next_cursor while has_more is true and persist it only when checkpoint is true. Pass your hostname as machine. Open only by default; include_handled:true reveals handled items and hidden_count counts them. since is an alias for cursor. After applying a patch, call mark_findings. compact:true uses short fields; verbose:true preserves the original response. Cursors work in either mode.

Read-only

Parameters

Choose the stack with stack_id, or with stack_name or source_repo (add organization when a name exists in several organizations). One of them is needed; list_stacks shows the choices.

stack_id
Optional · string · A stack id from list_stacks.
organization
Optional · string · Organization id or name from list_stacks.
stack_name
Optional · string · Stack name or Org / stack label. Use organization to disambiguate.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
cursor
Optional · string · next_cursor from a previous call; omit for a baseline.
limit
Optional · integer · Maximum page size, 1–50. Default 50 in compatibility mode; compact pages contain at most five.
compact
Optional · boolean · Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.
verbose
Optional · boolean · Return full fields and serialized JSON text; overrides compact.
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
scope
Optional · string · Default: this machine. all_machines returns the fleet; mine includes stacks or hosts assigned to your account. Mine is a filter, not a permission grant.
include_handled
Optional · boolean · Default false: show open findings only. True also shows handled findings.
since
Optional · string · next_since from this tool and machine/filter; omit to show the current queue.
consent
Optional · boolean · Owner inventory-write consent authorizes automatic snapshots, including OAuth. Set false to decline this call. Read-only grants never save.
consent_statement
Optional · string
components
Optional · array · Normalized inventory for a baseline check. Omit components on cursor/since pages.
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "stack_id": {
      "description": "A stack id from list_stacks.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_name": {
      "description": "Stack name or Org / stack label. Use organization to disambiguate.",
      "type": "string",
      "minLength": 1,
      "maxLength": 163
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "cursor": {
      "description": "next_cursor from a previous call; omit for a baseline.",
      "type": "string",
      "maxLength": 4096
    },
    "limit": {
      "description": "Maximum page size, 1–50. Default 50 in compatibility mode; compact pages contain at most five.",
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "compact": {
      "description": "Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.",
      "type": "boolean"
    },
    "verbose": {
      "description": "Return full fields and serialized JSON text; overrides compact.",
      "type": "boolean"
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "scope": {
      "description": "Default: this machine. all_machines returns the fleet; mine includes stacks or hosts assigned to your account. Mine is a filter, not a permission grant.",
      "type": "string",
      "enum": [
        "machine",
        "all_machines",
        "mine"
      ]
    },
    "include_handled": {
      "description": "Default false: show open findings only. True also shows handled findings.",
      "type": "boolean"
    },
    "since": {
      "description": "next_since from this tool and machine/filter; omit to show the current queue.",
      "type": "string",
      "maxLength": 12000
    },
    "consent": {
      "description": "Owner inventory-write consent authorizes automatic snapshots, including OAuth. Set false to decline this call. Read-only grants never save.",
      "type": "boolean"
    },
    "consent_statement": {
      "type": "string",
      "minLength": 20,
      "maxLength": 1000
    },
    "components": {
      "description": "Normalized inventory for a baseline check. Omit components on cursor/since pages.",
      "minItems": 1,
      "maxItems": 5000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ecosystem": {
            "type": "string",
            "enum": [
              "npm",
              "PyPI",
              "Packagist",
              "Go",
              "crates.io",
              "RubyGems",
              "Maven",
              "NuGet",
              "GitHub Actions",
              "Bitnami",
              "runtime"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 214
          },
          "version": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "dependency": {
            "type": "string",
            "enum": [
              "runtime",
              "development",
              "unknown"
            ]
          },
          "lockfile_path": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ecosystem",
          "name"
        ],
        "additionalProperties": false
      }
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "get_stack_updates",
    "arguments": {
      "stack_id": "<stack_id from list_stacks>",
      "limit": 1,
      "compact": true
    }
  }
}

Production response excerpt

{
  "inventory_observed_at": "2026-10-24T09:24:19.410694+00:00",
  "imported_component_count": 8,
  "evaluated_component_count": 6,
  "exclusions": [
    {
      "reason": "Public registry identity not verified and absent from the advisory catalogue",
      "count": 2,
      "examples": [
        "npm:@next/env@14.2.24"
      ]
    }
  ],
  "schema_version": "patchnext.compact.v1",
  "stack": {
    "name": "Documentation example",
    "environment": "production",
    "revision": 1,
    "organization": {
      "kind": "personal",
      "name": "Personal"
    },
    "source_repo": null,
    "label": "Personal / Documentation example"
  },
  "coverage": {
    "state": "partial",
    "summary": "partial; 5 sources checked. No match is not an all-clear. Call get_coverage for details.",
    "last_checked_at": "2026-10-24T09:20:04.000Z"
  },
  "notice": "Reading updates never resolves or acknowledges a finding. Verify against the primary sources and your current inventory.",
  "mode": "baseline",
  "updates": [
    {
      "advisory_id": "CVE-2025-55182",
      "advisory_revision": 3,
      "change_type": "baseline",
      "title": "React Server Components are Vulnerable to RCE",
      "applicability": "affected",
      "priority": "P0",
      "severity": "critical",
      "known_exploited": true,
      "matched_components": [
        {
          "ecosystem": "npm",
          "name": "react-server-dom-webpack",
          "version": "19.1.1",
          "dependency": "runtime"
        }
      ],
      "matched_component_count": 1,
      "missing_facts": [],
      "recommended_action": "Upgrade react-server-dom-webpack 19.1.1 → 19.1.2.",
      "primary_sources": [
        "https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components"
      ],
      "published_at": "2025-12-03T19:07:39+00:00",
      "historical": true,
      "source_updated_at": "2025-12-09T17:46:07.154758+00:00"
    }
  ],
  "has_more": true,
  "checkpoint": false,
  "watermark": 18061,
  "summary": {
    "relevant": 38,
    "not_affected": 49,
    "no_known_match": 0
  },
  "detail": "Use get_advisory or explain_match for full evidence and reasoning; verbose:true returns the full response."
}

get_advisory

Full source-backed record for one published advisory by any upstream alias or Patch Next slug, with an optional match against an authorized stack.

Read-only

Parameters

To also match a saved stack, choose it with stack_id, or with stack_name or source_repo (add organization when a name exists in several organizations).

advisory_id
Required · string · CVE, GHSA, PYSEC, BIT or another upstream advisory ID, or a Patch Next advisory slug.
stack_id
Optional · string · Optional authorized stack to match against.
organization
Optional · string · Organization id or name from list_stacks.
stack_name
Optional · string · Stack name or Org / stack label. Use organization to disambiguate.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "advisory_id": {
      "type": "string",
      "minLength": 3,
      "maxLength": 120,
      "pattern": "^(CVE-\\d{4}-\\d{4,}|GHSA(-[23456789cfghjmpqrvwx]{4}){3}|(?!(?:CVE|GHSA)-)[A-Z][A-Za-z0-9_.:]*-[A-Za-z0-9_.:-]+|[a-z0-9]+(-[a-z0-9]+)*)$(?![\\s\\S])",
      "description": "CVE, GHSA, PYSEC, BIT or another upstream advisory ID, or a Patch Next advisory slug."
    },
    "stack_id": {
      "description": "Optional authorized stack to match against.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_name": {
      "description": "Stack name or Org / stack label. Use organization to disambiguate.",
      "type": "string",
      "minLength": 1,
      "maxLength": 163
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "advisory_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "get_advisory",
    "arguments": {
      "advisory_id": "CVE-2025-29927",
      "stack_id": "<stack_id from list_stacks>"
    }
  }
}

Production response excerpt

{
  "schema_version": "patchnext.updates.v1",
  "advisory": {
    "advisory_id": "CVE-2025-29927",
    "slug": "cve-2025-29927",
    "title": "Authorization Bypass in Next.js Middleware",
    "summary": "# Impact It is possible to bypass authorization checks within a Next.js application, if the authorization check occurs in middleware. # Patches * For Next.js 15.x, this issue is fixed in `15.2.3` * For Next.js 14.x, this issue is fixed in `14.2.25` * For Next.js 13.x, this issue is fixed in 13.5.9 * For Next.js 12.x, this issue is fixed in 12.3.5 * For Next.js 11.x, consult the below workaround. _Note: Next.js deployments hosted on Vercel are automatically protected against this vulnerability._ # Workaround If patching to a safe version is infeasible, we recommend that you prevent external user requests which contain the `x-middleware-subrequest` header from reaching your Next.js application. ## Credits - Allam Rachid (zhero;) - Allam Yasser (inzo_)",
    "lifecycle": "amended",
    "revision": 2,
    "severity": "critical",
    "cvss_score": 9.1,
    "known_exploited": false,
    "vendor_response": "fix_available",
    "aliases": [
      "GHSA:GHSA-f82v-jwr5-mffw"
    ],
    "components": [
      {
        "ecosystem": "npm",
        "name": "next",
        "affected_ranges": [
          {
            "fixed": "13.5.9",
            "introduced": "13.0.0"
          }
        ],
        "fixed_versions": [
          "13.5.9"
        ],
        "prerequisites": []
      }
    ],
    "primary_sources": [
      "https://osv.dev/vulnerability/GHSA-f82v-jwr5-mffw"
    ],
    "reported_sources": [],
    "revisions": [
      {
        "revision": 1,
        "change_type": "created",
        "summary": "Published from osv record GHSA-f82v-jwr5-mffw",
        "at": "2026-10-23T00:21:38.276058+00:00"
      }
    ],
    "published_at": "2025-03-21T15:20:12+00:00",
    "source_updated_at": "2026-09-10T03:50:23.209773+00:00",
    "last_checked_at": "2026-10-24T04:13:54.097+00:00",
    "recommended_action": "Vendor fixed versions: 13.5.9, 14.2.25, 15.2.3, 12.3.5. Upgrade, redeploy and verify; the finding stays open until you confirm."
  },
  "match": {
    "stack_revision": 1,
    "applicability": "affected",
    "priority": "P1",
    "match_reason": "Package identity, installed version and required context match the advisory. This does not prove exploitation or code reachability.",
    "missing_facts": [],
    "matched_components": [
      {
        "name": "next",
        "version": "14.2.24",
        "ecosystem": "npm",
        "dependency": "runtime",
        "provenance": "package-lock",
        "visibility": "private-or-unknown"
      }
    ]
  }
}

explain_match

Identity, version and context reasoning for one advisory against an authorized stack, including the facts Patch Next is missing.

Read-only

Parameters

Choose the stack with stack_id, or with stack_name or source_repo (add organization when a name exists in several organizations). One of them is needed; list_stacks shows the choices.

stack_id
Optional · string · A stack id from list_stacks.
organization
Optional · string · Organization id or name from list_stacks.
stack_name
Optional · string · Stack name or Org / stack label. Use organization to disambiguate.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
advisory_id
Required · string
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "stack_id": {
      "description": "A stack id from list_stacks.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_name": {
      "description": "Stack name or Org / stack label. Use organization to disambiguate.",
      "type": "string",
      "minLength": 1,
      "maxLength": 163
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "advisory_id": {
      "type": "string",
      "minLength": 3,
      "maxLength": 120,
      "pattern": "^(CVE-\\d{4}-\\d{4,}|GHSA(-[23456789cfghjmpqrvwx]{4}){3}|(?!(?:CVE|GHSA)-)[A-Z][A-Za-z0-9_.:]*-[A-Za-z0-9_.:-]+|[a-z0-9]+(-[a-z0-9]+)*)$(?![\\s\\S])"
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "advisory_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "explain_match",
    "arguments": {
      "stack_id": "<stack_id from list_stacks>",
      "advisory_id": "CVE-2025-29927"
    }
  }
}

Production response excerpt

{
  "schema_version": "patchnext.updates.v1",
  "advisory_id": "CVE-2025-29927",
  "advisory_revision": 2,
  "stack_revision": 1,
  "applicability": "affected",
  "priority": "P1",
  "match_reason": "Package identity, installed version and required context match the advisory. This does not prove exploitation or code reachability.",
  "missing_facts": [],
  "matched_components": [
    {
      "name": "next",
      "version": "14.2.24",
      "ecosystem": "npm",
      "dependency": "runtime",
      "provenance": "package-lock",
      "visibility": "private-or-unknown"
    }
  ],
  "inventory_components_with_same_identity": [
    {
      "name": "next",
      "version": "14.2.24",
      "ecosystem": "npm",
      "dependency": "runtime",
      "provenance": "package-lock",
      "visibility": "private-or-unknown"
    }
  ],
  "rules": [
    {
      "ecosystem": "npm",
      "name": "next",
      "ranges": [
        {
          "introduced": "13.0.0",
          "fixed": "13.5.9"
        }
      ],
      "exactVersions": [],
      "requires": []
    }
  ],
  "inventory_observed_at": "2026-10-24T09:24:19.410694+00:00",
  "imported_component_count": 8,
  "evaluated_component_count": 1,
  "exclusions": [
    {
      "reason": "Public registry identity not verified and absent from the advisory catalogue",
      "count": 7,
      "examples": [
        "npm:@next/env@14.2.24"
      ]
    }
  ],
  "note": "Applicability is a package/version/context decision. It does not prove exploitation or reachability."
}

check_components

Bounded transient assessment of a current local inventory (up to 5000 supported package components). Never saved and never moves a saved-stack checkpoint. Follow next_cursor with identical components/context while has_more; verbose:true returns full fields.

Read-only

Parameters

Choose the stack with stack_id, or with stack_name or source_repo (add organization when a name exists in several organizations). One of them is needed; list_stacks shows the choices.

components
Required · array
context
Optional · object
compact
Optional · boolean · Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.
verbose
Optional · boolean · Return full fields and serialized JSON text; overrides compact.
consent
Optional · boolean · Owner inventory-write consent authorizes automatic snapshots, including OAuth. Set false to decline this call. Read-only grants never save.
consent_statement
Optional · string
stack_id
Optional · string · A stack id from list_stacks.
organization
Optional · string · Organization id or name from list_stacks.
stack_name
Optional · string · Stack name or Org / stack label. Use organization to disambiguate.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
limit
Optional · integer
cursor
Optional · string
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "components": {
      "minItems": 1,
      "maxItems": 5000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ecosystem": {
            "type": "string",
            "enum": [
              "npm",
              "PyPI",
              "Packagist",
              "Go",
              "crates.io",
              "RubyGems",
              "Maven",
              "NuGet",
              "GitHub Actions",
              "Bitnami",
              "runtime"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 214
          },
          "version": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "dependency": {
            "type": "string",
            "enum": [
              "runtime",
              "development",
              "unknown"
            ]
          },
          "lockfile_path": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ecosystem",
          "name"
        ],
        "additionalProperties": false
      }
    },
    "context": {
      "type": "object",
      "properties": {
        "middlewareAuthorization": {
          "type": "boolean"
        },
        "rsc": {
          "type": "boolean"
        },
        "server": {
          "type": "boolean"
        },
        "hosting": {
          "type": "string",
          "maxLength": 40
        }
      },
      "additionalProperties": false
    },
    "compact": {
      "description": "Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.",
      "type": "boolean"
    },
    "verbose": {
      "description": "Return full fields and serialized JSON text; overrides compact.",
      "type": "boolean"
    },
    "consent": {
      "description": "Owner inventory-write consent authorizes automatic snapshots, including OAuth. Set false to decline this call. Read-only grants never save.",
      "type": "boolean"
    },
    "consent_statement": {
      "type": "string",
      "minLength": 20,
      "maxLength": 1000
    },
    "stack_id": {
      "description": "A stack id from list_stacks.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_name": {
      "description": "Stack name or Org / stack label. Use organization to disambiguate.",
      "type": "string",
      "minLength": 1,
      "maxLength": 163
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "cursor": {
      "type": "string",
      "maxLength": 4096
    }
  },
  "required": [
    "components"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "check_components",
    "arguments": {
      "components": [
        {
          "ecosystem": "npm",
          "name": "next",
          "version": "14.2.24",
          "dependency": "runtime"
        }
      ],
      "context": {
        "middlewareAuthorization": true,
        "server": true,
        "hosting": "self-hosted"
      }
    }
  }
}

Production response excerpt

{
  "inventory_observed_at": "2026-10-24T09:24:31.543Z",
  "imported_component_count": 1,
  "evaluated_component_count": 1,
  "exclusions": [],
  "schema_version": "patchnext.compact.v1",
  "coverage": {
    "state": "partial",
    "summary": "partial; 5 sources checked. No match is not an all-clear. Call get_coverage for details.",
    "last_checked_at": "2026-10-24T09:20:04.000Z"
  },
  "notice": "Ephemeral assessment; nothing saved. Follow next_cursor while has_more. No match is not an all-clear. Reading never resolves findings.",
  "has_more": true,
  "watermark": 18061,
  "summary": {
    "relevant": 31,
    "not_affected": 45,
    "no_known_match": 0
  },
  "saved": false,
  "findings": [
    {
      "advisory_id": "CVE-2025-29927",
      "advisory_revision": 2,
      "change_type": "baseline",
      "title": "Authorization Bypass in Next.js Middleware",
      "applicability": "affected",
      "priority": "P1",
      "severity": "critical",
      "known_exploited": false,
      "matched_components": [
        {
          "ecosystem": "npm",
          "name": "next",
          "version": "14.2.24",
          "dependency": "runtime"
        }
      ],
      "matched_component_count": 1,
      "missing_facts": [],
      "recommended_action": "Upgrade next 14.2.24 → 14.2.25.",
      "primary_sources": [
        "https://osv.dev/vulnerability/GHSA-f82v-jwr5-mffw"
      ],
      "published_at": "2025-03-21T15:20:12+00:00",
      "historical": true,
      "source_updated_at": "2026-09-10T03:50:23.209773+00:00"
    }
  ],
  "truncated": true,
  "detail": "Use get_advisory or explain_match for full evidence and reasoning; verbose:true returns the full response."
}

what_to_patch

Pass your hostname as machine. Open findings only by default, with hidden_count; include_handled:true reveals the rest. Save next_since for only new material changes next time. After applying a patch call mark_findings (ids or all_returned with selection). scope:all_machines returns the fleet. Quick patch queue for an authorized stack: a paginated list of actionable items published in the last 90 days OR still unpatched in supported installed versions. Ranked CISA KEV first, then dated EPSS descending, then severity. Use limit/offset and only_affected; get_stack_updates provides complete history.

Read-only

Parameters

Choose the stack with stack_id, or with stack_name or source_repo (add organization when a name exists in several organizations). One of them is needed; list_stacks shows the choices.

stack_id
Optional · string · A stack id from list_stacks.
organization
Optional · string · Organization id or name from list_stacks.
stack_name
Optional · string · Stack name or Org / stack label. Use organization to disambiguate.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
compact
Optional · boolean · Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.
verbose
Optional · boolean · Return full fields and serialized JSON text; overrides compact.
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
scope
Optional · string · Default: this machine. all_machines returns the fleet; mine includes stacks or hosts assigned to your account. Mine is a filter, not a permission grant.
include_handled
Optional · boolean · Default false: show open findings only. True also shows handled findings.
since
Optional · string · next_since from this tool and machine/filter; omit to show the current queue.
limit
Optional · integer
offset
Optional · integer
only_affected
Optional · boolean
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "stack_id": {
      "description": "A stack id from list_stacks.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_name": {
      "description": "Stack name or Org / stack label. Use organization to disambiguate.",
      "type": "string",
      "minLength": 1,
      "maxLength": 163
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "compact": {
      "description": "Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.",
      "type": "boolean"
    },
    "verbose": {
      "description": "Return full fields and serialized JSON text; overrides compact.",
      "type": "boolean"
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "scope": {
      "description": "Default: this machine. all_machines returns the fleet; mine includes stacks or hosts assigned to your account. Mine is a filter, not a permission grant.",
      "type": "string",
      "enum": [
        "machine",
        "all_machines",
        "mine"
      ]
    },
    "include_handled": {
      "description": "Default false: show open findings only. True also shows handled findings.",
      "type": "boolean"
    },
    "since": {
      "description": "next_since from this tool and machine/filter; omit to show the current queue.",
      "type": "string",
      "maxLength": 12000
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    },
    "only_affected": {
      "type": "boolean"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "what_to_patch",
    "arguments": {
      "stack_id": "<stack_id from list_stacks>"
    }
  }
}

Production response excerpt

{
  "stack_revision": 1,
  "inventory_observed_at": "2026-10-24T09:24:19.410694+00:00",
  "imported_component_count": 8,
  "evaluated_component_count": 6,
  "exclusions": [
    {
      "reason": "Public registry identity not verified and absent from the advisory catalogue",
      "count": 2,
      "examples": [
        "npm:@next/env@14.2.24"
      ]
    }
  ],
  "window_days": 90,
  "items": [
    {
      "advisory_id": "CVE-2025-55182",
      "summary": "React Server Components are Vulnerable to RCE",
      "affected_versions": [
        {
          "ecosystem": "npm",
          "name": "react-server-dom-webpack",
          "ranges": [
            {
              "fixed": "19.0.1",
              "introduced": "19.0.0"
            }
          ]
        }
      ],
      "fix": {
        "fixed_versions": [
          "19.0.1"
        ],
        "recommended_action": "Upgrade react-server-dom-webpack 19.1.1 → 19.1.2."
      },
      "source": "https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components",
      "kev": true,
      "epss": {
        "score": 0.99802,
        "score_date": "2026-10-23",
        "cve": "CVE-2025-55182"
      },
      "severity": "critical",
      "applicability": "affected",
      "priority": "P0",
      "missing_facts": [],
      "basis": "installed version remains in an affected range"
    }
  ],
  "has_more": true,
  "next_offset": 5,
  "epss_status": "available",
  "notice": "Partial coverage; missing EPSS is unknown. EPSS is a dated probability estimate, not confirmed exploitation. Verify sources, identity and current inventory. Reading or a vendor fix never resolves findings. Use get_stack_updates for complete history and checkpoints."
}

get_actionable_updates

Concise source-backed actions for one authorized stack. Default: published in 90 days OR supported installed versions still affected. Use offset only while the inventory stays unchanged.

Read-only

Parameters

Choose the stack with stack_id, or with stack_name or source_repo (add organization when a name exists in several organizations). One of them is needed; list_stacks shows the choices.

compact
Optional · boolean · Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.
verbose
Optional · boolean · Return full fields and serialized JSON text; overrides compact.
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
scope
Optional · string · Default: this machine. all_machines returns the fleet; mine includes stacks or hosts assigned to your account. Mine is a filter, not a permission grant.
include_handled
Optional · boolean · Default false: show open findings only. True also shows handled findings.
since
Optional · string · next_since from this tool and machine/filter; omit to show the current queue.
only_affected
Optional · boolean
stack_id
Optional · string · A stack id from list_stacks.
organization
Optional · string · Organization id or name from list_stacks.
stack_name
Optional · string · Stack name or Org / stack label. Use organization to disambiguate.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
days
Optional · integer
limit
Optional · integer
offset
Optional · integer
include_epss
Optional · boolean
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "compact": {
      "description": "Use compact fields and short text. get_stack_updates requires this opt-in; other list tools default to compact.",
      "type": "boolean"
    },
    "verbose": {
      "description": "Return full fields and serialized JSON text; overrides compact.",
      "type": "boolean"
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "scope": {
      "description": "Default: this machine. all_machines returns the fleet; mine includes stacks or hosts assigned to your account. Mine is a filter, not a permission grant.",
      "type": "string",
      "enum": [
        "machine",
        "all_machines",
        "mine"
      ]
    },
    "include_handled": {
      "description": "Default false: show open findings only. True also shows handled findings.",
      "type": "boolean"
    },
    "since": {
      "description": "next_since from this tool and machine/filter; omit to show the current queue.",
      "type": "string",
      "maxLength": 12000
    },
    "only_affected": {
      "type": "boolean"
    },
    "stack_id": {
      "description": "A stack id from list_stacks.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_name": {
      "description": "Stack name or Org / stack label. Use organization to disambiguate.",
      "type": "string",
      "minLength": 1,
      "maxLength": 163
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "days": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    },
    "include_epss": {
      "type": "boolean"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "get_actionable_updates",
    "arguments": {
      "stack_id": "<stack_id from list_stacks>",
      "limit": 1,
      "include_epss": true
    }
  }
}

Production response excerpt

{
  "stack_revision": 1,
  "inventory_observed_at": "2026-10-24T09:24:19.410694+00:00",
  "window_days": 90,
  "items": [
    {
      "advisory_id": "CVE-2025-55182",
      "title": "React Server Components are Vulnerable to RCE",
      "applicability": "affected",
      "priority": "P0",
      "matched_components": [
        {
          "ecosystem": "npm",
          "name": "react-server-dom-webpack",
          "version": "19.1.1"
        }
      ],
      "affected": [
        {
          "ecosystem": "npm",
          "name": "react-server-dom-turbopack",
          "ranges": [
            {
              "introduced": "19.0.0",
              "fixed": "19.0.1"
            }
          ]
        }
      ],
      "action": "Upgrade react-server-dom-webpack 19.1.1 → 19.1.2.",
      "sources": [
        "https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components"
      ],
      "changed_at": "2025-12-09T17:46:07.154758+00:00",
      "published_at": "2025-12-03T19:07:39+00:00",
      "basis": "installed version remains in an affected range",
      "epss": [
        {
          "cve": "CVE-2025-55182",
          "score_date": "2026-10-23",
          "epss": 0.99802,
          "percentile": 0.99958,
          "model_version": null,
          "fetched_at": "2026-10-23T15:41:53.637+00:00"
        }
      ]
    }
  ],
  "has_more": true,
  "next_offset": 1,
  "notice": "Partial coverage. Reading never resolves findings; verify sources and current inventory. Offset pages reflect current data; recheck after inventory changes.",
  "epss_status": "available",
  "epss_notice": "FIRST EPSS is a dated model estimate of exploitation activity in the next 30 days; it does not establish exploitation or customer exposure."
}

get_inventory_findings

Match reported products/runtimes/OSs and SaaS vendors against real NVD CPE configurations and CISA KEV. Pass hostname to filter; scope mine uses assigned owners. Open findings by default; include_handled reveals assertions. Follow next_cursor while has_more, then keep next_since for source changes. Empty pages can still have more candidates. Unknown identities/platforms/versions remain uncertain; a vendor CVE is not proof your SaaS is exposed. Mark exact returned subject_id+nvd_cve_id targets with mark_findings after assessment/patching; vendor statuses are asked_vendor/vendor_confirmed_patched/not_affected with an optional statement URL.

Read-only

Parameters

Choose the stack with stack_id, or with stack_name or source_repo (add organization when a name exists in several organizations). One of them is needed; list_stacks shows the choices.

stack_id
Optional · string · A stack id from list_stacks.
organization
Optional · string · Organization id or name from list_stacks.
stack_name
Optional · string · Stack name or Org / stack label. Use organization to disambiguate.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
scope
Optional · string · Default: this machine. all_machines returns the fleet; mine includes stacks or hosts assigned to your account. Mine is a filter, not a permission grant.
include_handled
Optional · boolean · Default false: show open findings only. True also shows handled findings.
since
Optional · string · next_since from this tool and machine/filter; omit to show the current queue.
cursor
Optional · string
subject_ids
Optional · array
limit
Optional · integer
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "stack_id": {
      "description": "A stack id from list_stacks.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_name": {
      "description": "Stack name or Org / stack label. Use organization to disambiguate.",
      "type": "string",
      "minLength": 1,
      "maxLength": 163
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "scope": {
      "description": "Default: this machine. all_machines returns the fleet; mine includes stacks or hosts assigned to your account. Mine is a filter, not a permission grant.",
      "type": "string",
      "enum": [
        "machine",
        "all_machines",
        "mine"
      ]
    },
    "include_handled": {
      "description": "Default false: show open findings only. True also shows handled findings.",
      "type": "boolean"
    },
    "since": {
      "description": "next_since from this tool and machine/filter; omit to show the current queue.",
      "type": "string",
      "maxLength": 12000
    },
    "cursor": {
      "type": "string",
      "maxLength": 12000
    },
    "subject_ids": {
      "minItems": 1,
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

get_patch_report

Export authorized status history, actor ids, detection times, before/after workflow and vendor statements. scope mine uses current assigned owners. Cursor pages split even a large bulk action without exposing global action sequence numbers. Time to patch needs a previously recorded open detection; first marking patched yields no invented zero interval. Default excerpts disclose truncation; verbose:true returns full snapshots and can exceed the normal concise response bound. This is evidence, not certification or independent verification.

Read-only

Parameters

Choose the stack with stack_id, or with stack_name or source_repo (add organization when a name exists in several organizations). One of them is needed; list_stacks shows the choices.

stack_id
Optional · string · A stack id from list_stacks.
organization
Optional · string · Organization id or name from list_stacks.
stack_name
Optional · string · Stack name or Org / stack label. Use organization to disambiguate.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
scope
Optional · string
cursor
Optional · string
limit
Optional · integer
verbose
Optional · boolean
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "stack_id": {
      "description": "A stack id from list_stacks.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_name": {
      "description": "Stack name or Org / stack label. Use organization to disambiguate.",
      "type": "string",
      "minLength": 1,
      "maxLength": 163
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "scope": {
      "type": "string",
      "enum": [
        "all",
        "all_machines",
        "mine"
      ]
    },
    "cursor": {
      "type": "string",
      "maxLength": 12000
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "verbose": {
      "type": "boolean"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

update_stack

To report products/vendors, send products[] with an existing target_stack/stack_id, inventory_observed_at, consent and consent_statement, in a separate call from components[]. Names resolve only through verified NVD identities; supply vendor/product or cpe23 when known. Product updates require personal stacks:write plus triage opt-in. Pass machine (your hostname) to report only that machine: requires owner-enabled inventory-write consent (personal token or OAuth); automatic observed-version reconciliation also requires triage-write consent. Legacy stack replacement retains explicit per-call consent. Omit machine for the existing stack replacement, requiring owner-enabled stacks:write personal-token scope and explicit per-call consent. Replaces the selected inventory atomically; pass expected_revision. OAuth inventory consent supports machine snapshots; legacy stack replacement requires a personal token. Read-only credentials cannot save inventory. Select organization by id/name (default: your single organization, otherwise Personal). Without target_stack, upserts by source_repo, then stack_name; new stacks are granted only to this token.

Writes inventory with explicit consent

Parameters

To replace a saved inventory, pass stack_id (or target_stack) with expected_revision. Without them, the tool updates the stack with the same source_repo, then the same stack_name, or creates one; organization picks where (default: your single organization, otherwise Personal).

machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
expected_machine_revision
Optional · integer
consent
Required · boolean
consent_statement
Required · string
stack_name
Optional · string
stack_environment
Optional · string
inventory_observed_at
Required · string
components
Optional · array
products
Optional · array
target_stack
Optional · string
stack_id
Optional · string
organization
Optional · string · Organization id or name from list_stacks.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
expected_revision
Optional · integer
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "expected_machine_revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "consent": {
      "type": "boolean",
      "const": true
    },
    "consent_statement": {
      "type": "string",
      "minLength": 20,
      "maxLength": 1000
    },
    "stack_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_environment": {
      "type": "string",
      "enum": [
        "production",
        "staging",
        "development",
        "unknown"
      ]
    },
    "inventory_observed_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "components": {
      "minItems": 1,
      "maxItems": 5000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ecosystem": {
            "type": "string",
            "enum": [
              "npm",
              "PyPI",
              "Packagist",
              "Go",
              "crates.io",
              "RubyGems",
              "Maven",
              "NuGet",
              "GitHub Actions",
              "Bitnami",
              "runtime"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 214
          },
          "version": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "dependency": {
            "type": "string",
            "enum": [
              "runtime",
              "development",
              "unknown"
            ]
          },
          "lockfile_path": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ecosystem",
          "name"
        ],
        "additionalProperties": false
      }
    },
    "products": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "product",
              "vendor"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "vendor": {
            "type": "string",
            "maxLength": 200
          },
          "product": {
            "type": "string",
            "maxLength": 200
          },
          "version": {
            "type": "string",
            "maxLength": 200
          },
          "cpe23": {
            "type": "string",
            "maxLength": 1000
          },
          "source_url": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    },
    "target_stack": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "stack_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "expected_revision": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "consent",
    "consent_statement",
    "inventory_observed_at"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "update_stack",
    "arguments": {
      "consent": true,
      "consent_statement": "I consent to replacing this documentation example inventory.",
      "stack_name": "Documentation example",
      "stack_environment": "production",
      "inventory_observed_at": "2026-10-24T09:24:22.737Z",
      "components": [
        {
          "ecosystem": "npm",
          "name": "next",
          "version": "14.2.24",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "@next/env",
          "version": "14.2.24",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "react",
          "version": "18.2.0",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "react-dom",
          "version": "18.2.0",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "typescript",
          "version": "5.4.5",
          "dependency": "development"
        },
        {
          "ecosystem": "npm",
          "name": "react",
          "version": "19.1.1",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "react-dom",
          "version": "19.1.1",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "react-server-dom-webpack",
          "version": "19.1.1",
          "dependency": "runtime"
        }
      ],
      "target_stack": "<stack_id from list_stacks>",
      "expected_revision": 1
    }
  }
}

Production response excerpt

{
  "revision": 2,
  "consented_at": "2026-10-24T09:24:37.687191+00:00"
}

declare_stack

Create a stack by declaring its inventory, or replace a selected inventory with target_stack and expected_revision. Select organization by id/name (default: your single organization, otherwise Personal) and source_repo from the current repository. Uses the same handler, owner-enabled stacks:write scope and explicit consent as update_stack.

Writes inventory with explicit consent

Parameters

To replace a saved inventory, pass stack_id (or target_stack) with expected_revision. Without them, the tool updates the stack with the same source_repo, then the same stack_name, or creates one; organization picks where (default: your single organization, otherwise Personal).

machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
expected_machine_revision
Optional · integer
consent
Required · boolean
consent_statement
Required · string
stack_name
Optional · string
stack_environment
Optional · string
inventory_observed_at
Required · string
components
Optional · array
products
Optional · array
target_stack
Optional · string
stack_id
Optional · string
organization
Optional · string · Organization id or name from list_stacks.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
expected_revision
Optional · integer
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "expected_machine_revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "consent": {
      "type": "boolean",
      "const": true
    },
    "consent_statement": {
      "type": "string",
      "minLength": 20,
      "maxLength": 1000
    },
    "stack_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_environment": {
      "type": "string",
      "enum": [
        "production",
        "staging",
        "development",
        "unknown"
      ]
    },
    "inventory_observed_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "components": {
      "minItems": 1,
      "maxItems": 5000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ecosystem": {
            "type": "string",
            "enum": [
              "npm",
              "PyPI",
              "Packagist",
              "Go",
              "crates.io",
              "RubyGems",
              "Maven",
              "NuGet",
              "GitHub Actions",
              "Bitnami",
              "runtime"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 214
          },
          "version": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "dependency": {
            "type": "string",
            "enum": [
              "runtime",
              "development",
              "unknown"
            ]
          },
          "lockfile_path": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ecosystem",
          "name"
        ],
        "additionalProperties": false
      }
    },
    "products": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "product",
              "vendor"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "vendor": {
            "type": "string",
            "maxLength": 200
          },
          "product": {
            "type": "string",
            "maxLength": 200
          },
          "version": {
            "type": "string",
            "maxLength": 200
          },
          "cpe23": {
            "type": "string",
            "maxLength": 1000
          },
          "source_url": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    },
    "target_stack": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "stack_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "expected_revision": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "consent",
    "consent_statement",
    "inventory_observed_at"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "declare_stack",
    "arguments": {
      "consent": true,
      "consent_statement": "I consent to replacing this documentation example inventory.",
      "stack_name": "Documentation example",
      "stack_environment": "production",
      "inventory_observed_at": "2026-10-24T09:24:22.737Z",
      "components": [
        {
          "ecosystem": "npm",
          "name": "next",
          "version": "14.2.24",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "@next/env",
          "version": "14.2.24",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "react",
          "version": "18.2.0",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "react-dom",
          "version": "18.2.0",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "typescript",
          "version": "5.4.5",
          "dependency": "development"
        },
        {
          "ecosystem": "npm",
          "name": "react",
          "version": "19.1.1",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "react-dom",
          "version": "19.1.1",
          "dependency": "runtime"
        },
        {
          "ecosystem": "npm",
          "name": "react-server-dom-webpack",
          "version": "19.1.1",
          "dependency": "runtime"
        }
      ],
      "target_stack": "<stack_id from list_stacks>",
      "expected_revision": 2
    }
  }
}

Production response excerpt

{
  "revision": 3,
  "consented_at": "2026-10-24T09:24:39.472181+00:00"
}

get_coverage

Source coverage and freshness. Lists only sources that have run; stale sources remain visible. No match is not an all-clear.

Read-only

Parameters

machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Example call

{
  "method": "tools/call",
  "params": {
    "name": "get_coverage",
    "arguments": {}
  }
}

Production response excerpt

{
  "state": "partial",
  "basis": "Coverage is partial: only published advisories from the listed sources are evaluated. No match is not an all-clear.",
  "last_checked_at": "2026-10-24T09:20:04.000Z",
  "sources": [
    {
      "source_type": "cisa_kev",
      "attribution": "CISA Known Exploited Vulnerabilities Catalog",
      "last_success_at": "2026-10-24T09:20:04+00:00",
      "status": "current"
    }
  ],
  "ecosystems": {
    "Packagist": "partial: ecosystem version ordering and OSV ranges; registry identity must be verified",
    "Go": "partial: ecosystem version ordering and OSV ranges; registry identity must be verified",
    "crates.io": "partial: ecosystem version ordering and OSV ranges; registry identity must be verified",
    "RubyGems": "partial: ecosystem version ordering and OSV ranges; registry identity must be verified",
    "Maven": "partial: ecosystem version ordering and OSV ranges; registry identity must be verified",
    "NuGet": "partial: ecosystem version ordering and OSV ranges; registry identity must be verified",
    "GitHub Actions": "partial: ecosystem version ordering and OSV ranges; registry identity must be verified",
    "npm": "partial: node-semver ordering and OSV intervals, including prereleases",
    "PyPI": "partial: PEP 440 ordering and OSV intervals"
  },
  "notes": []
}

mark_findings

After applying a patch, mark findings patched for your hostname. For products/vendors pass explicit targets:[{subject_id,nvd_cve_id}] from get_inventory_findings; vendor statuses asked_vendor/vendor_confirmed_patched/not_affected can carry evidence_url. Signed all_returned selections apply to package queues only. This is an agent assertion, not independent verification. Requires owner-enabled triage writes. ids accepts CVEs/GHSAs/slugs/UUIDs, or all_returned with the signed selection returned by the read. status open reopens. command start_fresh opens all for this machine; baseline hides older revisions; copy copies from copy_from; undo reverses action_id or your last action. All status changes retain history. scope stack supports only not_affected and includes future machines.

Writes inventory with explicit consent

Parameters

Choose the stack with stack_id, or with stack_name or source_repo (add organization when a name exists in several organizations). One of them is needed; list_stacks shows the choices.

stack_id
Optional · string · A stack id from list_stacks.
organization
Optional · string · Organization id or name from list_stacks.
stack_name
Optional · string · Stack name or Org / stack label. Use organization to disambiguate.
source_repo
Optional · string · Repository host/owner/repo (a local remote URL is also accepted).
machine
Optional · string · Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.
scope
Optional · string
command
Optional · string
ids
Optional
targets
Optional · array
selection
Optional · string
status
Optional · string
evidence_url
Optional · string
note
Optional · string
reason
Optional · string
snooze_until
Optional · string
action_id
Optional · string
copy_from
Optional · string
Full input schema and constraints
{
  "type": "object",
  "properties": {
    "stack_id": {
      "description": "A stack id from list_stacks.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "organization": {
      "description": "Organization id or name from list_stacks.",
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "stack_name": {
      "description": "Stack name or Org / stack label. Use organization to disambiguate.",
      "type": "string",
      "minLength": 1,
      "maxLength": 163
    },
    "source_repo": {
      "description": "Repository host/owner/repo (a local remote URL is also accepted).",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "machine": {
      "description": "Pass this agent's hostname. Unknown names register automatically in the selected stack; omitted = default.",
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "scope": {
      "type": "string",
      "enum": [
        "machine",
        "all_machines",
        "stack"
      ]
    },
    "command": {
      "type": "string",
      "enum": [
        "mark",
        "undo",
        "baseline",
        "start_fresh",
        "copy"
      ]
    },
    "ids": {
      "anyOf": [
        {
          "minItems": 1,
          "maxItems": 5000,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 3,
            "maxLength": 120
          }
        },
        {
          "type": "string",
          "const": "all_returned"
        }
      ]
    },
    "targets": {
      "minItems": 1,
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "nvd_cve_id": {
            "type": "string",
            "pattern": "^CVE-\\d{4}-\\d{4,}$"
          }
        },
        "required": [
          "subject_id",
          "nvd_cve_id"
        ],
        "additionalProperties": false
      }
    },
    "selection": {
      "type": "string",
      "maxLength": 16000
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "patched",
        "not_affected",
        "snoozed",
        "asked_vendor",
        "vendor_confirmed_patched"
      ]
    },
    "evidence_url": {
      "type": "string",
      "maxLength": 2000,
      "format": "uri"
    },
    "note": {
      "type": "string",
      "maxLength": 2000
    },
    "reason": {
      "type": "string",
      "maxLength": 2000
    },
    "snooze_until": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "action_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "copy_from": {
      "type": "string",
      "maxLength": 120
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

Choosing a read tool

Start with list_stacks, then what_to_patch for five ranked actions by default. Use limit, offset and only_affected to choose the queue. Use get_actionable_updates for a bounded view with offset pagination; restart after an inventory revision changes. Neither replaces the complete history.

Call get_coverage for source freshness and coverage details.

For the complete baseline, call get_stack_updates without a cursor. Pass compact:true for small pages, or verbose:true for full JSON. Follow the returned next_cursor while has_more is true; persist the checkpoint only after checkpoint is true and every page was processed successfully. Resume with that cursor for material changes. Cursors are omitted from these public excerpts. Follow the returned resync instruction if a cursor expires or the stack revision changes. Your agent host must run the schedule.