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

# Tools Overview

> Extend your agents with powerful tools and capabilities

## What Are Tools in Junis?

Tools are **specialized functions** that agents can call to perform specific actions or access external data. They extend your agent's capabilities beyond text generation, enabling real-world interactions.

Think of tools as **skills** your agents can learn:

* 🔍 **Search tools**: Find information from web, databases, or documents
* 📄 **Document tools**: Process PDF, Excel, Word, PowerPoint files
* 🔌 **External connectors**: MCP, Composio OAuth (200+ apps), GitHub, Firecrawl
* 🧠 **RAG tools**: Search and create knowledge base documents with AI-powered retrieval
* 💾 **Memory tools**: Read and update persistent user memory across conversations
* ✨ **Soul tools**: Read and update organization AI personality
* 📚 **Wiki tools**: Read and grow your organization's shared knowledge base (second brain)
* 🤝 **Squad tools**: Discover and message other squads you have access to
* 🖥️ **Code execution**: Run code in an isolated cloud sandbox or on your own connected device

<Info>
  **Agent Intelligence**: Agents automatically decide when and how to use tools based on user requests. You don't need to manually trigger them.
</Info>

***

## Tool Types

Junis supports four types of tools, each designed for specific use cases:

<CardGroup cols={2}>
  <Card title="Regular Tools" icon="wrench">
    **Python Functions**

    Custom async functions you build for your specific needs.

    *Examples*: Search databases, call APIs, process data
  </Card>

  <Card title="Claude Skills" icon="sparkles">
    **Official Anthropic Tools**

    Prebuilt document processors powered by Claude.

    *Examples*: PDF extraction, Excel analysis, PPTX creation
  </Card>

  <Card title="External Connectors" icon="plug">
    **Third-Party Integrations**

    Connect to external systems and services.

    *Examples*: Salesforce, DataLab, GitHub, Firecrawl (via MCP)
  </Card>

  <Card title="RAG Tools" icon="book-open">
    **Document Retrieval**

    Auto-generated search tools for uploaded documents.

    *Examples*: Company policies, employee handbooks, product specs
  </Card>
</CardGroup>

***

## How Agents Use Tools

### 🤖 Automatic Tool Selection

Agents use tools intelligently based on:

1. **User Request**: What the user is asking for
2. **Tool Descriptions**: What each tool can do (from docstrings)
3. **Conversation Context**: Previous messages and results

**Example Workflow**:

```
User: "Find the latest news about artificial intelligence"
  ↓
Agent thinks:
  - User wants to search the web for current information
  - I have a tool called "google_search"
  - Its description says it searches the web for real-time information
  - I should use this tool with query="latest artificial intelligence news"
  ↓
Agent calls: google_search("latest artificial intelligence news")
  ↓
Tool returns: {
  "results": [
    {
      "title": "AI Breakthrough in 2026",
      "url": "https://example.com/ai-news",
      "snippet": "Recent developments in AI technology..."
    }
  ]
}
  ↓
Agent responds: "I found recent AI news. Here are the latest developments: AI Breakthrough in 2026..."
```

<Check>
  **No Manual Intervention**: Once tools are configured, agents use them automatically without user or admin prompting.
</Check>

### 📊 Tool Execution Flow

```mermaid theme={null}
sequenceDiagram
    participant User
    participant Agent
    participant Tool Registry
    participant External System

    User->>Agent: "Analyze this PDF document"
    Agent->>Tool Registry: Check available tools
    Tool Registry-->>Agent: claude_pdf_processor
    Agent->>Tool: claude_pdf_processor(file_url, instruction)
    Tool->>External System: Claude Skills API
    External System-->>Tool: Extracted text + analysis
    Tool-->>Agent: Result object
    Agent-->>User: "The document contains 15 pages and discusses..."
```

***

## Available Built-in Tools

Junis provides a comprehensive set of prebuilt tools ready to use:

### Document Processing (Claude Skills)

