Generate CSVBox Sheet Functions
generate_sheet_functionsTurn a natural-language prompt into CSVBox virtual columns, validations, and data transforms. Returns JSON for review before applying with patch_sheet.
Instructions
Author CSVBox virtual_columns, validation_functions, and data_transforms from a natural-language prompt using a configured LLM. Does NOT call the CSVBox API — it returns JSON so you can REVIEW the generated JavaScript before applying it with patch_sheet. Collections the request does not imply are omitted, never returned as empty arrays. Returns { virtual_columns?, validation_functions?, data_transforms?, source, validation }. Requires ANTHROPIC_API_KEY or OPENAI_API_KEY; without one it returns an error pointing to the csvbox_sheet_functions MCP prompt. Input: { prompt, sheet? }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | No | The existing sheet the functions will be applied to. Supplying it lets the model reference real column names and lets validation check those references. CSVBox exposes no read endpoint, so this must be passed inline. | |
| prompt | Yes | Natural-language description of the functions to author, e.g. "add a virtual column joining first and last name, and validate that every email contains an @". |