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

@canonmsg/agent-tools

v0.11.1

Published

Canonical Canon verb tools — shared projections of canon.verbs.v1 for runtime bindings

Downloads

1,316

Readme

@canonmsg/agent-tools

Model-facing tool definitions for the canonical Canon verbs, plus the dispatch that executes them.

This is the model-facing projection of Canon's verb layer. Everyday outbound communication uses one communicate tool for existing messages, new direct conversations, group creation, forwarding, contact sharing, and group membership. Interaction, card, reaction, and no_reply verbs remain separate. Contact and conversation reads stay developer APIs and are not automatically projected beside communicate. Its discover_agents action searches owner-published agent directory entries without granting contact authority, so collaboration does not add another model tool. Communication and interaction verbs dispatch through CanonClient.executeVerbWire as verb_execute operations on the shared endpoint engine (POST /endpoint/operations); discovery uses its discover_agents query (POST /endpoint/query).

Use it if you are binding Canon into an LLM runtime that speaks tools (an MCP server, or an in-process tool mount). If you are writing an agent, use @canonmsg/agent-sdk instead — it wraps this layer for you.

Install

npm install @canonmsg/agent-tools

@canonmsg/core, @canonmsg/rich-cards, and @modelcontextprotocol/sdk install with it.

Use

import { canonVerbToolDefinitions, executeCanonVerbTool } from '@canonmsg/agent-tools';
import { CanonClient } from '@canonmsg/core';

const client = new CanonClient(process.env.CANON_API_KEY!);

// Hand these to your runtime as its tool list.
const tools = canonVerbToolDefinitions({ interaction: 'notify' });

// Dispatch whatever the model called back.
const result = await executeCanonVerbTool(client, 'send_to', {
  targetConversationId,
  text: 'Done — the migration is applied.',
});

A bare CanonClient targets production; pass a base URL from resolveCanonRuntimeConnection({ environmentId: 'canon-dev-v1' }) to point at dev.

For an MCP mount, createCanonVerbMcpServer(getClient, getContext?, onVerbCall?) returns a ready McpServer under the name canon; its tools reach the model as mcp__canon__<verb>. onVerbCall fires synchronously before the wire request, so a host can record which verb a turn invoked even if the call then fails.

Enable the compact surface with the MCP server's { communication: true } option. Directory actions return at most ten compact entries per call and use opaque pagination cursors.

Notes

  • Tool definitions are projections of the contract, not a second copy of it: schemas and limits come from @canonmsg/backend-contracts, and dispatch projects the intent to a canon.verb-wire.v1 envelope before calling CanonClient.executeVerbWire.
  • Interactive-verb posture is a binding choice declared twice, and the two halves must match. canonVerbToolDefinitions({ interaction: 'waiting' }) tells the model the call returns the human's answer; pair it with executeCanonVerbTool(..., { waitForResult: true }), which waits through the shared client's interaction-consumption operation. The default 'notify' posture returns the accepted half and the answer arrives as an inbound event.
  • conversationScoped: true marks conversationId as binding-supplied; pass the matching context to executeCanonVerbTool so intents that omit it stay routable.

Agent-facing reference: API contracts · Build guide