Skip to main content
Glama

Generate label sheet PDF

generate_label_sheet
Read-onlyIdempotent

Use 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.

Input Schema

NameRequiredDescriptionDefault
fileNoOptional 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).
kindNoWhat 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.
sortNoOrder of the labels: none (list order, default), zip, name or last_name.
alignNoText alignment: left (default for addresses) or center (default for badges, place cards and square labels).
sheetNoExcel sheet name to read, e.g. Guests. Default: the first sheet with data.
copiesNoCopies of each label, e.g. 2. Default 1.
labelsNoThe 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"}.
sheetsNoWith fill_sheet: how many full sheets to fill, e.g. 3. Default 1.
columnsNoOptional column mapping when the headings are unusual: heading text or column letter per field, e.g. {"name":"Guest","address1":"Mailing Street","zip":"F"}.
outlineNoDraw a thin grey outline around each label (for printing on plain paper). Default false.
start_atNoLabel 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.
templateNoLabel 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.
uppercaseNoUSPS style: all capitals without periods or commas (e.g. SPRINGFIELD IL 62704). Default false.
fill_sheetNoRepeat a single label (a return address) to fill the whole sheet. Default true for kind return_address with one label.
has_headerNoWhether the file's first row is column headings. Default: detected (headings like Name, Address, ZIP or a first row without numbers).
max_font_sizeNoLargest font size in points; long lines shrink below it to fit, e.g. 12. Default depends on the sheet (11 for 5160).
alignment_testNoAdd 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_lineNoPrint the first line (the name) in bold. Default false for addresses; badges and place cards print the name in bold.
include_countryNoAlso print USA on US addresses that have a country. Default false (non-US countries always print).
remove_duplicatesNoPrint identical labels only once. Default false (duplicates are counted and reported).

Output Schema

NameRequiredDescriptionDefault
fontYes
kindYes
notesYes
copiesYes
issuesYes
sourceYes
outlineYes
previewYes
recordsYes
start_atYes
templateYes
downloadsYes
file_nameYes
pdf_pagesYes
duplicatesYes
fill_sheetYes
columns_usedYes
issues_countYes
label_sheetsYes
labels_totalYes
alignment_test_pageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds substantial behavior: output is a paginated vector PDF aligned to the label stock, with USPS address lines, shrink-to-fit fonts, start position for partly used sheets, optional alignment test page and outlines. It also discloses what is returned (preview, PDF, cleaned CSV), which is the key non-obvious trait.

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

Conciseness4/5

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

Front-loaded with the use case, then capabilities, then exclusions — a sensible order. It is long and the enumerated label-stock list and feature run-on are dense, but nearly every clause maps to an actual parameter, so little is wasted.

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

Completeness5/5

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

For a 20-parameter tool with nested objects, this description covers input sources, output artifacts, layout alignment, and out-of-scope capabilities; the output schema handles return details and annotations cover safety. Nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds real semantic framing beyond the schema by explaining the coherent modes: typed labels vs uploaded CSV/XLSX, return-address fill mode, copies per label, and the start-position workflow for partially used sheets. It doesn't give per-parameter detail, but the capability grouping helps an agent plan the call.

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?

States a specific verb and artifact: builds a vector PDF label sheet that lines up with a named label layout, on US Letter. The list of supported products (5160/8160, 5161-5168, place cards, etc.) and input modes makes it unmistakably distinct from check_mailing_list and find_label_template.

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?

Opens with an explicit trigger sentence and a rich set of quoted user phrasings ("print address labels from excel", "start printing at label 7 on a used sheet") that map directly to invocation. Negative scope is stated (no postage, no barcodes, no nutrition labels), but it never routes to the sibling tools find_label_template or check_mailing_list, so alternatives are left implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources