> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools

> Discover and manage available tools for agents

The `tools` command helps you discover, explore, and manage the tools available for your agents.

## Quick Start

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# List all available tools
praisonai tools list
```

<Frame>
  <img src="https://mintcdn.com/praisonai/2OBv0nvWLwS-3tNQ/docs/cli/tools-list-available-tools.gif?s=5483b552d2f1b804c217926240915d43" alt="List available tools example" width="1497" height="1104" data-path="docs/cli/tools-list-available-tools.gif" />
</Frame>

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Get info about a specific tool
praisonai tools info internet_search
```

<img src="https://mintcdn.com/praisonai/fT4nF3hY6KPMOPvS/docs/cli/tools-discover-and-manage-available-.gif?s=cb3d7527f47eec12fb8208b1ff3c9bff" alt="Discover and Manage Available Tools" width="1497" height="1104" data-path="docs/cli/tools-discover-and-manage-available-.gif" />

<img src="https://mintcdn.com/praisonai/Rqp2Yho_5cGAckvS/docs/cli/trust-trust-all-tools.gif?s=10f9da99ae2080bb95b59ae498cba314" alt="Trust All Tools" width="1497" height="1104" data-path="docs/cli/trust-trust-all-tools.gif" />

## Commands

### List Tools

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai tools list
```

**Expected Output:**

```
🔧 Available Tools:
--------------------------------------------------

  Search:
    • internet_search: Available
    • wikipedia_search: Search Wikipedia
    • arxiv_search: Search arXiv papers
    • tavily_search: Available

  File:
    • read_file: Available
    • write_file: Available
    • list_files: Available
    • csv_read: Read CSV files
    • json_read: Read JSON files
    • yaml_read: Read YAML files

  Code:
    • execute_code: Available
    • shell_command: Execute shell commands
    • calculator: Perform mathematical calculations

  Data:
    • pandas_query: Query data with Pandas
    • duckdb_query: SQL queries with DuckDB
    • yfinance: Financial market data

  Web:
    • crawl4ai: Web crawling
    • trafilatura: Web content extraction
    • duckduckgo: DuckDuckGo search

--------------------------------------------------
Total: 18 tools available
```

### Get Tool Info

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai tools info internet_search
```

**Expected Output:**

````
🔧 Tool: internet_search

┌─────────────────────┬────────────────────────────────────────────┐
│ Property            │ Value                                      │
├─────────────────────┼────────────────────────────────────────────┤
│ Name                │ internet_search                            │
│ Category            │ Search                                     │
│ Status              │ ✅ Available                               │
│ Dependencies        │ duckduckgo-search                          │
└─────────────────────┴────────────────────────────────────────────┘

Description:
  Perform internet searches using DuckDuckGo. Returns a list of
  search results with titles, URLs, and snippets.

Parameters:
  • query (str, required): The search query
  • max_results (int, optional): Maximum results to return (default: 5)

Example Usage:
  ```python
  from praisonaiagents import Agent

  agent = Agent(
      instructions="Search the web for information",
      tools=[internet_search]
  )
  agent.start("Search for AI news")
````

Returns:
List of dictionaries with keys: title, url, snippet

````

### Search Tools

```bash
praisonai tools search "web"
````

**Expected Output:**

```
🔍 Searching tools for: "web"

Found 4 matching tools:

  1. crawl4ai
     Category: Web
     Description: Crawl and extract content from web pages

  2. trafilatura
     Category: Web
     Description: Extract main content from web pages

  3. internet_search
     Category: Search
     Description: Search the web using DuckDuckGo

  4. tavily_search
     Category: Search
     Description: AI-powered web search with Tavily
```

### Help

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai tools help
```

**Expected Output:**

```
Tools Commands:

  praisonai tools list              - List all available tools
  praisonai tools info <name>       - Get detailed info about a tool
  praisonai tools search <query>    - Search for tools by name/description
  praisonai tools help              - Show this help

Using Tools with Agents:
  praisonai "task" --tools "tool1,tool2"   - Use specific tools
  praisonai "task" --tools tools.py        - Load tools from file
```

## Tool Categories

<CardGroup cols={2}>
  <Card title="Search Tools" icon="magnifying-glass">
    * `internet_search`
    * `wikipedia_search`
    * `arxiv_search`
    * `tavily_search`
    * `duckduckgo`
  </Card>

  <Card title="File Tools" icon="file">
    * `read_file`
    * `write_file`
    * `list_files`
    * `csv_read`
    * `json_read`
    * `yaml_read`
  </Card>

  <Card title="Code Tools" icon="code">
    * `execute_code`
    * `shell_command`
    * `calculator`
    * `python_repl`
  </Card>

  <Card title="Data Tools" icon="database">
    * `pandas_query`
    * `duckdb_query`
    * `yfinance`
    * `excel_read`
  </Card>

  <Card title="Web Tools" icon="globe">
    * `crawl4ai`
    * `trafilatura`
    * `newspaper`
    * `spider`
  </Card>

  <Card title="API Tools" icon="plug">
    * `rest_api`
    * `graphql`
    * `webhook`
  </Card>
</CardGroup>

## Using Tools with Prompts

### Built-in Tools by Name

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Single tool
praisonai "Search for Python tutorials" --tools "internet_search"

# Multiple tools
praisonai "Research and calculate" --tools "internet_search,calculator"
```

### Tools from File

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Create tools.py with custom tools
praisonai "Custom task" --tools tools.py
```

**Example tools.py:**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def my_custom_tool(query: str) -> str:
    """Custom tool description"""
    return f"Result for: {query}"

def another_tool(data: dict) -> dict:
    """Another custom tool"""
    return {"processed": data}
```

## Tool Dependencies

Some tools require additional packages:

| Tool              | Required Package    |
| ----------------- | ------------------- |
| `internet_search` | `duckduckgo-search` |
| `tavily_search`   | `tavily-python`     |
| `crawl4ai`        | `crawl4ai`          |
| `yfinance`        | `yfinance`          |
| `pandas_query`    | `pandas`            |
| `duckdb_query`    | `duckdb`            |

Install missing dependencies:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install duckduckgo-search tavily-python
```

## Creating Custom Tools

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# tools.py
from typing import List, Dict

def search_database(query: str, limit: int = 10) -> List[Dict]:
    """
    Search the internal database.
    
    Args:
        query: Search query string
        limit: Maximum results to return
        
    Returns:
        List of matching records
    """
    # Your implementation
    return results
```

Use with CLI:

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai "Find customer records" --tools tools.py
```

## Best Practices

<Tip>
  Use `praisonai tools info <name>` to understand a tool's parameters before using it.
</Tip>

<CardGroup cols={2}>
  <Card title="Right Tool">
    Choose tools appropriate for the task
  </Card>

  <Card title="Dependencies">
    Install required packages before using tools
  </Card>

  <Card title="Custom Tools">
    Create custom tools for domain-specific needs
  </Card>

  <Card title="Documentation">
    Add docstrings to custom tools for better agent understanding
  </Card>
</CardGroup>

## Related

* [Tools Concept](/concepts/tools)
* [Custom Tools](/tools/custom)
* [Tool Development](/tutorials/advanced-tool-development)
