Skip to main content
Get a comprehensive list of all tools available through the Swarms API. The /v1/tools/available endpoint provides information about integrated tools and capabilities that can enhance your agents and swarms.
Tools extend agent capabilities by providing access to external services, APIs, databases, and specialized functions.

Quick Start

  • Python
  • JavaScript
  • cURL
import requests
import json
import os
from dotenv import load_dotenv

load_dotenv()

API_KEY = os.getenv("SWARMS_API_KEY")
BASE_URL = "https://swarms-api-285321057562.us-east1.run.app"

headers = {
    "x-api-key": API_KEY,
    "Content-Type": "application/json"
}

def get_available_tools():
    """Get all available tools"""
    response = requests.get(
        f"{BASE_URL}/v1/tools/available",
        headers=headers
    )

    if response.status_code == 200:
        return response.json()
    else:
        print(f"Error: {response.status_code} - {response.text}")
        return None

# Get available tools
tools_data = get_available_tools()
if tools_data:
    print("✅ Available tools retrieved successfully!")
    print(json.dumps(tools_data, indent=2))

Tool Integration

Advanced Tool Configuration

  • Multiple Tools
  • Tool-Specific Configuration
payload = {
    "agent_config": {
        "agent_name": "Multi-Tool Assistant",
        "model_name": "gpt-4o",
        "max_tokens": 4096,
        "tools_enabled": [
            "web_search",
            "calculator",
            "file_processor",
            "database_query"
        ]
    },
    "task": "Research the latest stock prices for tech companies, calculate the average, and generate a report."
}

Tool Categories

CategoryToolsDescription
Search & Discoveryweb_search, database_queryFind and retrieve information from various sources
Computationcalculator, data_analyzerPerform calculations and data analysis
File Processingfile_processor, document_parserHandle and analyze files and documents
Integrationapi_integrator, webhook_handlerConnect with external APIs and services
Communicationemail_sender, notification_serviceSend messages and notifications

Best Practices

Tool Selection

  1. Match Tools to Tasks: Choose tools that best fit your specific use case
  2. Avoid Overloading: Don’t enable too many tools for a single agent
  3. Test Combinations: Test tool combinations to ensure they work well together
  4. Monitor Performance: Track how tools affect response time and cost

Configuration

  1. Set Appropriate Limits: Configure tool-specific limits and timeouts
  2. Handle Errors Gracefully: Implement proper error handling for tool failures
  3. Cache Results: Cache tool results when appropriate to improve performance
  4. Security First: Ensure tools access only authorized resources

Usage Optimization

  1. Batch Operations: Use tools that support batch operations when possible
  2. Async Processing: Leverage asynchronous tool execution for better performance
  3. Resource Management: Monitor tool usage and resource consumption
  4. Cost Awareness: Be aware of costs associated with tool usage
I