Tools Management
Endpoints for managing individual tools within a toolkit.
GET /api/toolkits/{id}/tools
List all tools in a toolkit.
Permission: toolkit:read
Response:
{
"_links": {
"self": { "href": "/api/toolkits/{id}/tools" }
},
"_embedded": {
"inf:tool": [
{
"id": "tool-123",
"toolkitId": "team:github-toolkit",
"name": "create_issue",
"description": "Create a new GitHub issue",
"type": "mcp",
"parameters": {
"type": "object",
"properties": {
"title": { "type": "string" },
"body": { "type": "string" }
},
"required": ["title"]
},
"sortOrder": 0,
"discoveredAt": "2024-02-09T10:00:00Z",
"discoveredBy": "server"
}
]
},
"start": 0,
"count": 1,
"total": 1
}
Sorting: Tools are ordered by sortOrder ASC, then name ASC
POST /api/toolkits/{id}/tools
Add a custom tool to a toolkit.
Permission: toolkit:write
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Tool name |
description | string | No | Tool description |
type | string | No | Tool type (default: api-request) |
config | string | No | Tool-specific configuration |
parameters | object | No | JSON Schema for tool parameters |
sortOrder | integer | No | Display order (default: 0) |
Response: 201 Created
PUT /api/toolkits/{id}/tools
Sync discovered tools (replaces all existing tools).
Permission: toolkit:write
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
tools | array | Yes | Array of discovered tools |
discoveredBy | string | No | Source of discovery (e.g., server, client) |
Example Request:
{
"tools": [
{
"name": "get_repo",
"description": "Get repository details",
"inputSchema": {
"type": "object",
"properties": {
"owner": { "type": "string" },
"repo": { "type": "string" }
},
"required": ["owner", "repo"]
}
}
],
"discoveredBy": "server"
}
Response: Updated tools list
Side Effects:
- Deletes all existing tools for the toolkit
- Creates new tool records from discovered tools
- Sets
discoveredAttimestamp - Sets
typetomcpfor all tools
This endpoint replaces ALL tools in the toolkit. Use for MCP toolkit discovery workflows.
GET /api/toolkits/{id}/tools/{toolId}
Get a specific tool.
Permission: toolkit:read
Response: Tool object
PUT /api/toolkits/{id}/tools/{toolId}
Update a tool.
Permission: toolkit:write
Request Body: Same fields as POST
Response: Updated tool object
DELETE /api/toolkits/{id}/tools/{toolId}
Delete a tool from the toolkit.
Permission: toolkit:write
Response: 204 No Content
Tool Parameters Schema
Tools use JSON Schema to define their parameters:
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 10
}
},
"required": ["query"]
}
This schema is used by the AI to understand how to call the tool correctly.