Skip to main content

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

PropertyValue
Request MethodPOST
Request URLhttps://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

FieldTypeRequiredDescription
tool_idstringYesThe unique identifier of the MCP server tool.

Query Parameters

FieldTypeRequiredDescription
project_keystringNoThe project key for your project.

Request Headers

FieldTypeRequiredDescription
acceptstringYesAccepted 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

FieldTypeDescription
is_successbooleanIndicates whether the refresh was successful.
item_idstringThe identifier of the MCP server tool.
detailstringSuccess or failure message with additional context including tool counts.
errorobjectError 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

FieldTypeDescription
detailarrayArray of validation error objects.
locarrayLocation of the error in the request (e.g., path, query).
msgstringHuman-readable error message.
typestringError type identifier.

Error Codes

Status CodeDescriptionResponse Type
200Successful ResponseSuccess
400Bad Request - Invalid requestBad Request
401Unauthorized - Authentication failedUnauthorized
404Not Found - MCP server tool does not existNot Found
422Validation Error - Invalid request parametersUnprocessable Entity
503Service Unavailable - Cannot connect to MCP serverService Unavailable