<Tabs>
  <Tab title="PDF">
    **`claude_pdf_processor`**

    * Extract text from PDFs
    * Extract tables and data
    * Create new PDFs
    * Merge multiple PDFs
    * Convert to images

    *Use Case*: "Extract all customer information from this invoice PDF"
  </Tab>

  <Tab title="Excel">
    **`claude_xlsx_processor`**

    * Analyze spreadsheets
    * Extract specific columns/rows
    * Generate charts
    * Perform calculations
    * Export filtered data

    *Use Case*: "Calculate total revenue from this sales spreadsheet"
  </Tab>

  <Tab title="PowerPoint">
    **`claude_pptx_creator`**

    * Create presentations
    * Add slides with content
    * Insert images and charts
    * Apply templates
    * Export to PDF

    *Use Case*: "Create a 5-slide presentation about our Q4 results"
  </Tab>

  <Tab title="Word">
    **`claude_docx_processor`**

    * Extract text from Word docs
    * Create new documents
    * Track changes
    * Manage comments
    * Convert to other formats

    *Use Case*: "Extract all action items from this meeting notes document"
  </Tab>
</Tabs>

### Search Tools

<Card title="Web Search" icon="globe">
  **`google_search`**

  Search the web for real-time information using Google.

  **Parameters**:

  * `query` (str): Search query

  **Returns**: Search results with titles, URLs, and snippets

  **Use Case**: "Find the latest AI news" or "Search for Python tutorials"
</Card>

### Built-in Web Search (LLM Feature)

<Info>
  **NEW**: Agents can now perform web searches automatically during response generation without explicitly calling a tool.
</Info>

**Enable Web Search** in Admin > Agents > Edit Agent:

```yaml theme={null}
Agent Configuration:
  Enable Web Search: ✅ ON
```

**How It Works**:

* When enabled, the LLM can automatically search the web during response generation
* No explicit tool call required - the model decides when to search
* Uses LiteLLM's `web_search_options` with `search_context_size: "medium"`

**Difference from google\_search Tool**:

| Feature           | Built-in Web Search       | google\_search Tool  |
| ----------------- | ------------------------- | -------------------- |
| **Activation**    | Automatic (LLM decides)   | Explicit tool call   |
| **Configuration** | Toggle in Agent settings  | Assign tool to agent |
| **Best For**      | General knowledge queries | Targeted searches    |

<Tip>
  **When to Use**: Enable for agents that need to answer questions about current events, recent news, or real-time information without explicit search requests.
</Tip>

### Memory & Soul Tools (Auto-Injected)

<Info>
  **Automatic**: These tools are automatically available to all orchestrator agents. No configuration needed.
</Info>

<Tabs>
  <Tab title="User Memory">
    **`update_user_memory(action, content)`**

    Read or update the user's persistent profile (name, role, preferences).

    **Actions**:

    * `read`: View the user's current profile
    * `update`: Save updated profile content

    *Use Case*: Agent learns user's name, role, or communication preferences during conversation
  </Tab>

  <Tab title="Eternal Memory">
    **`save_to_eternal_memory(action, content)`**

    Store permanent facts and standing instructions that persist across all conversations.

    **Actions**:

    * `read`: View stored eternal memories
    * `add`: Append a new memory entry
    * `update`: Replace all eternal memory content

    *Use Case*: User says "remember that I always want bullet points" or "don't forget my deadline is Friday"
  </Tab>

  <Tab title="Soul">
    **`update_soul(action, content)`**

    Read or update the organization's AI thinking philosophy (Admin/Owner only).

    *Use Case*: Admin asks "update our AI to prioritize data-driven decisions"
  </Tab>

  <Tab title="Identity">
    **`update_identity(action, content)`**

    Read or update the organization's AI communication style (Admin/Owner only).

    *Use Case*: Admin asks "make our AI more casual and friendly"
  </Tab>
</Tabs>

<Tip>
  Learn more about these systems: [Memory System](/guides/memory-system) | [Soul & Identity](/guides/soul-identity)
</Tip>

### Organization Wiki Tools (Auto-Injected)

<Info>
  **Automatic**: Wiki tools are available to all orchestrator agents with no configuration. Every member's agent can read and grow the organization's shared knowledge base.
</Info>

| Tool          | What It Does                                                                                                                                     |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `wiki_list`   | Reads the wiki index — every document with its one-line summary. Agents check this before answering to see if your team already knows the answer |
| `wiki_read`   | Reads one document's full content                                                                                                                |
| `wiki_create` | Saves new knowledge as a document ("save this to the wiki")                                                                                      |
| `wiki_update` | Replaces a document's content entirely                                                                                                           |
| `wiki_edit`   | Makes a precise partial edit without touching the rest                                                                                           |
| `wiki_append` | Adds entries to an existing document over time (FAQ items, meeting notes)                                                                        |

<Note>
  There is **no delete tool** by design — documents can only be deleted by admins in **Team → Wiki**. See the [Organization Wiki guide](/guides/wiki-second-brain) for details.
</Note>

