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

# Adding Tools

> Contribute your own Agent tool to the ecosystem

If you're reading this section, you probably have a product that AI agents can use as a tool. We're glad you're here!

Adding tools is easy once you understand the project structure. A few things need to be done for a tool to be considered completely supported:

**1. Create a config for your tool**

* Create a new tool config at `agentstack/_tools/<your_tool>/config.json`
* As an example, look at our [tool config fixture](https://github.com/AgentOps-AI/AgentStack/blob/main/tests/fixtures/tool_config_max.json)
* AgentStack uses this to know what code to insert where. Follow the structure to add your tool.

**2. Create your implementation**

* In `agentstack/_tools`, you'll see other implementations of tools.
* Create a file `agentstack/_tools/<your_tool>/__init__.py`,
* Build your tool implementation simply as python functions in this file. The functions that are to be exposed to the agent as a *tool* should contain detailed docstrings and have typed parameters.
* The tools that are exported from this file should be listed in the tool's config json.

**3. Test your tool**

Manually test your tool integration by running `agentstack tools add <your_tool>` and ensure it behaves as expected.
\[!NOTE] This must be done within an AgentStack project. To create your test project, run `agentstack init test_proj`, then `cd` into the project and try adding your tool.

**4. Open a PR to add your tool to the next release**

# Tool Config

* `name` (str) - Name of your tool
* `category` (str) - Category your tool belongs in
* `tools` (List\[str]) - The exported functions within your tool file
* `url` (str) - URL to where developers can learn more about your tool
* `tools_bundled` (bool) - True if the tool file exports a list of tools
* `cta` (str) - Call To Action printed in the terminal after install
* `env` (dict) - Key: Environment variable name; Value: default value
* `packages` (List\[str]) - Python packages to be installed to support your tool
* `post_install` (str) - A script to be run after install of your tool
* `post_remove` (str) - A script to be run after removal of your tool


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.