Skip to main content
Glama

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

NameRequiredDescriptionDefault
kindYes
sheetYes
filterNo
mappingNo
intake_idYes
header_rowNo
resolutionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.23

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations say readOnlyHint=false but destructiveHint=false; the description resolves that tension by explaining the tool only stages rows and that 'Nothing in the library changes' until the person presses Import, and that results 'Lands as pencil... never ink'. It also discloses the return contents (every staged row with name, unit, price, plus open questions), the requirement to re-invoke with resolutions, and the strong prohibitions 'never invent or compute prices' and 'never choose for them'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is one dense block of nested parentheses and semicolon-separated field lists that is hard to scan. The per-kind field enumerations earn their place given 0% schema coverage, yet several clauses (reporting counts, errors, price changes) are packed into the same run-on paragraph rather than structured as separate guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter tool with nested objects and no output schema, the description covers the workflow, the per-kind field vocabulary, the resolution loop, and even what the preview result contains, which substitutes for the missing output schema. It falls short on header_row and on how intake_id ties to an attachment, which an agent must infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full load, and it does so for most parameters: it enumerates the exact mappable fields per kind, explains the mapping direction (supported field -> the sheet's exact column name), defines resolutions keys (question type or 'type:row') and value shapes, and defines filter as column-equals-one-of-values. Gaps remain: header_row is never mentioned, and sheet/intake_id are only implied by 'an attached company file'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause names a specific verb, resource and scope: 'Stage one sheet of an attached company file as a cost book import', then enumerates the exact kinds supported (items, labor_classes, crews, equipment, productivity, cost_codes, taxes). An agent can distinguish this from generic preview siblings like preview_takeoff_sheets or preview_estimate_template because the resource here is the company cost book, not a takeoff or estimate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real sequencing guidance ('Import materials, labor, equipment and productivity before crews and assemblies') and a workflow loop ('ask them, then preview again with resolutions'). It also scopes the filter to specific situations ('for a sheet over 20,000 rows, or "only Division 09"'). What it lacks is an explicit statement of when NOT to use this tool or a named alternative sibling to route to instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools