terminal_get_sessions
Retrieve active terminal sessions from the Electron application to monitor and manage command execution processes.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:388-410 (registration)Registration of the 'terminal_get_sessions' tool, including inline schema (empty input) and handler function that fetches active sessions from the API and returns them as JSON text.server.tool( "terminal_get_sessions", {}, async () => { try { // Check if server is running, start if not if (!(await isServerRunning())) { await startElectronProcess(); } const response = await axios.get(`${apiBaseUrl}/sessions`); const result = response.data; return { content: [{ type: "text", text: `Active sessions:\n\n ${JSON.stringify(result, null, 2)}`, exitCode: 0 }] }; } catch (error) { return formatErrorResponse(error); } } );