# Swarms Tools
[](https://discord.gg/EamjgSaEQf) [](https://www.youtube.com/@kyegomez3242) [](https://www.linkedin.com/in/kye-g-38759a207/) [](https://x.com/kyegomezb)
## Overview
**Swarms Tools** provides a vast array of pre-built tools for your agents, MCP servers, and multi-agent systems. It is built from the ground up for bleeding-edge performance, leveraging packages like `HTTPX`, `orjson`, and other production-grade libraries. Our goal with this package is to make it easier for agent creators to integrate tools into their agents.
## Key Features
| Feature | Description |
|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------|
| **Unified API Integration** | Production-ready Python functions for enterprise applications |
| **Enterprise-Grade Architecture** | Comprehensive type hints, structured outputs, and enterprise documentation standards |
| **Multi-Agent System Compatibility** | Optimized for seamless integration into Swarms' distributed agent orchestration platforms |
| **Extensible Framework** | Standardized schema for rapid tool development and deployment |
| **Enterprise Security** | Secure API key management and compliance-ready implementation patterns |
| **Bleeding Edge Performance** | Utilizes high-performance libraries such as `httpx` for async HTTP and `orjson` for ultra-fast serialization |
## Installation
```bash
pip3 install -U swarms-tools
```
## Project Structure
```plaintext
swarms-tools/
├── swarms_tools/
│ ├── finance/
│ │ ├── htx_tool.py
│ │ ├── eodh_api.py
│ │ ├── coingecko_tool.py
│ │ └── defillama_mcp_tools.py
│ ├── social_media/
│ │ └── telegram_tool.py
│ ├── utilities/
│ │ └── logging.py
├── tests/
│ ├── test_financial_data.py
│ └── test_social_media.py
└── README.md
```
## Tools Examples
### HTX Trading Data
Retrieve historical trading data and market analysis from HTX platform.
```python
from swarms_tools import fetch_htx_data
response = fetch_htx_data("swarms")
print(response)
```
### Stock News
Access real-time stock news and market updates for strategic decision-making.
```python
from swarms_tools import fetch_stock_news
news = fetch_stock_news("AAPL")
print(news)
```
### Yahoo Finance API
Comprehensive stock data including pricing, trends, and historical analysis.
```python
from swarms_tools import yahoo_finance_api
stock_data = yahoo_finance_api("AAPL")
print(stock_data)
```
### CoinGecko API
Real-time cryptocurrency market data and pricing information.
```python
from swarms_tools import coin_gecko_coin_api
crypto_data = coin_gecko_coin_api("bitcoin")
print(crypto_data)
```
### DeFi Protocol Analytics
DeFi ecosystem data including protocol TVL and token pricing.
```python
from swarms_tools import get_protocol_tvl
protocol_tvl = await get_protocol_tvl("uniswap-v3")
print(protocol_tvl)
```
### Web Scraper
Enterprise-grade web scraping for content extraction and data mining.
```python
from swarms_tools.search.web_scraper import scrape_single_url_sync
content = scrape_single_url_sync("https://example.com")
print(content.title, content.text)
```
### Telegram API
Automated messaging and communication through Telegram platform.
```python
from swarms_tools import telegram_dm_or_tag_api
telegram_dm_or_tag_api("Critical business update from Swarms Corporation.")
```
### Twitter Tool
Comprehensive Twitter automation for enterprise social media management.
```python
from swarms_tools.social_media.twitter_tool import TwitterTool
twitter_plugin = TwitterTool(options)
post_tweet = twitter_plugin.get_function("post_tweet")
post_tweet("Enterprise update from Swarms Corp")
```
### Dex Screener
Enterprise-grade tool for accessing decentralized exchange data across multiple blockchain networks.
```python
from swarms_tools.finance.dex_screener import (
fetch_latest_token_boosts,
fetch_dex_screener_profiles,
)
fetch_dex_screener_profiles()
fetch_latest_token_boosts()
```
### GitHub Tool
GitHub repository management and automation capabilities for development workflows.
```python
from swarms_tools.devs.github import GitHubTool
github_tool = GitHubTool()
repo_info = github_tool.get_repository("swarms-corp/swarms-tools")
```
### Code Executor
Secure code execution environment for development and automation workflows.
```python
from swarms_tools.devs.code_executor import CodeExecutor
executor = CodeExecutor()
result = executor.execute("print('Hello from Swarms Tools')")
```
## Tool Orchestration Framework
The tool chainer enables sequential or parallel execution of multiple tools for complex workflow automation:
```python
from loguru import logger
from swarms_tools.structs import tool_chainer
if __name__ == "__main__":
logger.add("tool_chainer.log", rotation="500 MB", level="INFO")
# Define enterprise tools
def data_analysis_tool():
return "Data Analysis Complete"
def reporting_tool():
return "Report Generated"
tools = [data_analysis_tool, reporting_tool]
# Parallel execution for performance optimization
parallel_results = tool_chainer(tools, parallel=True)
print("Parallel Results:", parallel_results)
# Sequential execution for dependency management
sequential_results = tool_chainer(tools, parallel=False)
print("Sequential Results:", sequential_results)
```
### Twitter API Integration
Comprehensive Twitter automation for enterprise social media management:
```python
import os
from time import time
from swarm_models import OpenAIChat
from swarms import Agent
from dotenv import load_dotenv
from swarms_tools.social_media.twitter_tool import TwitterTool
load_dotenv()
# Initialize enterprise AI model
model_name = "gpt-4o"
model = OpenAIChat(
model_name=model_name,
max_tokens=3000,
openai_api_key=os.getenv("OPENAI_API_KEY"),
)
# Configure Twitter integration
options = {
"id": "29998836",
"name": "mcsswarm",
"description": "Enterprise Twitter automation platform",
"credentials": {
"apiKey": os.getenv("TWITTER_API_KEY"),
"apiSecretKey": os.getenv("TWITTER_API_SECRET_KEY"),
"accessToken": os.getenv("TWITTER_ACCESS_TOKEN"),
"accessTokenSecret": os.getenv("TWITTER_ACCESS_TOKEN_SECRET"),
},
}
twitter_plugin = TwitterTool(options)
post_tweet = twitter_plugin.get_function("post_tweet")
# Automated content generation and posting
def generate_corporate_content():
content_prompt = "Generate professional corporate content for social media engagement"
tweet_text = model.run(content_prompt)
try:
post_tweet(tweet_text)
print(f"Content posted successfully: {tweet_text}")
except Exception as e:
print(f"Error posting content: {e}")
```
## Enterprise Development Standards
Every tool in **Swarms Tools** adheres to enterprise-grade development standards:
### Development Schema
1. **Modular Architecture**: Encapsulate API logic into reusable, maintainable functions
2. **Type Safety**: Comprehensive Python type hints for input validation and code clarity
3. **Documentation**: Detailed docstrings with parameter specifications and usage examples
4. **Output Standardization**: Consistent return formats for seamless system integration
5. **Security Compliance**: Secure API key management using environment variables
#### Schema Template
```python
def enterprise_data_function(parameter: str, date_range: str) -> str:
"""
Enterprise-grade data retrieval function.
Args:
parameter (str): Business parameter for data retrieval
date_range (str): Timeframe specification (e.g., '1d', '1m', '1y')
Returns:
str: Structured data response for enterprise systems
"""
pass
```
## Documentation and Support
Comprehensive enterprise documentation is available at [docs.swarms.world](https://docs.swarms.world), providing detailed API references, implementation guides, and best practices for enterprise deployment.
## Community and Support
Join our enterprise community for technical support, platform updates, and exclusive access to advanced agent engineering insights:
| Platform | Description | Link |
|----------|-------------|------|
| Discord | Live technical support and community | [Join Discord](https://discord.gg/EamjgSaEQf) |
| Twitter | Platform updates and announcements | [@swarms_corp](https://twitter.com/swarms_corp) |
| YouTube | Technical tutorials and demonstrations | [Swarms Channel](https://www.youtube.com/channel/UC9yXyitkbU_WSy7bd_41SqQ) |
| Documentation | Official technical documentation | [docs.swarms.world](https://docs.swarms.world) |
| Blog | Technical articles and platform insights | [Medium](https://medium.com/@kyeg) |
| LinkedIn | Professional network and corporate updates | [The Swarm Corporation](https://www.linkedin.com/company/the-swarm-corporation) |
| Events | Enterprise community events and workshops | [Sign up here](https://lu.ma/5p2jnc2v) |
| Onboarding | Enterprise onboarding with platform experts | [Book Session](https://cal.com/swarms/swarms-onboarding-session) |
## Contributing
We welcome enterprise contributions and partnerships. To contribute:
1. **Fork the Repository**: Begin by forking the main repository
2. **Create Feature Branch**: Use descriptive naming: `feature/enterprise-tool-name`
3. **Implement Standards**: Follow enterprise development guidelines
4. **Submit Pull Request**: Open pull request for technical review
## License
This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for complete terms and conditions.
---
**"The future belongs to those who dare to automate it."**
**— The Swarms Corporation**
Raw data
{
"_id": null,
"home_page": "https://github.com/The-Swarm-Corporation/swarms-tools",
"name": "swarms-tools",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "artificial intelligence, deep learning, optimizers, Prompt Engineering",
"author": "Kye Gomez",
"author_email": "kye@apac.ai",
"download_url": "https://files.pythonhosted.org/packages/39/a5/2feeef4134798e150c0132eb17dce82337eb056b744d1748f20129569510/swarms_tools-0.3.4.tar.gz",
"platform": null,
"description": "# Swarms Tools\n\n[](https://discord.gg/EamjgSaEQf) [](https://www.youtube.com/@kyegomez3242) [](https://www.linkedin.com/in/kye-g-38759a207/) [](https://x.com/kyegomezb)\n\n## Overview\n\n**Swarms Tools** provides a vast array of pre-built tools for your agents, MCP servers, and multi-agent systems. It is built from the ground up for bleeding-edge performance, leveraging packages like `HTTPX`, `orjson`, and other production-grade libraries. Our goal with this package is to make it easier for agent creators to integrate tools into their agents.\n\n## Key Features\n\n| Feature | Description |\n|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------|\n| **Unified API Integration** | Production-ready Python functions for enterprise applications |\n| **Enterprise-Grade Architecture** | Comprehensive type hints, structured outputs, and enterprise documentation standards |\n| **Multi-Agent System Compatibility** | Optimized for seamless integration into Swarms' distributed agent orchestration platforms |\n| **Extensible Framework** | Standardized schema for rapid tool development and deployment |\n| **Enterprise Security** | Secure API key management and compliance-ready implementation patterns |\n| **Bleeding Edge Performance** | Utilizes high-performance libraries such as `httpx` for async HTTP and `orjson` for ultra-fast serialization |\n\n## Installation\n\n```bash\npip3 install -U swarms-tools\n```\n\n## Project Structure\n\n```plaintext\nswarms-tools/\n\u251c\u2500\u2500 swarms_tools/\n\u2502 \u251c\u2500\u2500 finance/\n\u2502 \u2502 \u251c\u2500\u2500 htx_tool.py\n\u2502 \u2502 \u251c\u2500\u2500 eodh_api.py\n\u2502 \u2502 \u251c\u2500\u2500 coingecko_tool.py\n\u2502 \u2502 \u2514\u2500\u2500 defillama_mcp_tools.py\n\u2502 \u251c\u2500\u2500 social_media/\n\u2502 \u2502 \u2514\u2500\u2500 telegram_tool.py\n\u2502 \u251c\u2500\u2500 utilities/\n\u2502 \u2502 \u2514\u2500\u2500 logging.py\n\u251c\u2500\u2500 tests/\n\u2502 \u251c\u2500\u2500 test_financial_data.py\n\u2502 \u2514\u2500\u2500 test_social_media.py\n\u2514\u2500\u2500 README.md\n```\n\n## Tools Examples\n\n### HTX Trading Data\n\nRetrieve historical trading data and market analysis from HTX platform.\n\n```python\nfrom swarms_tools import fetch_htx_data\n\nresponse = fetch_htx_data(\"swarms\")\nprint(response)\n```\n\n### Stock News\n\nAccess real-time stock news and market updates for strategic decision-making.\n\n```python\nfrom swarms_tools import fetch_stock_news\n\nnews = fetch_stock_news(\"AAPL\")\nprint(news)\n```\n\n### Yahoo Finance API\n\nComprehensive stock data including pricing, trends, and historical analysis.\n\n```python\nfrom swarms_tools import yahoo_finance_api\n\nstock_data = yahoo_finance_api(\"AAPL\")\nprint(stock_data)\n```\n\n### CoinGecko API\n\nReal-time cryptocurrency market data and pricing information.\n\n```python\nfrom swarms_tools import coin_gecko_coin_api\n\ncrypto_data = coin_gecko_coin_api(\"bitcoin\")\nprint(crypto_data)\n```\n\n### DeFi Protocol Analytics\n\nDeFi ecosystem data including protocol TVL and token pricing.\n\n```python\nfrom swarms_tools import get_protocol_tvl\n\nprotocol_tvl = await get_protocol_tvl(\"uniswap-v3\")\nprint(protocol_tvl)\n```\n\n### Web Scraper\n\nEnterprise-grade web scraping for content extraction and data mining.\n\n```python\nfrom swarms_tools.search.web_scraper import scrape_single_url_sync\n\ncontent = scrape_single_url_sync(\"https://example.com\")\nprint(content.title, content.text)\n```\n\n### Telegram API\n\nAutomated messaging and communication through Telegram platform.\n\n```python\nfrom swarms_tools import telegram_dm_or_tag_api\n\ntelegram_dm_or_tag_api(\"Critical business update from Swarms Corporation.\")\n```\n\n### Twitter Tool\n\nComprehensive Twitter automation for enterprise social media management.\n\n```python\nfrom swarms_tools.social_media.twitter_tool import TwitterTool\n\ntwitter_plugin = TwitterTool(options)\npost_tweet = twitter_plugin.get_function(\"post_tweet\")\npost_tweet(\"Enterprise update from Swarms Corp\")\n```\n\n### Dex Screener\n\nEnterprise-grade tool for accessing decentralized exchange data across multiple blockchain networks.\n\n```python\nfrom swarms_tools.finance.dex_screener import (\n fetch_latest_token_boosts,\n fetch_dex_screener_profiles,\n)\n\nfetch_dex_screener_profiles()\nfetch_latest_token_boosts()\n```\n\n### GitHub Tool\n\nGitHub repository management and automation capabilities for development workflows.\n\n```python\nfrom swarms_tools.devs.github import GitHubTool\n\ngithub_tool = GitHubTool()\nrepo_info = github_tool.get_repository(\"swarms-corp/swarms-tools\")\n```\n\n### Code Executor\n\nSecure code execution environment for development and automation workflows.\n\n```python\nfrom swarms_tools.devs.code_executor import CodeExecutor\n\nexecutor = CodeExecutor()\nresult = executor.execute(\"print('Hello from Swarms Tools')\")\n```\n\n## Tool Orchestration Framework\n\nThe tool chainer enables sequential or parallel execution of multiple tools for complex workflow automation:\n\n```python\nfrom loguru import logger\nfrom swarms_tools.structs import tool_chainer\n\nif __name__ == \"__main__\":\n logger.add(\"tool_chainer.log\", rotation=\"500 MB\", level=\"INFO\")\n\n # Define enterprise tools\n def data_analysis_tool():\n return \"Data Analysis Complete\"\n\n def reporting_tool():\n return \"Report Generated\"\n\n tools = [data_analysis_tool, reporting_tool]\n\n # Parallel execution for performance optimization\n parallel_results = tool_chainer(tools, parallel=True)\n print(\"Parallel Results:\", parallel_results)\n\n # Sequential execution for dependency management\n sequential_results = tool_chainer(tools, parallel=False)\n print(\"Sequential Results:\", sequential_results)\n```\n\n\n### Twitter API Integration\n\nComprehensive Twitter automation for enterprise social media management:\n\n```python\nimport os\nfrom time import time\nfrom swarm_models import OpenAIChat\nfrom swarms import Agent\nfrom dotenv import load_dotenv\nfrom swarms_tools.social_media.twitter_tool import TwitterTool\n\nload_dotenv()\n\n# Initialize enterprise AI model\nmodel_name = \"gpt-4o\"\nmodel = OpenAIChat(\n model_name=model_name,\n max_tokens=3000,\n openai_api_key=os.getenv(\"OPENAI_API_KEY\"),\n)\n\n# Configure Twitter integration\noptions = {\n \"id\": \"29998836\",\n \"name\": \"mcsswarm\",\n \"description\": \"Enterprise Twitter automation platform\",\n \"credentials\": {\n \"apiKey\": os.getenv(\"TWITTER_API_KEY\"),\n \"apiSecretKey\": os.getenv(\"TWITTER_API_SECRET_KEY\"),\n \"accessToken\": os.getenv(\"TWITTER_ACCESS_TOKEN\"),\n \"accessTokenSecret\": os.getenv(\"TWITTER_ACCESS_TOKEN_SECRET\"),\n },\n}\n\ntwitter_plugin = TwitterTool(options)\npost_tweet = twitter_plugin.get_function(\"post_tweet\")\n\n# Automated content generation and posting\ndef generate_corporate_content():\n content_prompt = \"Generate professional corporate content for social media engagement\"\n tweet_text = model.run(content_prompt)\n \n try:\n post_tweet(tweet_text)\n print(f\"Content posted successfully: {tweet_text}\")\n except Exception as e:\n print(f\"Error posting content: {e}\")\n```\n\n## Enterprise Development Standards\n\nEvery tool in **Swarms Tools** adheres to enterprise-grade development standards:\n\n### Development Schema\n\n1. **Modular Architecture**: Encapsulate API logic into reusable, maintainable functions\n2. **Type Safety**: Comprehensive Python type hints for input validation and code clarity\n3. **Documentation**: Detailed docstrings with parameter specifications and usage examples\n4. **Output Standardization**: Consistent return formats for seamless system integration\n5. **Security Compliance**: Secure API key management using environment variables\n\n#### Schema Template\n\n```python\ndef enterprise_data_function(parameter: str, date_range: str) -> str:\n \"\"\"\n Enterprise-grade data retrieval function.\n\n Args:\n parameter (str): Business parameter for data retrieval\n date_range (str): Timeframe specification (e.g., '1d', '1m', '1y')\n\n Returns:\n str: Structured data response for enterprise systems\n \"\"\"\n pass\n```\n\n## Documentation and Support\n\nComprehensive enterprise documentation is available at [docs.swarms.world](https://docs.swarms.world), providing detailed API references, implementation guides, and best practices for enterprise deployment.\n\n## Community and Support\n\nJoin our enterprise community for technical support, platform updates, and exclusive access to advanced agent engineering insights:\n\n| Platform | Description | Link |\n|----------|-------------|------|\n| Discord | Live technical support and community | [Join Discord](https://discord.gg/EamjgSaEQf) |\n| Twitter | Platform updates and announcements | [@swarms_corp](https://twitter.com/swarms_corp) |\n| YouTube | Technical tutorials and demonstrations | [Swarms Channel](https://www.youtube.com/channel/UC9yXyitkbU_WSy7bd_41SqQ) |\n| Documentation | Official technical documentation | [docs.swarms.world](https://docs.swarms.world) |\n| Blog | Technical articles and platform insights | [Medium](https://medium.com/@kyeg) |\n| LinkedIn | Professional network and corporate updates | [The Swarm Corporation](https://www.linkedin.com/company/the-swarm-corporation) |\n| Events | Enterprise community events and workshops | [Sign up here](https://lu.ma/5p2jnc2v) |\n| Onboarding | Enterprise onboarding with platform experts | [Book Session](https://cal.com/swarms/swarms-onboarding-session) |\n\n## Contributing\n\nWe welcome enterprise contributions and partnerships. To contribute:\n\n1. **Fork the Repository**: Begin by forking the main repository\n2. **Create Feature Branch**: Use descriptive naming: `feature/enterprise-tool-name`\n3. **Implement Standards**: Follow enterprise development guidelines\n4. **Submit Pull Request**: Open pull request for technical review\n\n## License\n\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for complete terms and conditions.\n\n---\n\n**\"The future belongs to those who dare to automate it.\"** \n**\u2014 The Swarms Corporation**\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Paper - Pytorch",
"version": "0.3.4",
"project_urls": {
"Documentation": "https://github.com/The-Swarm-Corporation/swarms-tools",
"Homepage": "https://github.com/The-Swarm-Corporation/swarms-tools",
"Repository": "https://github.com/The-Swarm-Corporation/swarms-tools"
},
"split_keywords": [
"artificial intelligence",
" deep learning",
" optimizers",
" prompt engineering"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bd976bf0f83402baaf46a5025872728842f3faddbe424418bf9ca1e91e0cf1cc",
"md5": "1d1de26c467760c8b7b05f8b81f834fb",
"sha256": "3a4286f101171cd8c121441f388399e3476301739a5e763bc383ecacc009df67"
},
"downloads": -1,
"filename": "swarms_tools-0.3.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1d1de26c467760c8b7b05f8b81f834fb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 81950,
"upload_time": "2025-09-03T00:53:53",
"upload_time_iso_8601": "2025-09-03T00:53:53.953681Z",
"url": "https://files.pythonhosted.org/packages/bd/97/6bf0f83402baaf46a5025872728842f3faddbe424418bf9ca1e91e0cf1cc/swarms_tools-0.3.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "39a52feeef4134798e150c0132eb17dce82337eb056b744d1748f20129569510",
"md5": "2e4e8b7b04e728182e8afd86caaf7a15",
"sha256": "5bcd2e2de6b8caf2714c63f1e9fa24d1cc2af2f8acdc2478690911eb15846fc9"
},
"downloads": -1,
"filename": "swarms_tools-0.3.4.tar.gz",
"has_sig": false,
"md5_digest": "2e4e8b7b04e728182e8afd86caaf7a15",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 61879,
"upload_time": "2025-09-03T00:53:55",
"upload_time_iso_8601": "2025-09-03T00:53:55.228188Z",
"url": "https://files.pythonhosted.org/packages/39/a5/2feeef4134798e150c0132eb17dce82337eb056b744d1748f20129569510/swarms_tools-0.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-03 00:53:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "The-Swarm-Corporation",
"github_project": "swarms-tools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "httpx",
"specs": []
},
{
"name": "loguru",
"specs": []
},
{
"name": "rich",
"specs": []
},
{
"name": "serpapi",
"specs": []
},
{
"name": "tavily",
"specs": []
},
{
"name": "orjson",
"specs": []
},
{
"name": "mcp",
"specs": []
},
{
"name": "lxml",
"specs": []
}
],
"lcname": "swarms-tools"
}