pohoda_company_info
Retrieve company and accounting unit details from POHODA accounting software, including company name, database name, accounting period, and year.
Instructions
Get POHODA company/accounting unit info: company name, database name, accounting period, and year. Requires authenticated connection.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/system.ts:61-78 (handler)Handler for the pohoda_company_info tool, which fetches and parses company information using a POHODA client.
server.tool( "pohoda_company_info", "Get POHODA company/accounting unit info: company name, database name, accounting period, and year. Requires authenticated connection.", {}, async () => { try { const xml = await client.getCompanyInfo(); const data = parseCompanyInfoXml(xml); const lines: string[] = []; if (data.companyName) lines.push(`Company: ${data.companyName}`); if (data.databaseName) lines.push(`Database: ${data.databaseName}`); if (data.accountingPeriod) lines.push(`Accounting period: ${data.accountingPeriod}`); if (data.year) lines.push(`Year: ${data.year}`); return ok(lines.length > 0 ? lines.join("\n") : xml); } catch (e) { return err((e as Error).message); } }