get_table_sample_data
Retrieve sample rows from a specified table to test Handlebars templates with real values. Validate template outputs by fetching up to 10 example records, ensuring correct variable usage.
Instructions
Get sample row data from a table for template testing.
Retrieves a few sample rows from the table that can be used to test Handlebars templates. Use this to see real values that would be available in templates.
Args: table_name: Name of the table. limit: Number of sample rows to return (default: 3, max: 10).
Returns: JSON with sample rows and their column values.
Example: get_table_sample_data("Image", 2) -> { "table": "Image", "sample_rows": [ {"RID": "1-ABC", "Filename": "scan001.jpg", "Subject": "2-DEF", ...}, {"RID": "1-XYZ", "Filename": "scan002.jpg", "Subject": "2-DEF", ...} ], "template_test_suggestion": "Try: {{{Filename}}} - Subject: {{{Subject}}}" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| table_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |