Generate label sheet PDF
generate_label_sheetUse this when the user wants to print address labels, mailing labels, return address labels, shipping labels, name badges or name tags, place cards, or file folder labels from a list or a spreadsheet ("avery 5160 template", "print address labels from excel", "mailing labels from excel", "make return address labels", "print christmas card addresses on labels", "start printing at label 7 on a used sheet"). Builds a vector PDF on US Letter that lines up with the chosen label sheet (5160/8160 30 per sheet, 5161, 5162, 5163, 5164, 5168, 5126, 5167, 5195, 5366, 5395, 5390, 22805, 5302 place cards), with USPS address lines, font shrink-to-fit, a start position for partly used sheets, copies per label, return-address fill mode, an optional alignment test page and outlines. Accepts typed labels or an uploaded CSV/XLSX file. Returns a preview, the PDF and a cleaned CSV. Does not buy postage, print USPS shipping labels with postage, make barcodes, or design nutrition labels.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "generate_label_sheet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Optional uploaded mailing list: a CSV, TSV or Excel .xlsx file with one row per label, e.g. contacts.csv or Christmas list.xlsx. Name, address, city, state and ZIP columns are detected from the headings (Google Contacts, Outlook, Etsy and Shopify exports work). | |
| kind | No | What the labels are for: address (mailing labels, default), return_address, shipping, name_badge, place_card, file_folder or general text. Sets the default sheet and text style. | |
| sort | No | Order of the labels: none (list order, default), zip, name or last_name. | |
| align | No | Text alignment: left (default for addresses) or center (default for badges, place cards and square labels). | |
| sheet | No | Excel sheet name to read, e.g. Guests. Default: the first sheet with data. | |
| copies | No | Copies of each label, e.g. 2. Default 1. | |
| labels | No | The typed or pasted list, one item per label. Either address objects, e.g. [{"name":"Jane Smith","address1":"123 Main St","address2":"Apt 4B","city":"Springfield","state":"IL","zip":"62704"}], or plain text labels with lines separated by \n, e.g. ["Jane Smith\n123 Main St\nSpringfield, IL 62704"]. For name badges use {"name":"Ana Lopez","title":"Engineer","company":"Acme"}. | |
| sheets | No | With fill_sheet: how many full sheets to fill, e.g. 3. Default 1. | |
| columns | No | Optional column mapping when the headings are unusual: heading text or column letter per field, e.g. {"name":"Guest","address1":"Mailing Street","zip":"F"}. | |
| outline | No | Draw a thin grey outline around each label (for printing on plain paper). Default false. | |
| start_at | No | Label position to start on for a partly used sheet, counted left to right then top to bottom, e.g. 7 skips the first 6 labels. Default 1. | |
| template | No | Label sheet product number, e.g. 5160 (also 8160, 18160, 5260...), 5163 or 5395. Supported layouts: 5160, 5161, 5162, 5163, 5164, 5168, 5126, 5167, 5195, 5366, 5395, 5390, 22805, 5302. Default by kind: address 5160, return_address 5167, shipping 5163, name_badge 5395, place_card 5302, file_folder 5366. | |
| uppercase | No | USPS style: all capitals without periods or commas (e.g. SPRINGFIELD IL 62704). Default false. | |
| fill_sheet | No | Repeat a single label (a return address) to fill the whole sheet. Default true for kind return_address with one label. | |
| has_header | No | Whether the file's first row is column headings. Default: detected (headings like Name, Address, ZIP or a first row without numbers). | |
| max_font_size | No | Largest font size in points; long lines shrink below it to fit, e.g. 12. Default depends on the sheet (11 for 5160). | |
| alignment_test | No | Add a test page first with each label outlined and numbered, to print on plain paper and hold against a label sheet. With no list, the PDF is only the test page. Default false. | |
| bold_first_line | No | Print the first line (the name) in bold. Default false for addresses; badges and place cards print the name in bold. | |
| include_country | No | Also print USA on US addresses that have a country. Default false (non-US countries always print). | |
| remove_duplicates | No | Print identical labels only once. Default false (duplicates are counted and reported). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| font | Yes | ||
| kind | Yes | ||
| notes | Yes | ||
| copies | Yes | ||
| issues | Yes | ||
| source | Yes | ||
| outline | Yes | ||
| preview | Yes | ||
| records | Yes | ||
| start_at | Yes | ||
| template | Yes | ||
| downloads | Yes | ||
| file_name | Yes | ||
| pdf_pages | Yes | ||
| duplicates | Yes | ||
| fill_sheet | Yes | ||
| columns_used | Yes | ||
| issues_count | Yes | ||
| label_sheets | Yes | ||
| labels_total | Yes | ||
| alignment_test_page | Yes |