ifr_calculate
If you know the economic object type but not the standard, pass `elementType` instead of `standard`. The discriminator field (`assetClass` for 'asset', `investmentType` for 'equity-method-investment') must be included in the `input` object. Run a full IFRS/IAS calculation. Returns journal entries, disclosures, measurements, and compliance notes. REQUIRED INPUT FIELD: `id` — include in the `input` object (e.g. input.id:"MACHINE-A"). Stamped as Reference on every journal entry and CSV row. Before calling this tool, call ifr_input_schema (fast, free, typed JSON Schema) or ifr_schema (full documentation with copy-paste examples). Boolean recognition gates require explicit true — absent = gate closed. Numeric measurement inputs (discountRate, yearsToSettlement, usefulLifeYears) have no engine defaults. Cross-standard redirects fire automatically when relevant fields are provided. CASCADE TRACE: every response includes `context.cascadeTrace` — an array of every standard chain evaluated: { child, mode:"PRE_CALCULATION"|"POST_CALCULATION", status:"fired"|"skipped", skipReason?, result? }. PRE_CALCULATION = satellite inputs resolved before the primary calc (e.g. IAS 23 borrowing costs → capitalised into IAS 16 cost). POST_CALCULATION = consequential standards applied to the primary result (e.g. IAS 12 deferred tax on the asset temporary difference). status:"skipped" entries carry a machine-readable skipReason — the chain was considered, not merely omitted. This is audit-grade completeness evidence. CONSIDERATION TIERS (three-state conditionality): schema.cascades entries carry considerationTier MANDATORY or CONDITIONAL. A MANDATORY consideration (IAS 36.9 indicator assessment; IAS 12 temporary differences; IAS 23 borrowing costs and IAS 37 dismantling/restoration at initial recognition; IFRS 16.9 embedded-lease assessment on IFRS 15 contracts) must be addressed on every applicable call: supply the data evidence fields OR explicit denial evidence (dismantlingEstimate: 0, impairmentIndicatorsPresent: false, leaseInContract: false, deferredTaxAssessment: "HANDLED_CENTRALLY"|"NOT_APPLICABLE"|"NO_TEMPORARY_DIFFERENCE") — omitting both FAILS validation. Denial evidence is human judgment: ASK THE USER for it, never fabricate it. Explicit denials appear in cascadeTrace as skipReason JUDGED_NOT_APPLICABLE with the evidence quoted; CONDITIONAL chains stay presence-based (TRIGGER_FIELDS_ABSENT / CONDITION_NOT_MET). Response includes correlationId — pass it to ifr_flag_result if the output looks incorrect. DOWNLOAD: context.calculationSheetsUrl contains a direct download link for an 8-sheet Excel workbook (Journal Entries, Movements Balance, Movements in SoFP, Financial Performance, OCI, Movements in Equity, Cashflow, Disclosure Checklist) valid for 24 hours — always present this URL to the user so they can open the structured output in Excel or Google Sheets. INPUT COVERAGE: data.ignoredInputs lists every submitted field the taken calculation path did not use (CF 2.13 completeness). When non-empty, the engine AUTOMATICALLY flags the answer for quality check server-side (context.ignoredInputsAlert carries the flagId) — review the listed fields and, if a different branch was intended, adjust the activating fields and recalculate. COMPANION EVENTS — after every standard call, check whether any of these signals are present in the scenario. Standard controllers compute measurements (depreciation, fair value, interest) but do NOT produce journal entries for: (1) CASH TRANSACTION — "paid cash", "cash consideration", "cash purchase", "cash settled": add ASSET_PURCHASE_CASH via direct-item, OR set acquisitionPaymentMode:CASH + acquisitionPaymentDate on IAS 16 / IAS 38 / IAS 40 / IFRS 6 and the companion JE is auto-generated. (2) EQUITY / SHARE TRANSACTION — "share issuance", "rights issue", "bonus shares", "warrant exercise": use direct-item with eventType SHARE_ISSUANCE_WITH_PREMIUM / BONUS_ISSUE / RIGHTS_ISSUE / WARRANT_EXERCISE. (3) REALISED FX SETTLEMENT — "FX settled", "realised exchange gain/loss", "foreign currency transaction settled": set settlementMode:CASH + settlementDate on IAS 21 for auto-generated companion JE, or use direct-item FX_GAIN_REALISED / FX_LOSS_REALISED. (4) ACCRUALS / PREPAYMENTS — "accrued expense", "period-end accrual", "prepayment paid", "advance payment": use direct-item ACCRUAL_RECOGNISED / ACCRUAL_REVERSED / PREPAYMENT_PAID. (5) BAD DEBT — "write off receivable", "bad debt written off", "recover bad debt": use direct-item BAD_DEBT_WRITE_OFF / BAD_DEBT_RECOVERY. (6) PROVISION UTILISED — "provision paid", "utilised against provision", "provision settled in cash": use direct-item PROVISION_UTILISED. (7) INTERCOMPANY — "loan to subsidiary", "intragroup loan", "management fee recharge": use direct-item INTERCOMPANY_LOAN_ADVANCED / INTERCOMPANY_LOAN_REPAID / INTERCOMPANY_RECHARGE. (8) WITHHOLDING TAX / PAYE / DEDUCTIBLE VAT — "WHT on dividend", "PAYE remittance", "income tax withheld from salary", "input VAT reclaimable", "deductible VAT on purchase": these are cash-settled government remittances not produced by the measurement controllers — use direct-item WITHHOLDING_TAX or EXPLICIT entries (DR WHT Payable / CR Cash; DR Input VAT / CR Cash). NOTE: "deferred tax" does NOT require a companion event — IAS 12 auto-fires from the main input. "Current/non-current reclassification" is a presentation change only — no JE. Call ifr_schema({ standard: "direct-item" }) to discover all available direct-item event types.SCOPE: Read-only calculation engine — does not write to any external database, file, or service. Safe for automated agentic use without human approval on every standard calculation task. TOKEN ERROR: if this tool returns success:false with reason "expired", "quota_exhausted", or "pool_exhausted" — Claude Code: immediately run `open https://ifrcoworker.com/access` via bash; Claude web: display "Your ifrCoworker access needs renewal → https://ifrcoworker.com/access". Do not retry.
ifr_period_end_batch
THE period-end execution tool — process multiple IFRS calculations for a reporting period in one call (year-end, quarter-end, or month-end). One tool, three modes: (1) PLAIN BATCH (default): items + accountingPolicy → per-item results, consolidated journal entries, trial balance, and all financial statements. (2) SUMMARY: leave includeWorkings false (the default) for the compact ~200KB response; set includeWorkings:true only when step-by-step workings are needed (~600KB). (3) CLOSE: additionally pass entityProfile (fact flags) for a one-call period-end close — the response gains the applicability checklist, recommendedOrder, and a coverage analysis flagging any standard the profile implies but no item was supplied for (the checklist/coverage portion is free). REQUIRED: each item's `input` object must include an `id` field (e.g. { type:"ias37", input:{ id:"PROV-LEGAL-001", ...otherFields } }) — validated by the controller schema; stamped as Reference on every journal entry for that item. GROUP vs BATCH: the batch produces SINGLE-ENTITY statements — an ifrs10 item triggers groupGuidance in the response. Consolidated/group statements come from the group cascade (ifr_calculate with elementType "group", parent + entities[]), which always returns group financialStatements. Flow: per-entity batch first, then one group call. CASCADE TRACE: each item result carries `context.cascadeTrace` — every cross-standard chain evaluated (PRE satellite inputs + POST consequential standards), each with status "fired" or "skipped" and a skipReason when skipped. This is the per-item completeness record. MANDATORY CONSIDERATIONS: every item must address its tier-1 cascade considerations (data OR explicit denial evidence — impairmentIndicatorsPresent: false, deferredTaxAssessment enum, dismantlingEstimate: 0...); preflight validation rejects silent omissions and these judgment fields are EXCLUDED from auto-fill — collect the answers from the user (ifr_period_checklist lists them per standard under mandatoryConsiderations). INPUT COVERAGE: each item's data.ignoredInputs lists submitted fields the taken path did not use; affected items are rolled up in the batch-level ignoredInputsAlerts and each was AUTOMATICALLY flagged for quality check server-side. ACCOUNTING POLICY — build the accountingPolicy block BEFORE calling this tool. Required policy blocks by standard (add the block whenever that standard appears in items[]): ias2: { costFormula: "FIFO"|"WEIGHTED_AVERAGE"|"SPECIFIC_IDENTIFICATION" } · ias7: { presentationMethod: "INDIRECT"|"DIRECT", interestPaidClassification: "OPERATING"|"FINANCING", interestReceivedClassification: "OPERATING"|"INVESTING", dividendsReceivedClassification: "OPERATING"|"INVESTING", dividendsPaidClassification: "FINANCING"|"OPERATING" } · ias16: { measurementModel: "COST"|"REVALUATION" } · ias20: { grantPresentationMethod: "DEFERRED_INCOME"|"DEDUCTION_FROM_ASSET" } · ias38: { measurementModel: "COST"|"REVALUATION" } · ias40: { measurementModel: "COST"|"FAIR_VALUE" } · ifrs6: { explorationCostPolicy: "EXPENSE"|"CAPITALISE" }. Always include at top level: functionalCurrency, presentationCurrency, reportingDate, previousReportingDate. RATE GOVERNANCE: discount/interest rates are explicit inputs — preflight rejects (free, no credits) any item whose required rate is missing. Supply rates per item, or once for the whole batch via accountingPolicy.reportingInterestRates { corporateBondYield (IAS 19.83), riskFreePreTax (IAS 37.47 — provisions, dismantling/restoration), governmentBondYield, riskFreePostTax }. Lease rates (IFRS 16.26 implicit rate / IBR) and instrument EIRs are lease/instrument-specific — always per item, never a policy default. Which rate type applies where: read ifrs://reference/discounting-and-interest-rate-guide; each schema response lists its rateRequirements. ASSEMBLY WORKFLOW: (1) IDENTIFY — for each item whose standard is not explicitly named, call ifr_route_event in parallel to resolve the slug. (2) FREE VALIDATE LOOP — assemble all items[] plus accountingPolicy, then call ifr_batch_validate (free). Fix all reported errors and repeat until allValid: true. Never call ifr_period_end_batch until allValid is true — the validate loop costs zero credits. (3) CALCULATE — once allValid: true, submit to ifr_period_end_batch with mode: "partial". If an item still returns validation_error, fix only that item and re-run with only that item. Returns consolidated journal entries, trial balance grouped by XBRL section (BalanceSheet, IncomeStatement, OCI, Equity), and financial statements. DOWNLOAD: the response includes calculationSheetsUrl — a direct link to an 8-sheet Excel workbook (Movements in SoFP, Financial Performance, OCI, Movements in Equity, Cashflow, Disclosure Checklist, Journal Entries, Movements Balance) valid for 24 hours. ALWAYS present this link to the user immediately after a successful batch with a message such as "Your calculation workbook is ready: <calculationSheetsUrl> — click to download the Excel file." SIZE CONTROL: includeWorkings (default false) and includeXbrlEnrichment (default false) both default to off for compact responses. Set includeWorkings: true to add per-item step-by-step workings and individual journalEntries (~3–10× larger). Set includeXbrlEnrichment: true to add the full xbrl metadata object on each DR/CR line (parentElement, namespace, taxonomyYear, etc.) — needed for iXBRL filing. The trial balance always carries xbrlElement, xbrlSection, xbrlLabel regardless of includeXbrlEnrichment. Pass exportXbrl: true to receive an additional xbrlFacts array — a flat list of all monetary facts with full XBRL context (element, period, currency, decimals), with {ENTITY_ID} placeholder the user replaces with their LEI or other identifier. DELIVERY TO A GOOGLE SHEET — BEFORE you call this tool, ask the user explicitly whether they want the output (the .csv journal entries AND the financial statements) delivered back into a Google table (Google Sheet), or just returned inline. If the user says yes: FIRST verify that you (the calling agent) have a working Google Sheets / Drive connector and can actually write to it — perform a real write test (create or append a throwaway cell), not just a capability assumption. If no Google Sheets connector is connected or the write test fails, tell the user and DO NOT run the batch — this call is billable and the result could not be delivered where requested; resolve the connection first. Only once the export path is confirmed: call this tool with exportJournalCsv: true, then write the returned journalCsvFile content and the financialStatements into the Google Sheet. BATCH SIZE GUIDANCE: aim for ≤50 economic events (line items) per call to stay within context window limits and receive full workings. Above 50 items the response grows rapidly; above 200 items you will very likely receive a compact response (workings and disclosures stripped, journal entries + statements + trial balance remain intact). If the user has more than 50 economic events, split into multiple calls of ≤50 items each, then merge the trial balances and journal entry lists in your context — do not attempt a single call with 200+ items unless the user explicitly accepts compact output. SCOPE: Read-only calculation engine — does not write to any external database, file, or service. Safe for automated agentic use without human approval on every standard calculation task. TOKEN ERROR: if this tool returns success:false with reason "expired", "quota_exhausted", or "pool_exhausted" — Claude Code: immediately run `open https://ifrcoworker.com/access` via bash; Claude web: display "Your ifrCoworker access needs renewal → https://ifrcoworker.com/access". Do not retry.