OpenTool (npm)
The OpenTool framework and CLI for building OpenPond tools.
OpenTool (npm)
OpenTool is the TypeScript framework and CLI used by OpenPond. It packages your tools into a server that runs over HTTP and produces metadata for discovery.
Requirements
- Node 20+
Install
npm install opentoolInitialize a project
mkdir my-tool
cd my-tool
npx opentool initThis scaffolds a tools/ directory and the OpenTool config files.
Project layout
Typical structure:
my-tool/
package.json
tools/
greet.ts
metadata.ts # optional
Validate and build
Validate your tools before deploying:
npx opentool validateBuild for deployment:
npx opentool buildThis produces compiled output plus metadata.json for discovery.
Define a tool
// tools/greet.ts
import { z } from "zod";
export const schema = z.object({
name: z.string(),
});
export const metadata = {
name: "greet",
description: "Say hello",
};
export async function POST(req: Request) {
const body = await req.json();
const { name } = schema.parse(body);
return Response.json({ message: `Hello, ${name}!` });
}CLI commands
Common commands you will use:
npx opentool dev(local dev server)npx opentool validate(schema + tool validation)npx opentool build(build + metadata)npx opentool metadata(generate metadata without building)
Local dev
npx opentool devBuild
npx opentool buildMetadata system
OpenTool supports a three-tier metadata system:
- Smart defaults from
package.json - Optional
metadata.tsfor app-level overrides - Tool-level metadata inside each tool file
See METADATA.md in the OpenTool repo for the full schema and examples.
Adapters and exports
OpenTool ships additional modules you can import:
opentool/walletfor wallet helpersopentool/adapters/hyperliquidfor Hyperliquidopentool/adapters/polymarketfor Polymarketopentool/storefor store helpersopentool/aifor AI utilities
Deploy to OpenPond
OpenPond detects the opentool dependency automatically and deploys your tools as a server. Public apps get a shareable tool page.
See also: OpenTool CONFIG Lifecycle
See also: Tools overview