Tool Integration Skill
When to use this skill
Use when:
- •Creating custom tools for agents
- •Integrating external APIs
- •Adding MCP (Model Context Protocol) servers
- •Managing tool registry
- •Testing tool implementations
Tool Structure
python
# .parac/tools/custom/weather_tool.py
from pydantic import BaseModel, Field
from paracle_tools import Tool, ToolResult
class WeatherInput(BaseModel):
\"\"\"Input for weather tool.\"\"\"
location: str = Field(..., description=\"City name\")
units: str = Field(default=\"metric\", description=\"Temperature units\")
class WeatherTool(Tool):
\"\"\"Get current weather for a location.\"\"\"
name = \"get-weather\"
description = \"Get current weather conditions for a location\"
input_schema = WeatherInput
async def execute(self, input_data: WeatherInput) -> ToolResult:
\"\"\"Execute weather lookup.\"\"\"
# Call external API
weather_data = await fetch_weather_api(
location=input_data.location,
units=input_data.units,
)
return ToolResult(
success=True,
output=f\"Temperature in {input_data.location}: {weather_data['temp']}°\",
metadata=weather_data,
)
Tool Registration
yaml
# .parac/tools/registry.yaml
tools:
- name: get-weather
path: .parac/tools/custom/weather_tool.py
class: WeatherTool
enabled: true
- name: web-search
type: mcp
server: search-mcp
enabled: true
MCP Server Integration
json
// .parac/mcp-servers.json
{
\"mcpServers\": {
\"filesystem\": {
\"command\": \"npx\",
\"args\": [\"-y\", \"@modelcontextprotocol/server-filesystem\", \"/workspace\"]
},
\"github\": {
\"command\": \"mcp-server-github\",
\"env\": {
\"GITHUB_TOKEN\": \"${GITHUB_TOKEN}\"
}
}
}
}
Best Practices
- •Clear tool descriptions - Help agents understand when to use
- •Validate inputs - Use Pydantic for type safety
- •Handle errors gracefully - Return clear error messages
- •Test thoroughly - Unit test each tool
- •Document usage - Provide examples
Resources
- •Built-in Tools:
packages/paracle_tools/builtin/ - •MCP Integration:
packages/paracle_mcp/ - •Tool Examples:
examples/*_tools.py