kunobi_refresh
Force an immediate reconnect across all Kunobi variants. Use after launching or when status shows stale data to get fresh connection status.
Instructions
Force an immediate reconnect attempt across all configured Kunobi variants. Use this after launching Kunobi or when kunobi_status shows stale data. Returns the fresh connection status for all variants.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/refresh.ts:47-55 (handler)The actual handler for the 'kunobi_refresh' tool: calls manager.refresh() to force reconnection and returns formatted status for all variants.
async () => { await manager.refresh(); return { content: [ { type: 'text' as const, text: formatRefreshResult(manager) }, ], }; }, ); - src/tools/refresh.ts:38-46 (schema)Schema definition for 'kunobi_refresh': no input parameters, read-only hint, with a description explaining its purpose.
{ description: 'Force an immediate reconnect attempt across all configured Kunobi variants. Use this after launching Kunobi or when kunobi_status shows stale data. Returns the fresh connection status for all variants.', annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false, }, }, - src/tools/refresh.ts:32-35 (registration)The registerRefreshTool function that registers 'kunobi_refresh' with the MCP server.
export function registerRefreshTool( server: McpServer, manager: VariantManager, ): void { - src/tools/refresh.ts:5-30 (helper)Helper function that formats the refresh result into a human-readable string showing status per variant and installed variants.
function formatRefreshResult(manager: VariantManager): string { const states = manager.getStates(); const lines: string[] = ['Refresh complete. Current status:']; for (const [variant, state] of states) { const icon = state.status === 'connected' ? '✓' : '✗'; const detail = state.status === 'connected' ? `connected, ${state.tools.length} tools` : state.status === 'connecting' ? 'connecting...' : state.status === 'disconnected' ? 'disconnected (reconnecting)' : 'not running'; lines.push( ` ${icon} ${variant.padEnd(10)} (port ${state.port}) — ${detail}`, ); } const installed = findKunobiVariants(); if (installed.length > 0) { lines.push('', `Installed on system: ${installed.join(', ')}`); } return lines.join('\n'); } - src/server.ts:154-156 (registration)Where registerRefreshTool is called to wire 'kunobi_refresh' into the MCP server.
registerRefreshTool(server, manager); registerLaunchTool(server); registerCallTool(server, manager);