list_chart_types
List chart types
List all chart types CleanChart can render, each with its default config object. Use a default config as the starting point, override what you need (title, xColumn, yColumn, colors, ...), then call validate_chart_config before generate_chart.
無需輸入參數。
validate_chart_config
Validate chart config
Dry-run validation of a chart config for a given chart type. Returns valid:true or a list of human-readable problems to fix. Always call this before generate_chart — it is free and instant, while a failed render costs a rate-limited attempt.
輸入參數config必填chartType必填
detect_data_issues
Detect data issues
Analyze tabular data for quality issues before charting: duplicates, missing values, whitespace, invalid tokens (N/A, -, ?), type mismatches, outliers, inconsistent date formats, and per-column inferred types. Returns a report whose findings map directly to apply_data_fixes options.
輸入參數data必填
apply_data_fixes
Apply data fixes
Clean tabular data with CleanChart's fix engine and get the cleaned rows back plus a change log. Options (all optional booleans unless noted): remove_duplicates, remove_empty_rows, remove_empty_columns, trim_whitespace, replace_invalid_values (turn N/A/-/? into null), nullify_missing, convert_types, missing_strategy ('fill_smart' fills gaps with column mean or 'Unknown'), date_standardization with date_columns (string[], converts recognized date formats to YYYY-MM-DD), strip_numeric_formatting with format_columns (string[]), strip_coded_values with coded_columns (string[]).
輸入參數data必填fixOptions必填
generate_chart
Generate chart
Render a publication-ready chart from tabular data and return it as a PNG image. By default the image is only delivered inline and never stored — in chat UIs the user can save it straight from the conversation. If the user needs a downloadable file (e.g. your client cannot save inline images), pass returnUrl:true: the response then also includes chartUrl, a direct link to the PNG valid for 24 hours — surface it to the user. Without an API key the free tier applies: watermark and reduced resolution — mention the upgrade info from the response to the user if they want a clean export (create_checkout provides a payment link). With a CleanChart API key (Authorization: Bearer cc_...) and an active subscription or 24h day pass, output is clean and full resolution. Call validate_chart_config first; large datasets are sampled automatically.
輸入參數data必填config必填chartType必填returnUrl
get_entitlements
Get entitlements
Show the caller's current CleanChart tier. Anonymous callers are free tier (watermarked, reduced resolution). With an API key (Authorization: Bearer cc_..., created in the CleanChart dashboard) this reflects the account's subscription or 24h day pass.
無需輸入參數。
create_checkout
Create checkout
Create a payment link the USER must open in their browser — never call this without the user explicitly asking to purchase. kind 'single_chart' (pass the exact data, chartType, and config to be rendered; after payment call claim_chart to receive the clean chart), 'day_pass' (24h unlimited clean exports), or 'subscription' (monthly unlimited). day_pass and subscription are account-based: after payment CleanChart emails a sign-in link, and an API key from the dashboard unlocks clean renders over MCP.
輸入參數datakind必填configchartType
claim_chart
Claim purchased chart
Redeem a paid single-chart purchase (from create_checkout with kind 'single_chart') and receive the clean, full-resolution PNG. Call this after the user confirms payment. Returns payment_pending while the checkout is unpaid — wait for the user, do not poll in a loop. By default the image is only delivered inline and never stored; pass returnUrl:true if the user needs a downloadable file — the response then also includes chartUrl, a direct link to the PNG valid for 24 hours — surface it to the user.
輸入參數returnUrlcheckoutId必填purchaseId必填