{"uid":"cap_QKKJ8P8eab-g2nzeoIJzo","slug":"fhi-x402-package-install-preflight-check-b951bbe3","name":"FHI x402 Package Install Preflight Check","description":"Stateful remote-MCP change evidence, payable per call with x402 Base USDC.","url":"https://polished-truth-c514.fhi-llc-1118.workers.dev/api/v1/package-install-preflight?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"version":{"type":"string"},"ecosystem":{"enum":["npm","PyPI"],"type":"string"},"expectedName":{"type":"string","minLength":1}}},"responseSchema":{"type":"json","example":{"action":"block","package":{"name":"lodahs","exists":false,"ecosystem":"npm"},"riskSignals":["package_not_found","near_expected_name"]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dxbZVfv1yGq2Z5vgrf7w9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Checks whether a package installation is safe or advisable before installing, returning preflight validation data for npm or PyPI packages.","exampleAgentPrompt":"Before I install it, can you run a preflight check on the npm package 'lodash' version '4.17.21' to make sure it's safe and ready to use?","exampleUseCases":[{"title":"Pre-install safety check for npm dependency","prompt":"I want to add 'axios' version '1.6.0' from npm to my project — can you do a preflight check to see if there are any issues I should know about before installing it?"},{"title":"PyPI package validation before deployment","prompt":"We're about to install 'requests' version '2.31.0' from PyPI in our production environment — can you run a preflight check on it first to make sure everything looks good?"},{"title":"Automated agent dependency vetting","prompt":"My build agent is about to pull in 'express' from npm — can you check it without specifying a version to make sure the latest is safe before we proceed?"}],"resultDescription":"Returns preflight validation data about the specified package, including signals about whether the package is safe or advisable to install, potential issues, and relevant package metadata for the requested name, version, and ecosystem.","failureModes":["Package name not found in the specified ecosystem — returns error or empty result","Invalid ecosystem value (anything other than 'npm' or 'PyPI') — schema validation error","Missing required fields (name or ecosystem) — 400 bad request","Payment failure via x402 protocol — 402 Payment Required before result is returned","Network timeout on Cloudflare Worker edge — transient 5xx error","Version string does not exist for the package — may return not-found or latest fallback"],"whenToPreferThis":"Use this endpoint when an AI agent or automated pipeline needs to vet a package before installing it, especially in autonomous or CI/CD workflows where a human isn't reviewing dependencies manually. Prefer this over manual registry lookups when you need a structured, pay-per-use preflight signal for npm or PyPI packages without standing up your own security scanning infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T06:31:44.608Z","isFirstParty":false,"canonicalSlug":"fhi-x402-package-install-preflight-check-b951bbe3"}