### Squad Collaboration Tools (Auto-Injected)

<Info>
  **Automatic**: Every orchestrator can discover and message other squads you have access to.
</Info>

| Tool                 | What It Does                                                                                  |
| -------------------- | --------------------------------------------------------------------------------------------- |
| `squad_list`         | Lists the squads you can reach — your active memberships plus public squads                   |
| `call_another_squad` | Sends a message to another squad's orchestrator and returns its answer into your current chat |

See [Squad Collaboration](/guides/orchestration/squad-collaboration) for access rules, billing, and chain limits.

### Code Execution (Cloud Sandbox & Your Device)

Agents can run code and shell commands in two very different places:

<CardGroup cols={2}>
  <Card title="Cloud Sandbox" icon="cloud">
    Code-execution **Skills** run in an isolated cloud sandbox — no access to your computer, isolated per organization and session. Output streams into the chat in real time.
  </Card>

  <Card title="Your Connected Device" icon="laptop">
    With the [Desktop Agent (`npx junis`)](/guides/npx-junis), agents can work directly on **your own computer** — files, shell commands, browser automation — with live output in chat.
  </Card>
</CardGroup>

<Tip>
  Rule of thumb: use the cloud sandbox for safe, disposable code runs; connect a device when the work needs **your** files and apps.
</Tip>

### RAG Document Upload (Agent Tool — Requires Configuration)

**`upload_rag_document(datastore_name, file_name, content, description?)`**

Agents can **generate and store their own knowledge base documents** as Markdown files. This is unique to Junis — your AI agents can research, synthesize, and save information for future retrieval.

<Warning>
  **Configuration Required**: Unlike memory and soul tools (which are auto-injected), `upload_rag_document` must be explicitly assigned to an agent via **Admin > Agents > Edit Agent > Tools**.
</Warning>

**How it works**:

1. Agent generates content (e.g., research summary, analysis report)
2. Agent calls `upload_rag_document` with the content as Markdown
3. A `.md` file is created, uploaded to a RAG DataStore, and indexed
4. Future conversations can search and retrieve this knowledge

**Use Case**: "Research the latest AI trends and save a summary to our knowledge base"

```
Agent:
1. Searches the web for AI trends
2. Synthesizes findings into a structured document
3. Calls upload_rag_document(
     datastore_name="Research Library",
     file_name="ai-trends-q1-2026",
     content="# AI Trends Q1 2026\n\n## Key Developments..."
   )
4. Document is indexed and searchable by all agents
```

<Note>
  **DataStore Auto-Creation**: If the specified DataStore doesn't exist, the tool creates it automatically. The file extension `.md` is auto-appended if not provided.
</Note>

### Payment Tools (AP2/x402 Protocol)

<Warning>
  **Premium Feature**: Payment tools enable USDC-based agent usage fees with 80/20 revenue split (Agent Owner 80%, Platform 20%).
</Warning>

<Tabs>
  <Tab title="require_payment">
    **`require_payment(agent_id, network?)`**

    Request payment before agent execution.

    **When to Use**:

    * Premium agents that charge per use
    * Computationally expensive operations
    * Third-party API costs

    **Returns**:

    * Payment requirements (amount, wallet, network)
    * EIP-3009 nonce for signature
    * 80/20 split details
  </Tab>

  <Tab title="verify_payment">
    **`verify_payment(nonce, payment_type)`**

    Verify EIP-3009 payment signatures.

    **Payment Types**:

    * `agent_owner`: 80% to agent owner
    * `platform_fee`: 20% to platform

    **Auto-Settlement**: When both payments verified, automatically settles on-chain.
  </Tab>
</Tabs>

***

## When to Use Tools

### ✅ Use Tools When You Need To:

* **Access External Data**: Databases, APIs, file storage
* **Perform Complex Operations**: File processing, calculations, analysis
* **Integrate Third-Party Services**: Salesforce, GitHub, Firecrawl
* **Retrieve Uploaded Documents**: RAG search through company docs

### ❌ Don't Build Tools For:

* **Simple Text Generation**: Agents already excel at this
* **One-Time Tasks**: Better to do manually
* **Highly Variable Logic**: Better in agent instructions
* **Duplicate Functionality**: Use existing tools or MCP platforms

***

## Getting Started with Tools

### Step 1: Choose Your Approach

