Skip to main content
Glama

scan_supply_chain_hazards

Read-onlyIdempotent

Detect supply-chain risks in lockfiles by scanning dependencies for install lifecycle hooks, cleartext HTTP or unpinned Git origins, SHA-1 hashes, and typosquats before installing.

Instructions

Scans lockfile dependencies specifically for preinstall/postinstall lifecycle hooks, cleartext HTTP or unpinned Git origins, deprecated SHA-1 hashes, and ecosystem typosquats.

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": "scan_supply_chain_hazards"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameHintNoOptional filename hint (e.g. "package-lock.json", "uv.lock", "Cargo.lock") when passing raw lockfileContent.
lockfilePathNoOptional local file path to a lockfile on disk when lockfileContent is omitted.
allowedPackagesNoOptional list of verified native-addon packages (e.g. ["esbuild", "sharp"]) allowed to declare install scripts.
lockfileContentNoRaw text content of package-lock.json, pnpm-lock.yaml, Cargo.lock, poetry.lock, or uv.lock to inspect for supply-chain traps.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds value by naming the specific detection categories, but says nothing about how findings are reported, whether scanning is local-only, or how lockfile format is inferred — meaningful gaps given there is no output schema.

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

Conciseness5/5

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

A single sentence, front-loaded with the verb and resource, then the specific checks. No filler, no restatement of the tool name, every clause carries information.

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

Completeness3/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 should signal the shape of the result (list of findings? severity? remediation?) but never does. It is complete on the 'what is checked' axis and silent on the 'what comes back' axis, which leaves a real gap for an agent planning next steps.

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

Parameters3/5

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

Schema description coverage is 100%, so all four parameters (including the mutually-exclusive lockfileContent vs lockfilePath pattern and allowedPackages) are already documented in the schema. The description adds no further parameter meaning such as precedence rules between path and content, so baseline 3 applies.

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?

States a specific verb ("Scans") and resource ("lockfile dependencies") and then enumerates the exact hazard classes targeted: lifecycle hooks, cleartext HTTP/unpinned Git origins, SHA-1 hashes, and typosquats. That enumeration makes it unmistakably distinct from audit_lockfile_compliance and generate_cyclonedx_sbom without needing to name them.

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

Usage Guidelines3/5

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

Usage is implied by the hazard list — an agent can infer this is the tool for security-trap detection rather than license/SBOM compliance — but there is no explicit when-to-use, when-not-to-use, or prerequisite statement. No alternative is named even though audit_lockfile_compliance is an obvious neighbor.

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