agenticx-tool-creatorlisted
Install: claude install-skill opencue/claude-code-skills
# AgenticX Tool Creator
Guide for building tools that extend agent capabilities.
## Tool Architecture
AgenticX tools inherit from `BaseTool` and are consumed by agents during execution. Three approaches exist:
1. **Function decorator** (`@tool`) — fastest for simple tools
2. **Class-based** (extend `BaseTool`) — for complex or stateful tools
3. **MCP remote tools** — for external services via Model Context Protocol
## Function Decorator Tools
```python
from agenticx.tools import tool
@tool
def search_web(query: str) -> str:
"""Search the web for information.
Args:
query: The search query string.
Returns:
Search results as text.
"""
# implementation
return f"Results for: {query}"
@tool
def read_file(path: str) -> str:
"""Read contents of a local file."""
with open(path) as f:
return f.read()
```
The `@tool` decorator reads the function signature and docstring to generate the tool schema automatically. The docstring **is** the tool description the LLM sees.
## Class-Based Tools
For tools needing initialization, state, or complex logic:
```python
from agenticx.core import BaseTool
class DatabaseQuery(BaseTool):
name = "database_query"
description = "Query the project database."
def __init__(self, connection_string: str):
super().__init__()
self.conn = connect(connection_string)
def _run(self, sql: str) -> str:
return self.conn.execute(sql).fetchall()
```
## Tool Regi