Agent context
Microsoft Business Central models
4 SQL models that turn the raw Microsoft Business Central tables into the reports people ask about. Deploy them in Weld and your agent queries the definitions behind every number.
How the set is built
- 4Raw tables
- 4Staging
- 5Core
- 4Analytics
Staging cleans each raw table once, core holds the logic, and analytics is the table dashboards and agents read.
- General ledgerThe general ledger: every G/L entry with its account, category and company. Recreates the G/L Entries list (and the Detail Trial Balance report) in Business Central.grain: one row per G/L entry (company x entry number) · 3 raw tables
- Profit and loss by monthIncome statement by month, at account level with Business Central's account category (Income, Cost of Goods Sold, Expense) and subcategory alongside for roll-up in BI.grain: one row per company x month x account, income statement accounts only · 3 raw tables
- Receivables agingAccounts receivable aging at invoice level: every open posted sales invoice with a remaining amount, bucketed by days past due as of today.grain: one row per open sales invoice (company x invoice) · 2 raw tables
- Trial balance by monthTrial balance per month: for every company, account and month, the opening balance, the month's debits and credits, and the closing balance. Recreates Business Central's Trial Balance report (net change and balance at date) for each month end.grain: one row per company x month x account, from the company's first posting month to the current month (or the latest future-dated month), including months in which an account had no postings · 3 raw tables
- Weld or dbt
- The same SQL in both dialects. Sync the folder with GitHub Sync, or copy the dbt models into your project.
- Check before you rely on it
- Reconcile a month against Microsoft Business Central's own reports first. Each model's notes say what the synced data can and can't support.
Connect Microsoft Business Central.
Your agents start with context.
Sync Microsoft Business Central to your warehouse, deploy these models, and query them from Claude, Cursor or ChatGPT over MCP. Free for 14 days, no credit card.