pohoda_status
Check POHODA mServer status to verify readiness for requests by monitoring queue count, server state, and address.
Instructions
Get POHODA mServer status: processing queue count, server state (idle/working), and server address. Use to check if the server is ready to accept requests.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/system.ts:41-59 (registration)Registration and implementation of the pohoda_status tool handler.
server.tool( "pohoda_status", "Get POHODA mServer status: processing queue count, server state (idle/working), and server address. Use to check if the server is ready to accept requests.", {}, async () => { try { const xml = await client.getStatus(); const data = parseStatusXml(xml); const lines: string[] = []; if (data.processing != null) lines.push(`Processing queue: ${data.processing}`); if (data.status != null) lines.push(`Server status: ${data.status}`); if (data.server != null) lines.push(`Address: ${data.server}`); if (data.message) lines.push(`Message: ${data.message}`); return ok(lines.length > 0 ? lines.join("\n") : xml); } catch (e) { return err((e as Error).message); } } );