tpmjs-tool-creator
Development guide for creating and publishing TPMJS tools using the blocks CLI, AI SDK v6, and npm registry patterns.
Introduction
The TPMJS tool creator provides a standardized, high-performance workflow for developers building production-ready tools for the TPMJS registry. Designed for agentic architectures, this skill guides you through the entire lifecycle of an AI SDK v6 tool, from initial definition in blocks.yml to final deployment via npm. It ensures that every tool is discoverable, type-safe, and ready for use by LLM-powered agents.
-
Streamlined workflow for defining tools in packages/tools/official/blocks.yml with structured metadata.
-
Adherence to strict AI SDK v6 patterns, including jsonSchema validation, specific export signatures, and try-catch error handling.
-
Integrated validation suite using the blocks CLI, allowing developers to test tool execution, schema compliance, and domain rules against LLM-based verification.
-
Native support for building and publishing npm packages with the required tpmjs keyword for automatic indexing on tpmjs.com.
-
Best practices for multi-tool packaging, project directory structure (tsup, tsconfig, package.json), and robust input/output interfaces.
-
Ensure all tools provide a clear, LLM-friendly description and valid jsonSchema with additionalProperties set to false.
-
Utilize the blocks CLI with a valid OpenAI API key to execute tools and verify they meet the system's operational standards before publishing.
-
Always implement the tool as an npm package following the @tpmjs/official-toolname naming convention.
-
Use the provided project templates for package.json, tsup.config.ts, and index.ts to ensure compatibility with the TPMJS executor.
-
When creating multi-tool packages, follow the specified root-level block.ts and index.ts patterns to expose multiple functionalities cleanly.
-
Keep your tool implementation single-shot, ensuring one call results in one structured output for maximum reliability within an agent's reasoning loop.
Repository Stats
- Stars
- 24
- Forks
- 6
- Open Issues
- 3
- Language
- TypeScript
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 04:27 PM