Autofit columns
autofit_columnsAdjusts each spreadsheet column width to fit its longest value, constrained by minimum and maximum limits, so cells display fully without manual resizing.
Instructions
Set each column's width to fit its longest value, within min_width..max_width.
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": {
"sheet": "<sheet>"
},
"name": "autofit_columns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File path or preloaded name (list_configured_files). Omit if only one file is preloaded. | |
| sheet | Yes | Sheet name (case-sensitive). | |
| backup | No | Save a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true). | |
| reason | No | Why; kept in the change log (XLSX_MCP_CHANGE_LOG=true). | |
| padding | No | Characters added to the longest value. | |
| max_width | No | Widest width, in characters. | |
| min_width | No | Narrowest width, in characters. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||