preview_library_import
Stage and preview importing one sheet from an attached company file into the cost library: map columns, review staged rows and answer questions before pressing Import. No library changes occur.
Instructions
Stage one sheet of an attached company file as a cost book import (kind: items = materials, labor_classes, crews, equipment, productivity, cost_codes, taxes). mapping: supported field -> the sheet's exact column name (items: name, code, category, unit, unit_cost, cost_code, vendor, taxable, suggested_waste, coverage; labor_classes: name, base_wage, burden_pct, fringe, overtime_multiplier; equipment: name, rate, period, hours_per_period, vendor, cost_code; item category is one of labor, material, equipment, subcontract, other, travel, so leave a free-text category column unmapped; productivity: name, labor_label, crew_id, units_per_hour, unit; cost_codes: name, code, parent_id, trade; taxes: name, rate_pct, categories, basis; crews: name, labor_class_id, count, equipment_id, equipment_count). Map only columns that truly mean the field; never invent or compute prices. labor_classes also take day_rate and hours_per_day for a crew-day rate (the preview asks the person to confirm the hourly conversion). The result lists every staged row (name, unit, price) and the questions the person must answer (rows left out as subtotals or headings, two prices on a line, an uncertain scan, a crew-day conversion, a price that looks like a total): ask them, then preview again with resolutions {question type or "type:row": choice id, or {action, value}}; never choose for them. filter keeps rows whose column equals one of the values (for a sheet over 20,000 rows, or "only Division 09"). Nothing in the library changes: the person reviews the preview in the chat and presses Import. Report added, changed and unchanged counts, every error in plain words, and prices that change. Import materials, labor, equipment and productivity before crews and assemblies. Lands as pencil (pending the estimator's review), never ink.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"intake_id": "<intake_id>",
"sheet": "<sheet>",
"kind": "<kind>"
},
"name": "preview_library_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| sheet | Yes | ||
| filter | No | ||
| mapping | No | ||
| intake_id | Yes | ||
| header_row | No | ||
| resolutions | No |