- TPMJS Specification -
-- The open standard for AI tool discovery and integration -
-- What is TPMJS? -
-- TPMJS (Tool Package Manager for JavaScript) is an open standard and registry for AI - tool discovery and integration. It solves the problem of fragmented AI tool - ecosystems by providing: -
--
-
- - Automatic Discovery - Tools are - automatically indexed from NPM based on keywords - -
- - Standardized Metadata - A unified - specification for describing tool capabilities - -
- - Quality Scoring - Algorithmic ranking - based on documentation completeness and community adoption - -
- - AI Agent Integration - Structured - metadata optimized for LLM tool selection - -
- How it Works -
-
- Add the tpmjs{' '}
- keyword and a{' '}
- tpmjs metadata
- field to your package.json
-
- TPMJS monitors NPM every 2 minutes for new tools and updates the registry - automatically -
-- Your tool appears on tpmjs.com within 15 minutes, searchable by AI agents and - developers -
-- The Specification -
-
- The TPMJS specification defines a{' '}
- tpmjs field in
- package.json. TPMJS automatically extracts parameter schemas from your tool code, so
- you only need to provide basic metadata.
-
- Automatic Schema Extraction -
-- TPMJS automatically extracts your tool's input schema (parameters) by - analyzing your code when it syncs. You no longer need to manually document - parameters, returns, or AI agent guidance in package.json. -
-- Auto-extracted from your Zod schema -
-- Derived from inputSchema automatically -
-- Shows extracted schema with source badge -
-
- category *
-
- - Tool category for organization. Must be one of the following: -
-- Minimal Example (auto-discovery): -
-- That's it! TPMJS will automatically discover your exported tools and - extract their schemas. -
-- Auto-Discovery of Tools -
-
- When you omit the tools array, TPMJS
- automatically scans your package exports and registers any export that looks
- like an AI SDK tool (has description{' '}
- and execute properties).
-
- Works with any AI SDK compatible tool -
-
- Add explicit tools to control what gets registered
-
- tools
-
- - Array of tools to register. If omitted, tools are auto-discovered. Each tool - has: -
--
-
-
-
name- The exported function name - (required) -
- -
-
description- What the tool does - (optional, auto-extracted if omitted) -
-
- env
-
- - Array of environment variables required by the tool. Each variable has: -
--
-
-
-
name- Environment variable name - (e.g., "OPENAI_API_KEY") -
- -
-
description- What the variable - is used for -
- -
-
required- Boolean (defaults to - true) -
-
- frameworks
-
- - Array of compatible AI frameworks. Supported values: -
-- Example with explicit tools: -
-- The following fields are automatically extracted from your tool code. You can - optionally provide them to override the extracted values: -
--
-
-
-
- description -- → Auto-extracted from tool's description property -
- -
-
- parameters -- → Auto-extracted from tool's Zod inputSchema -
- -
-
returns- → Auto-extracted from tool definition -
- -
-
aiAgent- → Auto-extracted from tool metadata -
-
- If auto-extraction fails, TPMJS will fall back to any manually provided values. -
-- Schema Extraction -
-- When TPMJS syncs your package, it automatically extracts your tool's inputSchema - by loading and inspecting your tool in a sandboxed environment. -
-- Schema is extracted automatically when your package is discovered or updated -
-- Tool pages show whether schema was "Auto-extracted" or - "Author-provided" -
-- Users can trigger re-extraction from the tool page if needed -
-How It Works:
--
-
- Your tool is loaded in a Deno sandbox via esm.sh -
-
- The
inputSchemaproperty is read from - your exported tool -
- - The JSON Schema is stored in our database -
- Parameters are derived from the schema for display -
- Field Reference -
-| Field | -Type | -Required | -Description | -
|---|---|---|---|
- category
- |
- string | -- Yes - | -Tool category from predefined list | -
- tools
- |
- array | -No | -- Array of tool definitions (name + description). Auto-discovered if - omitted. - | -
- env
- |
- array | -No | -Required environment variables | -
- frameworks
- |
- array | -No | -Compatible AI frameworks | -
- parameters
- |
- array | -
- |
- - Auto-extracted from tool - | -
- returns
- |
- object | -
- |
- - Auto-extracted from tool - | -
- aiAgent
- |
- object | -
- |
- - Auto-extracted from tool - | -
+ TPMJS Specification +
+- Quality Score -
-- Tools are ranked by quality score, calculated from three factors: -
--
-
- - Rich: 4x multiplier - -
- - Basic: 2x multiplier - -
- - Minimal: 1x multiplier - -
- Logarithmic scale based on monthly downloads. More downloads = higher score. -
-- Logarithmic scale based on repository stars. Community validation boosts - visibility. -
-Formula:
-- Discovery & Sync -
-- TPMJS automatically discovers and updates tools using three strategies: -
-- Monitors NPM's real-time changes feed every 2 minutes -
-
- Searches for{' '}
- tpmjs keyword
- every 15 minutes
-
- Updates download stats and quality scores hourly -
-- Validation -
-- The TPMJS specification is validated using Zod schemas. The validation logic is - available in the{' '} - - @tpmjs/types - {' '} - package. -
-- Common Validation Errors: -
--
-
- - Invalid category: Category must be - one of the 12 predefined values - -
- - Description too short/long:{' '} - Description must be 20-500 characters - -
- - Invalid env: Each environment - variable must have a name and description - -
- Publishing Your Tool -
-- Publishing a tool to TPMJS is simple: -
-
- Add tpmjs{' '}
- keyword
-
- Add tpmjs field
-
Publish to NPM
-- Appears on tpmjs.com in 15 min -
-- Support & Resources -
-Minimal Configuration
+
+ Add the tpmjs{' '}
+ keyword and field to your package.json. Tools are auto-discovered from your exports.
+
+ category (required) +
++ One of the following predefined categories: +
+
+ {cat}
+
+ ))}
+ + tools (optional) +
++ Explicit tool definitions. If omitted, tools are auto-discovered from your exports. +
++ env (optional) +
++ Environment variables required by your tools: +
++ frameworks{' '} + (optional) +
+Compatible AI frameworks:
+
+ {fw}
+
+ ))}
+ package.json
+Complete TPMJS configuration
+src/index.ts
++ Tool implementation with Vercel AI SDK +
+Publish to npm
+
+ Run npm publish to
+ publish your package
+
Auto-Discovery
++ TPMJS detects your package and extracts tool schemas automatically +
+Live on Registry
++ Your tools appear on tpmjs.com, searchable by AI agents +
+