Skip to main content
Glama

PG1 Sovereign Threat Intelligence

check_package

PG1 Sovereign Threat Intelligence: a pre-install check for one npm or PyPI package - check before you install. No payment required - this tool is always free, and no AI model is involved. SIBLING DIFFERENTIATION: Use before installing or recommending a software package (npm or PyPI) only. Do NOT use for domains (use check_domain_age / check_hostname_reputation), CVE ids (use get_cve_details) or products by vendor name (use get_cve_by_product). BEHAVIOR: Returns { ecosystem, name, version_checked, exists, version_exists, first_published, age_days, latest_version, latest_published, reported_malicious, malicious_reports, vulnerabilities, lookalike_of, deprecated, install_scripts, attribution }. Signals: whether the package (and the version, if given) exists in the registry - a package that does not exist is a key signal, since names AI assistants invent get registered by attackers; first and latest publish dates; public malicious-package reports (OpenSSF Malicious Packages, via OSV.dev) for the version checked; known vulnerabilities for that version (OSV.dev: ids and severity only); whether the name looks like a popular package's (typosquat patterns); and, for npm only, the deprecated flag and install scripts (preinstall/install/postinstall). With no version, the latest version is checked. STATUS: "flagged" when the version is reported malicious (PACKAGE_REPORTED_MALICIOUS - worded "reported malicious" because such reports can be false positives), the package or version does not exist (PACKAGE_NOT_FOUND / PACKAGE_VERSION_NOT_FOUND), or the package is under 30 days old AND its name looks like a popular package's (PACKAGE_NEW_LOOKALIKE); otherwise "unknown" if any lookup did not complete (a failed registry lookup gives exists: null, never false); otherwise "no_flags". A look-alike name alone, a new package alone, known vulnerabilities (of MODERATE, LOW or unknown severity), deprecation and install scripts are informational reasons that never flag on their own. Since 1.24.0 a known vulnerability of severity HIGH or CRITICAL in the version checked (CVSS base score 7.0 or more, from the advisory's CVSS v3.x/v4.0 vector, or the database's own HIGH/CRITICAL label when no score is given) flags the result (PACKAGE_KNOWN_VULNERABILITIES_HIGH); the result also gives highest_severity, vulnerability_count, fixed_version_suggestion, a one-line summary, and per advisory severity_level, cvss_score and fixed_version. This tool never returns "safe" or "clean"; no_flags means nothing was found in the sources checked. VALIDATION: one package per call; malformed input returns an MCP tool error (isError: true, code invalid_ecosystem, invalid_package_name or invalid_version). Registry answers are cached for 1 hour and malicious/vulnerability answers for 15 minutes. Rate-limited to 60 calls/hour per caller when unauthenticated; a valid Gumroad license key (X-API-KEY header) exempts the limit. Data sources and licences: https://pg1-ai-agent.vercel.app/docs/attributions

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ecosystem": "<ecosystem>",
      "name": "<name>"
    },
    "name": "check_package"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesMandatory package name, exactly one, e.g. 'lodash', '@types/node' or 'requests'.
versionNoOptional exact version to check, e.g. '4.17.21'. No ranges or tags. Defaults to the latest published version.
ecosystemYesMandatory package ecosystem: 'npm' or 'pypi'.

Output Schema

NameRequiredDescriptionDefault
nameYesThe name as given (trimmed).
noteNo
cachedYes
checksNoWhich underlying sources were checked for this result and whether each one completed.
existsYesWhether the package exists in the registry; null when the registry lookup did not complete (never false on a failure).
statusNo"unknown" whenever a source needed for this answer timed out, errored, or was skipped - never "no_flags" in that case.
reasonsNoMachine-readable reason codes for anything flagged in this result. Empty when nothing was flagged.
summaryNo1.24.0: one line for a person, e.g. "no_flags: 2 known vulnerabilities, highest MODERATE; consider 4.17.23 if available". Never "safe" or "clean".
age_daysYesDays since the first publish.
ecosystemYes
deprecatedYesnpm only: whether version_checked is deprecated. null for PyPI or when unknown.
request_idNoUUID for this request, also sent as the X-Request-Id response header.
attributionYesAlways present: the data sources and a link to their licences.
lookalike_ofYesThe popular package this name looks like, if any.
test_fixtureNotrue only when the input was a documented integration test fixture and this response is canned; absent on real results.
canonical_nameNoThe name as the registry spells it, when the package exists.
latest_versionYes
version_existsYesWhether version_checked is published; null when unknown.
first_publishedYesISO timestamp of the first publish.
install_scriptsYesnpm only: the install-time scripts version_checked runs. null for PyPI or when unknown.
version_checkedYesThe version the malicious-report, vulnerability, deprecation and install-script signals describe: the requested version, or the latest one.
vulnerabilitiesYesKnown vulnerabilities for version_checked: id and severity only. null when not checked.
highest_severityNo1.24.0: the highest severity_level among vulnerabilities; null when there are none or none has a known severity. HIGH or CRITICAL flags the result.
latest_publishedYesISO timestamp of the latest version's publish.
lookalike_patternNo
malicious_reportsYesReport ids (MAL-...).
version_requestedYes
reported_maliciousYestrue when a public malicious-package report covers the version checked (or the package, when no version could be determined); null when that lookup did not complete. Reports can be false positives.
deprecation_messageNonpm only: the publisher's deprecation message (untrusted text, cut to 300 characters).
vulnerability_countNo1.24.0: how many known vulnerabilities the version checked has; null when not checked.
vulnerabilities_omittedNoAdvisories left out because they come from a source outside PG1's licence-checked list.
fixed_version_suggestionNo1.24.0: the lowest version that fixes every listed advisory, when each lists a fix; else null.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedOutput schema / properties / fixed_version_suggestion
      Added value: +{
      +  "description": "1.24.0: the lowest version that fixes every listed advisory, when each lists a fix; else null.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / highest_severity
      Added value: +{
      +  "description": "1.24.0: the highest severity_level among vulnerabilities; null when there are none or none has a known severity. HIGH or CRITICAL flags the result.",
      +  "enum": [
      +    "CRITICAL",
      +    "HIGH",
      +    "MODERATE",
      +    "LOW",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / summary
      Added value: +{
      +  "description": "1.24.0: one line for a person, e.g. \"no_flags: 2 known vulnerabilities, highest MODERATE; consider 4.17.23 if available\". Never \"safe\" or \"clean\".",
      +  "type": "string"
      +}
    • addedOutput schema / properties / vulnerabilities / items / properties / cvss_score
      Added value: +{
      +  "description": "1.24.0: the CVSS v3.x or v4.0 base score computed from cvss_vector; null when there is no vector PG1 can score.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / vulnerabilities / items / properties / fixed_version
      Added value: +{
      +  "description": "1.24.0: the first version after version_checked that fixes this advisory, when the database lists one.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / vulnerabilities / items / properties / severity_level
      Added value: +{
      +  "description": "1.24.0: the severity PG1 uses: from cvss_score (>= 9.0 CRITICAL, >= 7.0 HIGH, >= 4.0 MODERATE, else LOW), else the database label; null when unknown.",
      +  "enum": [
      +    "CRITICAL",
      +    "HIGH",
      +    "MODERATE",
      +    "LOW",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / vulnerability_count
      Added value: +{
      +  "description": "1.24.0: how many known vulnerabilities the version checked has; null when not checked.",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the exact return fields, the status decision logic (flagged / unknown / no_flags), the important distinction that a failed lookup yields exists: null rather than false, the false-positive caveat on malicious reports, and the 1.24.0 change that HIGH/CRITICAL CVEs now flag results. It also adds operational context absent from structured fields: 1-hour registry cache, 15-minute malicious/vuln cache, 60 calls/hour unauthenticated with X-API-KEY exemption, and error codes for malformed input.

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?

It is front-loaded and organized under clear BEHAVIOR / STATUS / VALIDATION headers, which helps navigation. However, return fields are enumerated twice (the initial attribution list, then the 'also gives highest_severity, vulnerability_count...' sentence), the 'reported malicious' wording rationale is repeated, and the 'no payment required / no AI model' framing is closer to marketing than tool guidance for a ~450-word description.

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?

For a tool with non-trivial status logic, it explains every outcome the agent could receive, including the deliberate absence of a 'safe' verdict and the null-vs-false rule for failed lookups. Error modes, rate limits and caching are all covered, so nothing needed to interpret results or handle failures is missing despite an output schema already existing.

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 ecosystem, name and version are already well documented, making 3 the baseline. The description adds only marginal meaning beyond the schema: one package per call, latest-version defaulting as a behavior, and npm-only fields (deprecated, install_scripts) that clarify why the ecosystem parameter matters.

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 and resource ('a pre-install check for one npm or PyPI package') and immediately bounds scope to package pre-install checks. The 'SIBLING DIFFERENTIATION' line explicitly routes domains, CVE ids and vendor-product queries to check_domain_age, check_hostname_reputation, get_cve_details and get_cve_by_product, so an agent can pick it over siblings without opening any 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?

Gives explicit when-to-use ('before installing or recommending a software package'), explicit when-not-to-use with the correct alternative named for each excluded case, and a per-call cardinality constraint ('one package per call'). The 'with no version, the latest version is checked' note tells the agent how to call it without a version.

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.