Skip to main content
Glama

Check a whole dependency tree

kenwea_notary_check_tree
Read-onlyIdempotent

Use for a whole npm project, a lockfile, or more than five npm packages, instead of one kenwea_notary_check per package. Answers every package in the tree at once from records the notary already holds; nothing runs during the call. Input, shortest first: packages, a list of {name, version, hasInstallScript}, with directs, the project's own dependencies as {name, version}. A version may be exact, a dist-tag or a range; a tag or range resolves to the version npm install picks today, and an entry that cannot be resolved is left out and named in skipped with the reason. Do not paste a large lockfile: search package-lock.json for "hasInstallScript": true and pass those entries as packages (with hasInstallScript true; package-lock keys entries by path, such as node_modules/@scope/name or node_modules/a/node_modules/b, so take the name from the entry's name field if it has one (an alias), else from the key after its last node_modules/; skip entries whose key has no node_modules/ (the project and workspace folders) and entries marked link), plus the direct dependencies from package.json as directs; packages that run nothing at install need not be sent. Or lockfile: the text of a package-lock.json (lockfileVersion 2 or 3), a pnpm-lock.yaml (v5, v6, v9), a yarn.lock (v1 or berry), or a package.json, whose ranges are resolved as npm would today (say so to the user); use it for pnpm v9 and yarn, whose lockfiles do not mark install scripts, or when the file is small. Behavior: a step runs inside the project, under the package that pulled it in, so the tree is checked through the direct dependencies: each one under which something runs at install is answered by its own record, made with its whole tree installed, and the packages under it come back as covered, with coveredBy naming it. Where the lockfile does not say which packages run something (pnpm v9, yarn), the registry is asked. A yarn.lock does not say which packages are direct, so each package that runs something is checked on its own; checkedThrough says which way it went. A package with no record yet is queued and checked in the background (queueNote says how fast); ask again with the same tree later to collect it. Does not spend the per-address check quota (60 tree calls an hour per address). Returns: summary; total, runNothing, runSomething, answered, queued, notQueued and covered; resolvedVersions and skipped when a version was a tag or range; findings (packages whose level is network, reads_credentials or sends_credentials); checkedThrough; and packages, each with status (answered, queued, not_queued, covered, not_checkable) and, when answered, level, summary, verdict, reasonCode, observed and signedAttestation. queued, not_queued and not_checkable have no record. Each record is signed; the tree summary itself is not. Verify a record with kenwea_notary_verify. Not for: one package you want checked now (use kenwea_notary_check), or a Python project. A lockfileVersion 1 file has no install script flags and is refused with a reason.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "kenwea_notary_check_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
directsNoWith packages: the project's own dependencies, so the tree is checked through them.
lockfileNoThe contents of a package-lock.json (lockfileVersion 2 or 3, as text or as the JSON object), a pnpm-lock.yaml, a yarn.lock or a project's package.json, as text.
packagesNoThe shortest input: the packages that run something at install (in package-lock.json, the entries with "hasInstallScript": true), each {name, version, hasInstallScript: true}. Send this, with directs, instead of a large lockfile.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / directs / items / properties / version / description
      Added value: +"An exact version, a dist-tag or a range."
    • addedInput schema / properties / packages / items / properties / version / description
      Added value: +"An exact version, a dist-tag or a range."
  2. Changed1 schema field changed
    • changedInput schema / properties / packages / description
      Previous value: -"Alternatively, the installed packages."New value: +"The shortest input: the packages that run something at install (in package-lock.json, the entries with \"hasInstallScript\": true), each {name, version, hasInstallScript: true}. Send this, with directs, instead of a large lockfile."
  3. Changed2 schema fields changed
    • addedInput schema / properties / directs
      Added value: +{
      +  "description": "With packages: the project's own dependencies, so the tree is checked through them.",
      +  "items": {
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "version": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / lockfile / description
      Previous value: -"The contents of a package-lock.json (lockfileVersion 2 or 3, as text or as the JSON object), a pnpm-lock.yaml or a yarn.lock, as text."New value: +"The contents of a package-lock.json (lockfileVersion 2 or 3, as text or as the JSON object), a pnpm-lock.yaml, a yarn.lock or a project's package.json, as text."
  4. Changed1 schema field changed
    • changedInput schema / properties / lockfile / description
      Previous value: -"The contents of package-lock.json (lockfileVersion 2 or 3), as text or as the JSON object."New value: +"The contents of a package-lock.json (lockfileVersion 2 or 3, as text or as the JSON object), a pnpm-lock.yaml or a yarn.lock, as text."
  5. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnly, idempotent, openWorld), the description discloses that nothing executes during the call, that answers come from existing notary records, that unresolved entries are queued and checked in the background, and that queued work is collected on a later identical call. It also quantifies the rate limit (60 tree calls an hour per address, not drawn from the per-address check quota) and names a hard failure mode (lockfileVersion 1 refused).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The when-to-use framing is correctly front-loaded, but the middle is a single enormous sentence with three levels of nested parentheses governing how to mine package-lock.json, which is hard to parse and partly duplicates the schema's own parameter descriptions. The returns paragraph is long, though it earns its length because no output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes on the full burden of explaining the return shape and does so item by item (summary counters, status values, resolvedVersions/skipped, findings, checkedThrough, per-package fields). It also closes the loop by pointing to kenwea_notary_verify for record verification and flags that the tree summary itself is unsigned.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already describes each parameter's role, so much of the description's input text is confirmatory. It still adds real meaning the schema lacks: how to derive names from package-lock keys (last node_modules/ segment, alias handling via the entry's name field), which entries to skip (project/workspace keys, link entries), and that unresolvable versions are dropped and reported in skipped.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb and resource ('check' a 'whole npm project, a lockfile, or more than five npm packages') and explicitly contrasts it with the per-package sibling kenwea_notary_check. The 'Not for' clause repeats the distinction, so an agent can route correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit selection criteria (whole project, lockfile, or more than five packages), names the alternative tool for the single-package case, and excludes a non-target (Python projects). It also states which input form to prefer under which circumstance (pnpm v9 and yarn, or small files, use lockfile).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.