npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tpmjs/registry-search

v0.1.2

Published

Search the TPMJS tool registry from any AI SDK agent

Downloads

382

Readme

@tpmjs/registry-search

Search the TPMJS tool registry from any AI SDK agent. Discover thousands of tools dynamically.

Installation

npm install @tpmjs/registry-search
# or
pnpm add @tpmjs/registry-search

Usage

import { streamText } from 'ai';
import { anthropic } from '@ai-sdk/anthropic';
import { registrySearchTool } from '@tpmjs/registry-search';
import { registryExecuteTool } from '@tpmjs/registry-execute';

const result = streamText({
  model: anthropic('claude-sonnet-4-20250514'),
  tools: {
    registrySearch: registrySearchTool,
    registryExecute: registryExecuteTool,
  },
  system: `You have access to the TPMJS tool registry.
Use registrySearch to find tools, then registryExecute to run them.`,
  prompt: 'Search for web scraping tools and scrape https://example.com',
});

// The agent can now:
// 1. Search for tools: registrySearch({ query: "web scraping" })
// 2. Execute found tools: registryExecute({ toolId: "@firecrawl/ai-sdk::scrapeTool", params: { url: "..." } })

Tool: registrySearchTool

Search the TPMJS registry to find AI SDK tools.

Parameters

| Name | Type | Required | Description | |------|------|----------|-------------| | query | string | Yes | Search query (keywords, tool names, descriptions) | | category | string | No | Filter by category | | limit | number | No | Max results (1-20, default 5) |

Categories

  • web-scraping
  • data-processing
  • file-operations
  • communication
  • database
  • api-integration
  • image-processing
  • text-analysis
  • automation
  • ai-ml
  • security
  • monitoring

Returns

{
  "query": "web scraping",
  "matchCount": 3,
  "tools": [
    {
      "toolId": "@firecrawl/ai-sdk::scrapeTool",
      "name": "scrapeTool",
      "package": "@firecrawl/ai-sdk",
      "description": "Scrape any website into clean markdown",
      "category": "web-scraping",
      "requiredEnvVars": ["FIRECRAWL_API_KEY"],
      "healthStatus": "HEALTHY",
      "qualityScore": 0.9
    }
  ]
}

Understanding requiredEnvVars

The requiredEnvVars field tells you which API keys a tool needs to function. When executing a tool with @tpmjs/registry-execute, pass these keys in the env parameter:

// 1. Search finds a tool that needs FIRECRAWL_API_KEY
const searchResult = await registrySearchTool.execute({ query: 'web scraping' });
// searchResult.tools[0].requiredEnvVars = ["FIRECRAWL_API_KEY"]

// 2. Execute the tool with the required key
const result = await registryExecuteTool.execute({
  toolId: '@firecrawl/ai-sdk::scrapeTool',
  params: { url: 'https://example.com' },
  env: { FIRECRAWL_API_KEY: 'fc-xxx' }  // Pass required keys here
});

Tools with an empty requiredEnvVars array don't need any API keys.

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | TPMJS_API_URL | https://tpmjs.com | Base URL for the registry API |

Self-Hosted Registry

To use your own TPMJS registry:

export TPMJS_API_URL=https://registry.mycompany.com

Related

License

MIT