Skip to content

Commit 35791ae

Browse files
Merge pull request #5834 from aden-hive/fix/quickstart-tweaks
chore(micro-fix): tweak quickstart
2 parents 60bff41 + 10f0002 commit 35791ae

File tree

3 files changed

+106
-5
lines changed

3 files changed

+106
-5
lines changed

docs/tools.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Tools
2+
3+
Hive agents interact with external services through **tools** — functions exposed via MCP (Model Context Protocol) servers. The main tool server lives at `tools/mcp_server.py` and registers integrations from the `aden_tools` package.
4+
5+
## Verified vs Unverified
6+
7+
Tools are split into two tiers:
8+
9+
| Tier | Description | Default |
10+
|------|-------------|---------|
11+
| **Verified** | Stable integrations tested on main. Always loaded. | On |
12+
| **Unverified** | New or community integrations pending full review. | Off |
13+
14+
Verified tools include core capabilities like web search, GitHub, email, file system operations, and security scanners. Unverified tools cover newer integrations like Jira, Notion, Salesforce, Snowflake, and others that are functional but haven't completed the full review process.
15+
16+
## Enabling Unverified Tools
17+
18+
Set the `INCLUDE_UNVERIFIED_TOOLS` environment variable to opt in:
19+
20+
```bash
21+
# Shell
22+
INCLUDE_UNVERIFIED_TOOLS=true uv run python tools/mcp_server.py --stdio
23+
```
24+
25+
### In `mcp_servers.json`
26+
27+
When configuring an agent's MCP server, pass the env var in the server config:
28+
29+
```json
30+
{
31+
"servers": [
32+
{
33+
"name": "tools",
34+
"transport": "stdio",
35+
"command": "uv",
36+
"args": ["run", "python", "tools/mcp_server.py", "--stdio"],
37+
"env": {
38+
"INCLUDE_UNVERIFIED_TOOLS": "true"
39+
}
40+
}
41+
]
42+
}
43+
```
44+
45+
### In Docker
46+
47+
```bash
48+
docker run -e INCLUDE_UNVERIFIED_TOOLS=true ...
49+
```
50+
51+
### In Python
52+
53+
If calling `register_all_tools` directly (e.g., in a custom server):
54+
55+
```python
56+
from aden_tools.tools import register_all_tools
57+
58+
register_all_tools(mcp, credentials=credentials, include_unverified=True)
59+
```
60+
61+
Accepted values: `true`, `1`, `yes` (case-insensitive). Any other value or unset means off.
62+
63+
## Listing Available Tools
64+
65+
The MCP server logs registered tools at startup (HTTP mode):
66+
67+
```bash
68+
uv run python tools/mcp_server.py
69+
# [MCP] Registered 47 tools: [...]
70+
```
71+
72+
In STDIO mode, logs go to stderr to keep stdout clean for JSON-RPC.
73+
74+
## Adding a New Tool
75+
76+
New tool integrations are added to `tools/src/aden_tools/tools/` and registered in `_register_unverified()` in `tools/src/aden_tools/tools/__init__.py`. Once reviewed and stabilized, they graduate to `_register_verified()`.
77+
78+
See the [developer guide](developer-guide.md) for the full contribution workflow.

quickstart.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,26 @@ if [ -n "$HIVE_CREDENTIAL_KEY" ]; then
14771477
echo ""
14781478
fi
14791479

1480+
# Show tool summary
1481+
TOOL_COUNTS=$(uv run python -c "
1482+
from fastmcp import FastMCP
1483+
from aden_tools.tools import register_all_tools
1484+
mv = FastMCP('v')
1485+
v = register_all_tools(mv, include_unverified=False)
1486+
ma = FastMCP('a')
1487+
a = register_all_tools(ma, include_unverified=True)
1488+
print(f'{len(v)}|{len(a) - len(v)}')
1489+
" 2>/dev/null)
1490+
if [ -n "$TOOL_COUNTS" ]; then
1491+
VERIFIED=$(echo "$TOOL_COUNTS" | cut -d'|' -f1)
1492+
UNVERIFIED=$(echo "$TOOL_COUNTS" | cut -d'|' -f2)
1493+
echo -e "${BOLD}Tools:${NC}"
1494+
echo -e " ${GREEN}${NC} ${VERIFIED} verified ${DIM}${UNVERIFIED} unverified available${NC}"
1495+
echo -e " ${DIM}Enable unverified: INCLUDE_UNVERIFIED_TOOLS=true${NC}"
1496+
echo -e " ${DIM}Learn more: docs/tools.md${NC}"
1497+
echo ""
1498+
fi
1499+
14801500
# Show Codex instructions if available
14811501
if [ "$CODEX_AVAILABLE" = true ]; then
14821502
echo -e "${BOLD}Build a New Agent (Codex):${NC}"
@@ -1520,7 +1540,7 @@ else
15201540
echo ""
15211541
echo -e " Launch the interactive dashboard to browse and run agents:"
15221542
echo -e " You can start an example agent or an agent built by yourself:"
1523-
echo -e " ${CYAN}hive tui${NC}"
1543+
echo -e " ${CYAN}hive open${NC}"
15241544
echo ""
15251545
echo -e "${DIM}Run ./quickstart.sh again to reconfigure.${NC}"
15261546
echo ""

tools/mcp_server.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
python mcp_server.py --stdio
1616
1717
Environment Variables:
18-
MCP_PORT - Server port (default: 4001)
19-
ANTHROPIC_API_KEY - Required at startup for testing/LLM nodes
20-
BRAVE_SEARCH_API_KEY - Required for web_search tool (validated at agent load time)
18+
MCP_PORT - Server port (default: 4001)
19+
INCLUDE_UNVERIFIED_TOOLS - Set to "true", "1", or "yes" to also load
20+
unverified/community tool integrations (default: off)
21+
ANTHROPIC_API_KEY - Required at startup for testing/LLM nodes
22+
BRAVE_SEARCH_API_KEY - Required for web_search tool (validated at agent load time)
2123
2224
Note:
2325
Two-tier credential validation:
@@ -81,7 +83,8 @@ def _patched_console_init(self, *args, **kwargs):
8183
mcp = FastMCP("tools")
8284

8385
# Register all tools with the MCP server, passing credential store
84-
tools = register_all_tools(mcp, credentials=credentials)
86+
include_unverified = os.getenv("INCLUDE_UNVERIFIED_TOOLS", "").lower() in ("true", "1", "yes")
87+
tools = register_all_tools(mcp, credentials=credentials, include_unverified=include_unverified)
8588
# Only print to stdout in HTTP mode (STDIO mode requires clean stdout for JSON-RPC)
8689
if "--stdio" not in sys.argv:
8790
logger.info(f"Registered {len(tools)} tools: {tools}")

0 commit comments

Comments
 (0)