Custom Toolkits
Create your own toolkits to expose any functionality to your AI agents.
Creating a Custom Toolkit
To create a custom toolkit, send a POST request to the toolkits endpoint with a name, display name, and description:
curl -X POST https://api.agentdojo.dev/mcp/toolkits \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "order-management",
"display_name": "Order Management",
"description": "Tools for managing customer orders, including lookup, updates, and cancellations"
}'The API returns the created toolkit with its generated id:
{
"id": "tk_custom_001",
"name": "order-management",
"display_name": "Order Management",
"description": "Tools for managing customer orders, including lookup, updates, and cancellations",
"toolkit_type": "hosted",
"status": "active"
}Registering Tools in a Toolkit
After creating a toolkit, you register individual tools within it. Each tool needs a name, description, the function it calls, and an input schema defining its parameters.
curl -X POST https://api.agentdojo.dev/mcp/tools \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"toolkit_id": "tk_custom_001",
"name": "lookup-order",
"description": "Look up an order by its ID and return the order details",
"function_name": "lookup-order",
"input_schema": {
"type": "object",
"properties": {
"order_id": {
"type": "string",
"description": "The unique order ID to look up"
}
},
"required": ["order_id"]
}
}'The input_schema follows JSON Schema format. This schema is sent to the AI agent so it knows what parameters to provide when calling the tool.
Full Walkthrough
Here is the complete flow from creating a toolkit to testing it via the MCP protocol:
Create the Toolkit
curl -X POST https://api.agentdojo.dev/mcp/toolkits \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "inventory-check",
"display_name": "Inventory Check",
"description": "Check product inventory and stock levels"
}'Register a Tool with Input Schema
curl -X POST https://api.agentdojo.dev/mcp/tools \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"toolkit_id": "tk_inv_001",
"name": "check-stock",
"description": "Check the current stock level for a product",
"function_name": "check-stock",
"input_schema": {
"type": "object",
"properties": {
"product_id": {
"type": "string",
"description": "The product ID to check"
},
"warehouse": {
"type": "string",
"description": "Optional warehouse location",
"default": "all"
}
},
"required": ["product_id"]
}
}'Add the Toolkit to a Server
curl -X POST https://api.agentdojo.dev/mcp/servers \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "warehouse-server",
"display_name": "Warehouse Server",
"toolkits": [
{
"toolkit_id": "tk_inv_001"
}
]
}'Test via MCP Protocol
Connect your MCP client to the server endpoint and call the tool:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "check-stock",
"arguments": {
"product_id": "SKU-12345",
"warehouse": "east"
}
}
}Updating a Toolkit
Update an existing toolkit's properties using a PUT request:
curl -X PUT https://api.agentdojo.dev/mcp/toolkits/tk_custom_001 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Order Management v2",
"description": "Updated tools for managing customer orders with refund support"
}'Deleting a Toolkit
To delete a toolkit and all its associated tools, send a DELETE request:
curl -X DELETE https://api.agentdojo.dev/mcp/toolkits/tk_custom_001 \
-H "Authorization: Bearer YOUR_API_KEY"Warning: Deleting a toolkit removes it from all servers it is attached to. Any agents currently using tools from this toolkit will no longer be able to call them.