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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-zai-tools

v0.1.2

Published

Pi package that exposes Z.AI Web Search, Web Reader, and Zread MCP tools.

Readme

pi-zai-tools

Pi package for Z.AI remote MCP tools.

It bundles one pi extension that exposes these capabilities:

  • web search via Z.AI Web Search MCP
  • web page reading via Z.AI Web Reader MCP
  • public GitHub repository docs / structure / file access via Zread MCP

Included tools

  • zai_web_search
  • zai_web_reader
  • zai_zread_search_doc
  • zai_zread_get_repo_structure
  • zai_zread_read_file

Requirements

  • pi
  • a valid Z.AI API key with GLM Coding Plan access

Install

With pi

pi install npm:pi-zai-tools

From a local checkout

pi install /absolute/path/to/pi-zai-tools

Configuration

You can copy examples.env as a starting point for local development.

Required

export ZAI_API_KEY=your_api_key

Optional

Enable only selected modules:

export ZAI_ENABLED_MODULES=search,reader,zread

Defaults to all modules when omitted.

Override timeout and base URL:

export ZAI_TIMEOUT_MS=30000
export ZAI_BASE_URL=https://api.z.ai

Module mapping

  • searchzai_web_search
  • readerzai_web_reader
  • zreadzai_zread_search_doc, zai_zread_get_repo_structure, zai_zread_read_file

Usage examples

Search the web

  • “Search for recent React Server Components caching guidance”
  • “Find best practices for Python async retry strategies”

Read a page

  • “Read https://example.com and summarize it”
  • “Fetch this documentation page and list the migration steps”

Research a GitHub repo with Zread

  • “Search docs in vercel/ai for installation steps”
  • “Show me the structure of vercel/ai”
  • “Read package.json from vercel/ai”

Tool parameters

zai_web_search

  • query: string
  • count?: number

zai_web_reader

  • url: string

zai_zread_search_doc

  • repo: string (owner/repo)
  • query: string

zai_zread_get_repo_structure

  • repo: string (owner/repo)

zai_zread_read_file

  • repo: string (owner/repo)
  • path: string

Troubleshooting

Missing API key

If a tool reports that ZAI_API_KEY is missing, export it in your shell before launching pi.

Invalid token / auth failure

Check that:

  • the token is correct
  • the token is active
  • the token has quota left

Timeout

Increase:

export ZAI_TIMEOUT_MS=60000

Empty or weak results

  • try a broader search query
  • verify the target URL is public
  • verify the target repository is public and spelled as owner/repo

Validation status

This package includes:

  • unit tests for config, truncation, service fallback behavior, and extension registration
  • live integration tests against Z.AI MCP endpoints when ZAI_API_KEY is available

Quota note

Quota is controlled by your Z.AI plan, not by this package.

Security note

Do not hardcode API keys in the package or your repo. Prefer environment variables.

License

MIT