Sheet to PDF
sheet_to_pdfUse this when the user wants to turn a spreadsheet, CSV or Excel sheet into a PDF, print a table with the header row on each page, or fit a wide sheet on one page width. Takes one attached CSV, TSV or .xlsx file (or CSV text), an optional sheet name and column list, paper (letter, a4, legal, a3), orientation, font size 7-12, row numbers, page numbers and a title, and returns a PDF download with the page count and a check that each printed cell was found again in the new PDF. Excel values print as displayed. Does not print charts, images, cell colors or merged-cell layouts, and does not open legacy .xls files. Do not use for PDF to Excel conversion.
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": "sheet_to_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | The sheet to print: a CSV, TSV or Excel .xlsx file, e.g. inventory.xlsx or contacts.csv. | |
| paper | No | Paper size, e.g. a4. Default letter. | |
| sheet | No | For .xlsx: the sheet name to print, e.g. "Q3 Sales". Default: the first visible sheet. | |
| title | No | Optional title above the table on page 1, up to 120 characters, e.g. "Inventory, November 2026". | |
| columns | No | Print only these columns, in this order, by header name or column letter, e.g. ["Name", "Email", "Total"]. Default: all columns. | |
| csv_text | No | Instead of a file: the table as CSV text with a header row, e.g. "Name,Qty\nApples,3\nPears,5". Use either file or csv_text. | |
| delimiter | No | For CSV text: the separator, e.g. semicolon. Default: detected from the file. | |
| fit_width | No | true (default): when columns are too wide, the font gets smaller (down to 7 pt) before cells wrap. false: keep font_size and wrap cell text. | |
| font_size | No | Font size in points from 7 to 12, e.g. 9 (default). | |
| has_header | No | true (default): the first non-empty row is the header row (one-cell title rows above it are printed as the title). false: columns are named Column A, Column B, ... | |
| header_row | No | The sheet row (or CSV line) number that holds the header, e.g. 3 when rows 1-2 hold a title. Rows above it are left out. Default: detected. | |
| orientation | No | Page orientation, e.g. landscape. auto (default) picks portrait when the columns fit, else landscape. | |
| row_numbers | No | true adds a # column with row numbers 1, 2, 3. Default false. | |
| page_numbers | No | true (default) prints Page 1 of N in each page footer. | |
| include_hidden | No | For .xlsx: true also prints hidden rows and columns. Default false (as Excel prints). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| check | Yes | ||
| notes | Yes | ||
| pages | Yes | ||
| paper | Yes | ||
| sheet | Yes | ||
| columns | Yes | ||
| preview | Yes | ||
| cut_cells | Yes | ||
| data_rows | Yes | ||
| downloads | Yes | ||
| font_size | Yes | ||
| orientation | Yes | ||
| output_name | Yes | ||
| preview_count | No | ||
| output_size_kb | Yes | ||
| printed_columns | Yes | ||
| expires_in_hours | Yes | ||
| replaced_characters | Yes | ||
| printed_columns_count | No |