<Tabs>
  <Tab title="Use Built-in Tools">
    **Fastest**: Junis provides 15+ prebuilt tools.

    1. Go to **Admin > Agents**
    2. Edit your agent
    3. Select tools from the Tools section
    4. Save

    Done! Your agent can now use those tools.
  </Tab>

  <Tab title="Connect MCP Platforms">
    **Recommended**: Use Model Context Protocol for external services.

    1. Go to **Team > MCP**
    2. Connect platforms (GitHub, Firecrawl, etc.)
    3. Assign to agents

    See [MCP Integration Guide](/guides/mcp/overview) for details.
  </Tab>

  <Tab title="Build Custom Tools">
    **For Advanced Use Cases**: Junis supports custom tool development for specialized business logic that isn't covered by built-in tools.

    **Process**:

    1. **Contact Junis Support** at [contact@junis.ai](mailto:contact@junis.ai)
    2. Describe your use case and requirements
    3. Our team will develop and register the custom tool
    4. You assign it to your agents via Admin UI

    **Note**: Most users don't need custom tools - the built-in library covers common use cases.
  </Tab>

  <Tab title="Upload Documents (RAG)">
    **For Knowledge Bases**: Upload PDFs, docs, etc.

    1. Go to **Team > RAG Knowledge**
    2. Create or select DataStore
    3. Upload files
    4. Assign RAG tool to agent

    See [RAG Guide](/guides/tools/rag) for details.
  </Tab>
</Tabs>

### Step 2: Configure Agent Tools

**Admin Dashboard** → **Agents** → **Edit Agent**

```yaml theme={null}
Agent Configuration:
  Name: Customer Support Agent
  Type: LLM_AGENT
  Tools:
    Regular Tools:
      - claude_pdf_processor
      - google_search
    RAG Tools:
      - rag_company-policies_1234567890
  MCP Platforms:
    - GitHub (for repository management)
    - Firecrawl (for web scraping)
```

### Step 3: Test with Chat

```
You: "Search for recent AI trends and create a GitHub issue to track them"

Agent:
1. Uses google_search("recent AI trends 2026")
2. Formats the results
3. Uses GitHub MCP to create issue

Response: "I found the latest AI trends and created a tracking issue in your repository."
```

***

## Tool Best Practices

<Check>
  **✅ DO**:

  * Choose specific tools for specific tasks
  * Write clear tool descriptions (docstrings)
  * Test tools individually before assigning to agents
  * Monitor tool usage in logs
  * Handle errors gracefully
  * Use RAG for frequently accessed documents
</Check>

<Warning>
  **❌ DON'T**:

  * Add too many tools (max 10 per agent recommended)
  * Use tools with unclear purposes
  * Forget to update tool descriptions
  * Ignore tool errors in production
  * Hard-code sensitive data in tools
</Warning>

***

## Real-World Examples

### 1. Customer Support Agent

**Tools**:

* `claude_pdf_processor`: Extract info from uploaded docs
* GitHub MCP: Create support tickets as issues
* `rag_faq_documents`: Search company FAQ

**User**: "A customer asked about our return policy"

**Agent Flow**:

1. Search `rag_faq_documents` for "return policy"
2. Extract relevant sections
3. Format a friendly response
4. Optionally create GitHub issue for tracking

### 2. Data Analysis Agent

**Tools**:

* `claude_xlsx_processor`: Analyze Excel files
* `google_search`: Find market trends and research
* `claude_pptx_creator`: Generate presentation

**User**: "Analyze Q4 sales and create a presentation"

**Agent Flow**:

1. Use `claude_xlsx_processor` to analyze sales spreadsheet
2. Use `google_search` for market research and context
3. Use `claude_pptx_creator` to generate slides

### 3. Premium Agent with Payments

**Tools**:

* `require_payment`: Gate agent access with USDC payment
* `claude_pdf_processor`: Document processing
* `google_search`: Research capabilities

**User**: "Run premium analysis workflow"

**Agent Flow**:

1. Call `require_payment(agent_id="premium_agent")`
2. Wait for user payment (MetaMask)
3. Verify payment signatures
4. Proceed with premium analysis using available tools

***

## Tool Categories Reference

