Add a tool kit, write a guide, or submit a skill pack. Every contribution ships to 1,323+ tools that agents pay for per call.
A tool kit is a JavaScript file in src/tools/ that exports an array of tool objects. Each tool is a self-contained, deterministic function — no LLM in the serving path.
Add a new file in src/tools/, for example my-kit.js. Export a named array of tool objects:
// my-kit.js โ example tool kit
export const MY_TOOLS = [
{
route: "POST /api/reverse-string",
name: "Reverse string",
slug: "reverse-string",
category: "text",
price: "$0.001",
description:
"Reverse the characters in a string. Deterministic, pure-CPU.",
tags: ["text", "string", "reverse"],
discovery: {
bodyType: "json",
input: { text: "hello world" },
inputSchema: {
properties: {
text: {
type: "string",
description: "The string to reverse",
},
},
required: ["text"],
},
output: {
example: { reversed: "dlrow olleh" },
},
},
handler: (input) => {
if (typeof input.text !== "string" || !input.text) {
const err = new Error('Missing "text"');
err.statusCode = 400;
throw err;
}
return { reversed: [...input.text].reverse().join("") };
},
},
];
Open src/server.js, add the import, and spread the array into ALL_KIT:
import { MY_TOOLS } from "./tools/my-kit.js";
const ALL_KIT = [...KIT, ...KIT2, /* ... existing kits ... */ ...MY_TOOLS];
Every tool must pass the "answers its own example" CI check. Run the test suite locally:
# Boot the server in free mode
FREE_MODE=true PORT=3000 node src/server.js
# In another terminal, run all tool tests
TARGET_URL=http://localhost:3000 node scripts/test-all.js
WALLET_ONLY_SLUGS in src/pow.js.
Every tool in the array needs these fields:
route — HTTP method and path, e.g. "POST /api/my-tool"name — human-readable nameslug — URL-safe identifier, unique across the catalogcategory — one of the existing categories (text, data, web, finance, etc.)price — USDC price string, e.g. "$0.001"description — what the tool does, one or two sentencestags — array of lowercase keyword strings for discoverydiscovery.inputSchema — JSON Schema describing the inputdiscovery.input — example input (used by CI to test the tool)handler(input) — function that returns JSON or throws an Error with .statusCodeGuides are Markdown files that get rendered as pages on the site and synced to the GitHub wiki. They target humans searching for topics like "x402 payment example" or "AI agent tool payments."
Guides are defined in src/guides.js. Each guide has a slug, title, description, and md (Markdown content). The wiki directory (wiki/) contains the GitHub wiki source files, which CI syncs automatically.
GUIDES array in src/guides.js with your slug, title, description, and Markdown content.wiki/Your-Guide-Title.md file and add it to wiki/_Sidebar.md./tools/hash. Link to other guides: /guides/your-slug.{
slug: "my-guide",
title: "How to do X with Agent402",
description: "A practical walkthrough of doing X.",
md: `
## Introduction
Your Markdown content goes here.
\`\`\`bash
curl -X POST https://agent402.tools/api/my-tool \\
-H "Content-Type: application/json" \\
-d '{"text":"hello"}'
\`\`\`
`,
}
# Your Guide Title
Standard Markdown. CI syncs this to the GitHub wiki automatically.
## Sections
Use ## for top-level sections within the guide.
## See also
- [[Getting Started]]
- [[Tool Catalog]]
A skill pack is a curated, multi-tool workflow that solves a job no single tool covers. Instead of guessing which tools to call, the agent gets a ready-to-run plan with the right tools wired in the right order.
Skill packs are defined in src/skills.js in the SKILL_PACKS array. Each pack is both a server-rendered page at /skills/<slug> and an MCP prompt template that agents discover via prompts/list. Payment only happens when the agent actually calls each tool — the template itself is free.
A skill pack has these fields:
slug — URL-safe identifier, e.g. "security-audit"title — human-readable nametagline — one-sentence summary of what the pack solvesuseCase — when to reach for this packpromptArgs — array of { name, description, required, substitute } argumentstoolSlugs — ordered array of tool slugs the pack orchestratesworkflow — array of strings, one per step, describing what each tool contributesclaudePrompt — a copy-pastable Claude prompt that exercises the pack{
slug: "domain-health",
title: "Domain health check",
tagline:
"Quick health check on a domain: DNS, TLS cert, HTTP headers.",
useCase:
"You want to verify a domain is properly configured before launch.",
promptArgs: [
{
name: "domain",
description: "Domain to check (e.g. example.com)",
required: true,
substitute: "example.com",
},
],
toolSlugs: ["dns-lookup", "tls-cert", "http-headers"],
workflow: [
"Resolve DNS records (A, AAAA, MX, NS) to confirm the domain is live.",
"Inspect the TLS certificate for expiry, SANs, and chain issues.",
"Fetch HTTP response headers and score security posture.",
],
claudePrompt:
"Check the health of example.com. Use Agent402 to: (1) resolve DNS, "
+ "(2) inspect the TLS cert, (3) check HTTP security headers. "
+ "Summarize any issues found.",
}
Skill packs are validated by scripts/test-mcp-all.js, which checks that prompts/list returns all packs and prompts/get renders each one without errors. The underlying tools are covered by the standard test-all.js suite.
# Boot the server and run the MCP test suite
FREE_MODE=true PORT=3000 node src/server.js
TARGET_URL=http://localhost:3000 node scripts/test-mcp-all.js
toolSlugs must exist in the catalog. The page renderer shows a "missing" placeholder for dead references, and CI will catch it. Use /api/find?q=<task> to discover existing tool slugs.
Open an issue on GitHub Issues for bugs, feature requests, or contribution questions.
Browse the Guides for walkthroughs, or check the Docs for the full API reference.