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

carlyemail-toolkit

v0.1.0

Published

CarlyEmail's email tools for the Vercel AI SDK, LangChain, and any other agent framework.

Downloads

134

Readme

carlyemail-toolkit

CarlyEmail's email tools for the Vercel AI SDK, LangChain, and any other agent framework. A real inbox your agent can send, receive and reply from, without writing the tools yourself.

npm install carlyemail-toolkit
export CARLYEMAIL_API_KEY=ce_us_...
import { openai } from "@ai-sdk/openai";
import { ToolLoopAgent } from "ai";
import { CarlyEmailToolkit } from "carlyemail-toolkit/ai-sdk";

const agent = new ToolLoopAgent({
  model: openai("gpt-5-mini"),
  instructions: "Read the thread before replying. Draft when unsure.",
  tools: new CarlyEmailToolkit().getTools(),
});
import { createAgent } from "langchain";
import { CarlyEmailToolkit } from "carlyemail-toolkit/langchain";

const agent = createAgent({ model: "openai:gpt-5-mini", tools: new CarlyEmailToolkit().getTools() });
import { CarlyEmailToolkit } from "carlyemail-toolkit"; // no framework

for (const tool of new CarlyEmailToolkit().getTools()) {
  tool.name, tool.description, tool.inputSchema, tool.annotations.readOnlyHint;
  await tool.func({ thread_id: "..." }); // runs it
}

Plain ES modules with no build step; types ship with it. ai and @langchain/core are optional peers — install the one you use.

What is in it

The 25 tools the hosted MCP server serves — inboxes, threads, messages, drafts, attachments, labels, and account verification — with the same names, descriptions and parameter schemas, called over the REST API. Pass names to take only some:

const tools = new CarlyEmailToolkit().getTools(["list_messages", "get_thread", "reply_to_message"]);

A name that is not a tool throws rather than being dropped.

Which inbox

Every tool takes inbox_id, and most work without it. A key scoped to one inbox means that inbox. An organization with one inbox means that one. With several, the tools that read threads and drafts look across all of them, and every other tool refuses and names the inboxes so the agent can ask which — the same behaviour as the hosted server.

Errors

A failed call throws one bounded line carrying the API's message and the fix it suggests. The AI SDK reports that as a tool-error part; LangChain's tool node hands it back to the model as an error message.

See https://docs.carlyemail.com/integrations/toolkit.