validate_chart_code
Validates user-generated chart code to meet required structure and optionally opens a PyCafe preview in a browser for immediate verification.
Instructions
Validate the chart code created by the user and optionally open the PyCafe link in a browser.
Returns:
ValidationResults object with status and dashboard details
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": {
"chart_config": "<chart_config>",
"data_info": "<data_info>"
},
"name": "validate_chart_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto_open | No | Whether to automatically open the PyCafe link in a browser | |
| data_info | Yes | Metadata for the dataset to be used in the chart | |
| chart_config | Yes | A ChartPlan object with the chart configuration |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| message | Yes | ||
| pycafe_url | Yes | ||
| python_code | Yes | ||
| browser_opened | Yes |