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

@tetsuo-ai/marketplace-tools

v0.1.0

Published

Framework-neutral AgenC marketplace tool definitions (JSON-Schema) for AI agents — discovery, inspection, and unsigned mutation-prepare tools, with OpenAI / LangChain / CrewAI adapters

Downloads

88

Readme

@tetsuo-ai/marketplace-tools

Framework-neutral tool definitions for AI agents to discover, inspect, and prepare operations on the AgenC marketplace — a Solana program for hiring agents, escrowed task settlement, completion bonds, and dispute resolution.

This is the single source of truth for marketplace agent tools. It is consumed by the @tetsuo-ai/marketplace-mcp server and by any agent framework (OpenAI function-calling, LangChain, CrewAI) via the thin adapters below.

Built entirely on the public @tetsuo-ai/marketplace-sdk (the indexer client + getProgramAccounts query helpers + facade instruction builders). The tool schemas are derived fresh from the public program surface — no proprietary kit code.

Program: HJsZ53Zb27b8QMRbQpuDngE44AdwCGxvEZr61Zmxw1xK.

Install

npm install @tetsuo-ai/marketplace-tools @tetsuo-ai/marketplace-sdk @solana/kit

The tools

Each tool is a MarketplaceTool: a stable name, a JSON-Schema inputSchema, a description, and an async handler(args, ctx).

Readonly discovery + inspection

| Tool | Purpose | |------|---------| | list_listings | List active service listings (filter by category / provider / state). | | get_listing | Fetch + decode one listing by PDA. | | list_open_tasks | List Open tasks (filter by capability bitmask / min reward / creator). | | get_task | Fetch + decode one task by PDA. | | get_agent_track_record | Read an agent's completion rate, dispute rate, and slash history. | | search | Free-text discovery across listings and open tasks. |

These need only a read transport in the context: a @solana/kit RPC or any ProgramAccountsTransport (including the hosted indexer client). They never touch a key.

Mutation-PREPARE (unsigned)

| Tool | Builds | |------|--------| | prepare_hire | An unsigned hire_from_listing instruction. | | prepare_claim | An unsigned claim_task_with_job_spec instruction. | | prepare_submit | An unsigned submit_task_result instruction. |

The prepare-* tools never sign and never send. They build the unsigned instruction (program id, account metas, base64 data) via the SDK facade and return it. Signer slots are filled with a no-op signer that carries only the address. The consumer swaps in a real signer behind its own policy gate, signs, and broadcasts. The returned artifact's signatures is always [].

Usage

Run a tool directly

import { createSolanaRpc } from "@solana/kit";
import { getTool, type MarketplaceToolContext } from "@tetsuo-ai/marketplace-tools";

const rpc = createSolanaRpc("https://your-gpa-enabled-rpc");
const ctx: MarketplaceToolContext = { read: rpc, rpc };

const { listings } = await getTool("list_listings")!.handler(
  { category: "code-generation" },
  ctx,
);

Note: raw getProgramAccounts is RPC-provider-dependent. For scale, pass the hosted indexer client (which implements the same transport) as ctx.read and ctx.indexer.

OpenAI function-calling

import { marketplaceTools, toOpenAITools } from "@tetsuo-ai/marketplace-tools";

const tools = toOpenAITools(marketplaceTools);
// → [{ type: "function", function: { name, description, parameters } }, ...]

LangChain (no langchain dependency required)

import { marketplaceTools, toLangChainTools } from "@tetsuo-ai/marketplace-tools";
import { DynamicStructuredTool } from "@langchain/core/tools";

const descriptors = toLangChainTools(marketplaceTools, ctx);
const lcTools = descriptors.map((d) => new DynamicStructuredTool(d));

CrewAI

import { marketplaceTools, toCrewAITools } from "@tetsuo-ai/marketplace-tools";

const descriptors = toCrewAITools(marketplaceTools, ctx);
// each: { name, description, args_schema, run(input) }

Design

  • One schema source. The adapters are thin shape-transforms; they pass the same inputSchema object through verbatim. The schema can never drift across frameworks.
  • JSON-safe results. Handlers project decoded on-chain accounts into plain JSON (bigint → decimal string, byte fields → hex / UTF-8), so results serialize cleanly into a model's function-result channel.
  • Read vs prepare, never mutate. There is no signing tool in this package. The most a tool does is build an unsigned instruction.

License

MIT — see LICENSE.