cribl_restartWorkerGroup
Restart all workers in a worker group to apply configuration changes or recover from issues. Use this tool to trigger a coordinated restart of the specified worker group.
Instructions
Restarts all workers within the default or specified worker group.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:311-330 (handler)MCP tool handler that registers 'cribl_restartWorkerGroup' and calls the restartWorkerGroup client function, returning success/error responses.
server.tool( 'cribl_restartWorkerGroup', 'Restarts all workers within the default or specified worker group.', RestartWorkerGroupArgsShape, async () => { // No args needed console.error(`[Tool Call] cribl_restartWorkerGroup`); const result = await restartWorkerGroup(); // Call client function without groupName if (!result.success) { console.error(`[Tool Error] cribl_restartWorkerGroup:`, result.error); return { isError: true, content: [{ type: 'text', text: `Error restarting workers: ${result.error}` }], }; } console.error(`[Tool Success] cribl_restartWorkerGroup`); return { content: [{ type: 'text', text: result.data?.message || `Successfully initiated worker restart.` }], }; } ); - src/api/criblClient.ts:417-430 (helper)API helper function that calls PATCH /api/v1/master/workers/restart to restart all workers managed by the leader.
export async function restartWorkerGroup(): Promise<ClientResult<{ message: string }>> { // Removed groupName parameter const context = `restartWorkerGroup`; // Using documented PATCH /master/workers/restart endpoint (No group scope) const url = `/api/v1/master/workers/restart`; console.error(`[stderr] Attempting API call: PATCH ${url} - WARNING: This likely restarts ALL workers managed by the Leader.`); try { const response = await apiClient.patch(url); // Use PATCH, no body usually needed for restart action return { success: true, data: { message: `Successfully initiated worker restart. Response status: ${response.status}` } }; } catch (error) { const errorMessage = handleApiError(error, context); return { success: false, error: errorMessage }; } } - src/server.ts:311-312 (registration)Registration of the 'cribl_restartWorkerGroup' tool via server.tool() on the MCP server instance.
server.tool( 'cribl_restartWorkerGroup', - src/server.ts:309-309 (schema)Empty schema definition for restartWorkerGroup tool since no arguments are required.
const RestartWorkerGroupArgsShape = {}; // No args needed