# Create Atomic Tool

Build a `BaseTool[InSchema, OutSchema]` subclass, input/output schemas...

- Repository: https://github.com/Eigenwise/atomic-agents (6314 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Eigenwise/atomic-agents --skill create-atomic-tool -g -a claude-code -y`
Codex: `npx skills add Eigenwise/atomic-agents --skill create-atomic-tool -g -a codex -y`
Cursor: `npx skills add Eigenwise/atomic-agents --skill create-atomic-tool -g -a cursor -y`
Gemini CLI: `npx skills add Eigenwise/atomic-agents --skill create-atomic-tool -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Eigenwise/atomic-agents`

## Description

Build a `BaseTool[InSchema, OutSchema]` subclass, input/output schemas, `BaseToolConfig`, `run()` (and optional `run_async()`), env-driven secrets, typed failure outputs. Use when the user asks to "add a tool", "create a tool", "wrap an API as a tool", "build a `BaseTool`", "make a calculator/search/weather tool", or runs `/atomic-agents:create-atomic-tool`.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Create an Atomic Agents Tool

A tool is a deterministic capability an agent can invoke. In Atomic Agents, every tool is a `BaseTool[InSchema, OutSchema]` subclass with a typed `run()` (and optional `run_async()`). The input/output schemas double as the tool's signature for the LLM and as Pydantic validation at runtime.

For deep material (MCP interop, distributing as a standalone package, advanced error patterns), the authority is `../framework/references/tools.md`. This skill is the action-oriented path: clarify → write → verify.

## When this fires vs the umbrella `framework` skill

- **This skill**: the user is creating a specific tool, wrapping an API, building a calculator, scraping a page, querying a DB.
- **`framework` skill**: questions about Atomic Agents in general, or the user is doing something other than authoring a tool.

## Phase 1, Clarify

Bundle into one message:

1. **What does the tool do?** One sentence. This becomes the class docstring and feeds the LLM's tool description.
2. **Inputs and outputs.** Names, types, units. If unclear, propose a schema pair and confirm.
3. **External dependencies.** HTTP API? DB? Local computation only? If HTTP, what auth (API key env var, OAuth, none)?
4. **Sync, async, or both?** If the rest of the project is async or the call is I/O bound, plan a `run_async()` alongside `run()`.
5. **Failure modes.** Rate limits, not-found, network errors, how should the agent see them? Default: typed failure output, not raised exceptions.

Skip any question already answered in context.

## Phase 2, Plan

Confirm the location and shape in one short block, then proceed:

The rest: https://github.com/Eigenwise/atomic-agents/blob/HEAD/claude-plugin/atomic-agents/skills/create-atomic-tool/SKILL.md