| Category                | Tools                                                                                           | Primary Use                             |
| ----------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------- |
| **Document Processing** | claude\_pdf\_processor, claude\_xlsx\_processor, claude\_pptx\_creator, claude\_docx\_processor | File analysis, creation, extraction     |
| **Web Search**          | google\_search, built-in web search                                                             | Real-time web information retrieval     |
| **Memory**              | update\_user\_memory, save\_to\_eternal\_memory                                                 | Persistent user memory management       |
| **Soul & Identity**     | update\_soul, update\_identity                                                                  | Organization AI personality             |
| **Organization Wiki**   | wiki\_list, wiki\_read, wiki\_create, wiki\_update, wiki\_edit, wiki\_append                    | Shared team knowledge (second brain)    |
| **Squad Collaboration** | squad\_list, call\_another\_squad                                                               | Cross-squad questions and workflows     |
| **Code Execution**      | code-execution skills (cloud sandbox), Desktop Agent tools                                      | Run code in the cloud or on your device |
| **RAG Search**          | rag\_{datastore_id} (auto-generated)                                                            | Document knowledge retrieval            |
| **RAG Upload**          | upload\_rag\_document                                                                           | Agent-generated knowledge creation      |
| **Payment**             | require\_payment, verify\_payment                                                               | Premium agent gating                    |
| **External**            | MCP platforms, Composio OAuth                                                                   | Third-party service integration         |

***

## Performance Considerations

### ⚡ Tool Execution Speed

| Tool Type          | Typical Latency | Notes                                |
| ------------------ | --------------- | ------------------------------------ |
| **Database Query** | 100-500ms       | Depends on query complexity          |
| **External API**   | 1-5 seconds     | Network dependent                    |
| **Claude Skills**  | 2-10 seconds    | File processing time                 |
| **RAG Search**     | 1-3 seconds     | Vertex AI Search latency             |
| **Payment**        | 5-30 seconds    | User signature + on-chain settlement |

<Info>
  **Optimization Tip**: Group multiple simple queries into batch tools rather than making agents call tools repeatedly.
</Info>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Agent not using available tools" icon="triangle-exclamation">
    **Symptom**: Tool is configured but agent doesn't call it

    **Possible Causes**:

    * Tool description (docstring) unclear
    * Agent instruction doesn't mention tool usage
    * Tool name not intuitive

    **Solution**:

    1. Review tool docstring for clarity
    2. Add tool usage examples to agent instruction
    3. Test with explicit request: "Use \[tool\_name] to..."
  </Accordion>

  <Accordion title="Tool execution fails silently" icon="circle-xmark">
    **Symptom**: Tool called but no result returned

    **Possible Causes**:

    * Tool has unhandled exception
    * Missing required parameters
    * External service down

    **Solution**:

    1. Check agent session logs for errors
    2. Test tool directly via API
    3. Verify all environment variables set
    4. Check external service status
  </Accordion>

  <Accordion title="RAG tool returns no results" icon="magnifying-glass">
    **Symptom**: RAG search completes but finds nothing

    **Possible Causes**:

    * Documents not indexed yet (still processing)
    * Search query too specific
    * DataStore not created properly

    **Solution**:

    1. Go to **Team > RAG Knowledge** and check indexing status
    2. Wait for "COMPLETED" status (can take 5-60 minutes)
    3. Try broader search terms
    4. Re-upload documents if status is "FAILED"
  </Accordion>

  <Accordion title="Payment tool timeout" icon="clock">
    **Symptom**: require\_payment call takes too long

    **Possible Causes**:

    * Network congestion (Base blockchain)
    * CDP Facilitator API slow
    * User hasn't signed MetaMask prompt

    **Solution**:

    * Payment tools have 30-second timeout
    * Check Base network status: [https://status.base.org](https://status.base.org)
    * Ensure user completes MetaMask signature promptly
    * For testnet, use Base Sepolia (faster, free)
  </Accordion>
</AccordionGroup>

***

## What's Next?

<CardGroup cols={2}>
  <Card title="Memory System" icon="brain" href="/guides/memory-system">
    Persistent AI memory across conversations
  </Card>

  <Card title="Soul & Identity" icon="sparkles" href="/guides/soul-identity">
    Define your AI team's personality
  </Card>

  <Card title="RAG Setup" icon="database" href="/guides/tools/rag">
    Upload documents and create knowledge bases
  </Card>

  <Card title="MCP Platforms" icon="plug" href="/guides/mcp/overview">
    Connect external services via MCP and Composio
  </Card>
</CardGroup>

***

## Additional Resources

* **Claude Skills**: [https://docs.anthropic.com/en/docs/build-with-claude/tool-use](https://docs.anthropic.com/en/docs/build-with-claude/tool-use) - Official Anthropic documentation on tool use

<Note>
  **Need Help?** Contact us at [contact@junis.ai](mailto:contact@junis.ai) for assistance with tool development and custom implementations.
</Note>
