How TPMJS Works
++ The complete journey from npm package to AI-powered tool execution +
+What is TPMJS?
++ TPMJS (Tool Package Manager for JavaScript) is a{' '} + + registry and execution platform + {' '} + that automatically discovers, catalogs, and runs AI tools from the npm ecosystem. +
++ It acts as a bridge between{' '} + AI agents (powered by + frameworks like Vercel AI SDK, LangChain, and LlamaIndex) and{' '} + reusable tool packages{' '} + published to npm. +
+Automatic Discovery
++ Tools appear on tpmjs.com within 2-15 minutes of publishing to npm +
+Quality Scoring
++ Automatic scoring based on documentation, downloads, and metadata completeness +
+Instant Execution
++ AI agents can discover and execute tools through a unified API +
+For Tool Developers
++ Publishing a tool to TPMJS is as simple as publishing to npm with a standardized + metadata field. +
+ + {/* Step 1 */} ++ Add metadata to package.json +
+Publish to npm
++ That's it! TPMJS will automatically discover your tool within 2-15 minutes. +
+For AI Agents
++ AI agents can search, discover, and execute tools through the TPMJS API. +
+ + {/* Search Tools */} +Search & Filter
+Execute Tools
+Test in Playground
++ Try tools interactively before integrating them into your AI agent. +
+ + + +The Magic Behind the Scenes
++ 1. Automatic Discovery +
++ TPMJS uses three parallel mechanisms to discover tools from npm: +
+Changes Feed
++ Monitors npm's real-time changes stream +
+Keyword Search
++ Searches npm for "tpmjs-tool" keyword +
+Manual Curation
++ Curated list of high-quality tools +
+2. Validation
++ Every discovered package is validated against the TPMJS schema: +
+-
+
- + ✓ + Valid category from predefined list + +
- + ✓ + Description between 20-500 characters + +
- + ✓ + Parameters follow type schema (string, number, boolean, etc.) + +
- + ✓ + Environment variables properly documented + +
- + ✓ + Supports legacy single-tool and modern multi-tool formats + +
3. Quality Scoring
++ Every tool receives a quality score (0.00 to 1.00) based on: +
++ Higher quality scores = better visibility in search results and featured + sections +
+4. Health Checks
++ Every tool is tested to ensure it works correctly: +
+Import Health
+-
+
- • Can the package be imported? +
- • Does the export exist? +
- • Is it in AI SDK format? +
Execution Health
+-
+
- • Can test parameters be generated? +
- • Does the tool execute without errors? +
- • Does it return valid results? +
5. Indexing
++ Tools are stored in a PostgreSQL database with rich metadata: +
+-
+
- + → + + Package-level: Version, README, + repository, category, downloads, stars + + +
- + → + + Tool-level: Export name, + description, parameters, return type, AI guidance + + +
- + → + + Metrics: Quality score, health + status, execution history + + +
System Architecture
+
+ {`┌─────────────────────────────────────────────────────────────────┐
+│ NPM Registry │
+└────────────┬────────────────────────┬───────────────────────────┘
+ │ │
+ ┌────────▼────────┐ ┌────────▼────────┐ ┌──────────────┐
+ │ Changes Feed │ │ Keyword Search │ │ Manual Tools │
+ │ Every 2 min │ │ Every 15 min │ │ As needed │
+ └────────┬────────┘ └────────┬────────┘ └──────┬───────┘
+ │ │ │
+ └────────────────────────┴───────────────────────┘
+ │
+ ┌───────▼────────┐
+ │ Validation │
+ │ Schema Check │
+ └───────┬────────┘
+ │
+ ┌─────────────────┴─────────────────┐
+ │ │
+ ┌───────▼────────┐ ┌──────────▼──────────┐
+ │ PostgreSQL │ │ Health Checks │
+ │ Database │ │ Import + Execution │
+ └───────┬────────┘ └──────────┬──────────┘
+ │ │
+ └─────────────────┬─────────────────┘
+ │
+ ┌───────▼────────┐
+ │ Metrics Sync │
+ │ Quality Score │
+ │ Every hour │
+ └───────┬────────┘
+ │
+ ┌─────────────────┴─────────────────┐
+ │ │
+ ┌───────▼────────┐ ┌──────────▼──────────┐
+ │ Search API │ │ Execution API │
+ │ /api/tools │ │ /api/tools/execute │
+ └───────┬────────┘ └──────────┬──────────┘
+ │ │
+ └─────────────────┬─────────────────┘
+ │
+ ┌───────▼────────┐
+ │ Frontend UI │
+ │ Search, Detail │
+ │ Playground │
+ └────────────────┘`}
+
+ From Publish to Execution
+Developer publishes to npm
+
+ Package with{' '}
+ tpmjs-tool{' '}
+ keyword
+
TPMJS discovers package
++ Changes feed or keyword search picks it up +
+Validation & indexing
++ Schema validation, database insertion, health checks +
+Tool appears on tpmjs.com
++ Searchable, browsable, and executable in playground +
+Quality score calculated
++ Based on tier, downloads, stars, and metadata +
++ AI agents can discover & execute +
++ Available via API for search and execution +
+Ready to Get Started?
++ Whether you're building AI tools or integrating them into your agent, TPMJS makes + it simple. +
+