Refresh MCP Tools
Used to refresh and re-discover tools from an MCP (Model Context Protocol) server. This allows you to update the available tools and capabilities from an MCP server, useful when the server has added new tools or modified existing ones.
API Endpoint
| Property | Value |
|---|---|
| Request Method | POST |
| Request URL | https://api.seliseblocks.com/tools/{tool_id}/refresh-mcp |
Request
Request Example
curl -X POST 'https://api.seliseblocks.com/tools/{tool_id}/refresh-mcp?project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'
Path Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| tool_id | string | Yes | The unique identifier of the MCP server tool. |
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| project_key | string | No | The project key for your project. |
Request Headers
| Field | Type | Required | Description |
|---|---|---|---|
| accept | string | Yes | Accepted response format. Use application/json |
note
Refresh Operation Details
- This endpoint requires no request body
- The refresh operation connects to the MCP server and queries available tools
- Existing tool configurations are preserved while new tools are added
- Removed tools from the server will be marked as unavailable
- Use this endpoint after the MCP server has been updated with new capabilities
tip
When to refresh MCP tools:
- After the MCP server has been updated with new tools
- When tools appear to be out of sync with the server
- After modifying MCP server configurations or permissions
- Periodically to ensure the latest capabilities are available
- When troubleshooting issues with specific MCP tools
The system will:
- Connect to the configured MCP server
- Discover all available tools and resources
- Update the tool registry with new or modified tools
- Preserve existing tool configurations and settings
- Return a count of tools discovered
Response
Success Response (200 OK)
Returns an object containing the refresh status.
{
"is_success": true,
"item_id": "mcp_server_123",
"detail": "MCP tools refreshed successfully. 15 tools discovered (3 new, 12 existing).",
"error": {}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| is_success | boolean | Indicates whether the refresh was successful. |
| item_id | string | The identifier of the MCP server tool. |
| detail | string | Success or failure message with additional context including tool counts. |
| error | object | Error details if the operation failed (empty if successful). |
Error Response (422 Unprocessable Entity)
Returns validation error details when the request parameters are invalid.
{
"detail": [
{
"loc": [
"path",
"tool_id"
],
"msg": "invalid tool identifier",
"type": "value_error"
}
]
}
Error Response Fields
| Field | Type | Description |
|---|---|---|
| detail | array | Array of validation error objects. |
| loc | array | Location of the error in the request (e.g., path, query). |
| msg | string | Human-readable error message. |
| type | string | Error type identifier. |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 200 | Successful Response | Success |
| 400 | Bad Request - Invalid request | Bad Request |
| 401 | Unauthorized - Authentication failed | Unauthorized |
| 404 | Not Found - MCP server tool does not exist | Not Found |
| 422 | Validation Error - Invalid request parameters | Unprocessable Entity |
| 503 | Service Unavailable - Cannot connect to MCP server | Service Unavailable |