Skip to main content
The ReedAI Assistant Tool Library provides a collection of specialized AI-powered tools that extend the capabilities of the assistant. These tools allow the AI to perform specific tasks like web searches, code analysis, and file operations.

Tool Architecture

Each tool in the library is built on a consistent architecture:

BaseTool

The BaseTool class is the foundation of the tool library. Every tool extends this class, ensuring a consistent interface and behavior. The key components of a tool include:
  • ID: Unique identifier for the tool
  • Name: Human-readable name
  • Description: Purpose and functionality overview
  • Category: Tool classification for organization
  • Icon: Visual representation
  • Run Instructions: Guidance for how to use the tool
  • Definition: JSON Schema definition of tool parameters and outputs
  • Execute Function: Implementation of the tool functionality

ToolRegistry

The ToolRegistry manages the collection of available tools, providing:
  • Tool registration and organization
  • Category-based filtering
  • Tool search capabilities
  • Execution management
  • Event system for monitoring tool usage

Tool Categories

ReedAI Assistant organizes tools into the following categories with distinctive color coding:
CategoryDescriptionColor
ImagesImage generation and analysisFuchsia
WebInternet search and scrapingGreen
KnowledgeInformation retrieval and analysisYellow
DataData visualization and analysisIndigo
CodeCode analysis and generationViolet
FilesFile operations and managementRed
AnalysisText and data analysisBlue
Context7Documentation accessSky Blue
FirecrawlAdvanced web scrapingOrange
BinanceCryptocurrency dataYellow
GmailEmail managementRed
GitHubRepository managementBlack
RedditReddit interactionOrange
Sequential ThinkingStep-by-step reasoningCyan
Google DriveDocument managementBlue
SlackWorkspace communicationPurple

Available Tools

Web Tools

Web Search

Search the web for real-time information using the Serper API

Places Search

Search for locations and places using Google Maps integration

Web Scraper

Extract content from websites using Firecrawl

Site Crawler

Crawl websites to extract structured data and information

Web Documentation

Fetch and process documentation from websites

Deep Research

Perform comprehensive research across multiple sources

Image Tools

DALL-E

Generate images using OpenAI’s DALL-E model

Midjourney

Generate high-quality images using Midjourney

Stable Diffusion

Generate images using Stable Diffusion models

Venice

Generate uncensored images using Venice Diffusion

NewReality

Generate NSFW images with NewReality models

Image Analysis

Analyze and describe image contents using AI vision

Data Tools

Chart Generation

Create visual charts and graphs from data

CSV Generation

Generate structured CSV data files

PDF Generation

Create PDF documents with formatted content

Code Tools

Code Interpreter

Execute code snippets and interpret results

File Analysis

Analyze code files for structure and patterns

Context7 Documentation

Resolve Library ID

Find the correct library identifier for documentation

Get Library Docs

Retrieve up-to-date documentation for libraries and frameworks

Firecrawl Tools

Scrape

Extract content from specific web pages

Map

Create site maps of web content structure

Crawl

Traverse websites to collect information

Search

Perform targeted searches within websites

Deep Research

Conduct comprehensive research across multiple sites

Binance Tools

Get Price

Retrieve current price for cryptocurrency pairs

Get Order Book

Access current order book data for trading pairs

Get Recent Trades

View recent trading activity

Get Klines

Retrieve candlestick chart data for technical analysis

Get 24hr Ticker

Get 24-hour market statistics

Gmail Tools

Send Email

Compose and send emails

Draft Email

Create email drafts without sending

Search Emails

Find emails based on queries

Read Email

View email content and metadata

Modify Email

Update email properties

Delete Email

Remove emails

Manage Labels

Create, update, or delete email labels

Batch Operations

Perform actions on multiple emails at once

GitHub Tools

Search Repositories

Find repositories matching specific criteria

Repository Management

Get repository information and manage settings

Branch Management

List and manage repository branches

File Operations

Get, create, or update repository files

Issue Management

List, create, and update issues

Pull Request Management

List, create, and merge pull requests

Comments

Manage comments on issues and pull requests

User Management

Get user information and manage collaborators

Slack Tools

List Channels

View available Slack channels

Post Message

Send messages to channels

Reply to Thread

Reply to message threads

Add Reaction

React to messages with emojis

Get Channel History

View message history in channels

Get Thread Replies

View replies in a message thread

Get Users

List users in the workspace

Get User Profile

View detailed user information

Reddit Tools

Get Frontpage Posts

Retrieve trending posts from Reddit’s frontpage

Get Subreddit Info

Get information about specific subreddits

Browse Subreddit Posts

Access hot, new, top, and rising posts in subreddits

Get Post Content

View detailed post content

Get Post Comments

View comments on Reddit posts

Google Drive Tools

List Resources

View files and folders in Google Drive

Read Resource

Access content of Google Drive files

Search

Find files and folders by name or content

List Folders

View folder structure in Google Drive

File Info

Get detailed metadata about Drive files

Sequential Thinking

Sequential Thinking

Perform step-by-step reasoning for complex problems

File Tools

File Search

Search for files by name or content

File Analysis

Analyze file content and structure

Using Tools

Tools can be invoked by the AI assistant during conversations when needed. For example:
When the user asks a question about current events, the assistant can automatically use the Web Search tool to find the most up-to-date information.

Tool Execution Flow

  1. The AI determines a tool is needed based on the conversation
  2. The appropriate tool is selected from the registry
  3. Required parameters are gathered from the context or user input
  4. The tool is executed with appropriate rate limiting
  5. Results are processed and incorporated into the assistant’s response

Creating Custom Tools

Custom tools can be added to extend the assistant’s capabilities. Each tool follows a standard pattern:
import { BaseTool } from "../base/BaseTool.js";

// Implement the tool's functionality
export const myToolFunction = async (params) => {
  // Tool implementation
  // ...

  return {
    status: "success",
    result: {
      data: {
        /* result data */
      },
      metadata: {
        /* metadata */
      },
    },
  };
};

// Create the tool instance
export const myTool = new BaseTool({
  id: "tool_id",
  name: "Tool Name",
  description: "Tool description",
  type: "function",
  category: "category",
  icon: "icon-name",
  options: {
    rateLimit: { maxRequests: 10, perMinute: true },
  },
  runInstructions: "How to use this tool",

  definition: {
    type: "function",
    function: {
      name: "function_name",
      description: "Function description",
      parameters: {
        type: "object",
        properties: {
          // Parameter definitions
        },
        required: ["required_params"],
      },
    },
  },

  execute: myToolFunction,
});

export default myTool;

Best Practices

When working with tools:
  1. Tool Selection: Choose the most appropriate tool for the specific task
  2. Parameter Validation: Always validate inputs before execution
  3. Error Handling: Implement robust error handling for failure cases
  4. Rate Limiting: Respect API rate limits to avoid service disruptions
  5. Result Formatting: Structure results consistently for easy consumption
  6. Security: Consider security implications, especially for system operations

Tool Limitations

  • Tools have defined rate limits to prevent abuse
  • External services used by tools may have their own limitations
  • Tools may require specific API keys or permissions
  • Some tools may have usage costs associated with them

Next Steps