Ad Spec Guard
v1.0.0Ad platform character limits, creative specs, A/B significance, UTM and policy checks.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_platform_specs
Return the verified specification sheet for one ad platform: hard character limits per copy field, image formats with their required dimensions and file size caps, learning-phase windows, and the conversion history automated bidding needs. Call this before writing ad copy or briefing creative, instead of relying on remembered limits, which change and are frequently misremembered.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Ad platform. One of: google, linkedin, meta, microsoft, telegram, tiktok. |
section | string | Which part of the sheet to return. |
validate_ad_copy
Check drafted ad copy against the hard character limits of one platform, field by field, and report which fields exceed the limit and by how much. Use it on every draft before presenting it, because copy over the limit is rejected when the ad is uploaded, not when it is written.
| Parameter | Type | Description |
|---|---|---|
fields * | object | Map of field name to the drafted text, for example {"headline": "Same day delivery", "description": "..."}; several texts of one field as a list, {"headline": ["A", "B"]}, each checked on its own. Cal… |
platform * | string | Ad platform. One of: google, linkedin, meta, microsoft, telegram, tiktok. |
campaign_type | string | Optional campaign type, for example 'search' or 'performance_max'. Recorded in the result. |
language | string | Language tag of the copy. Characters are counted as code points. |
validate_creative_spec
Check an image or video against a platform placement's required dimensions, aspect ratio, file size cap and accepted file types. Width and height are enough to answer whether a size fits a placement; supply file size and type as well when the file exists, and the result says which checks it could not perform. Returns each violation with its severity and the expected value.
| Parameter | Type | Description |
|---|---|---|
format_key * | string | Placement format, for example 'feed_1x1' or 'story_9x16'. Call get_platform_specs with section 'image' for the list. |
height * | integer | Pixel height of the file or of the planned creative. |
platform * | string | Ad platform. One of: google, linkedin, meta, microsoft, telegram, tiktok. |
width * | integer | Pixel width of the file or of the planned creative. |
file_bytes | integer | File size in bytes. Omit it when the file does not exist yet or its size is unknown; the weight check is then reported as not performed. Never estimate it. |
file_extension | string | File type without the dot, for example 'jpg', 'png', 'mp4'. Omit it when unknown; the type check is then reported as not performed. |
check_decision_readiness
Decide whether a live campaign has produced enough data to justify pausing it, scaling its budget, rotating a creative or switching bidding strategy, and whether it is still inside the platform's learning phase. Returns the unmet requirements with the shortfall and an estimate of how long to wait. Call it before recommending any change and before calling a metric good or bad. For a verdict on a cost per acquisition or return on ad spend use 'judge_metric'; for a verdict on a click-through rate or conversion rate use 'judge_rate_metric', which is gated on clicks rather than conversions.
| Parameter | Type | Description |
|---|---|---|
decision * | string | The decision being considered. |
platform * | string | Ad platform. Known keys: google, google_display, google_search, linkedin, meta, microsoft, tiktok. |
clicks | number | Clicks recorded so far. |
conversions | number | Conversions recorded so far. Omit it if it was not measured; do not pass 0 for unknown, because zero conversions after real traffic is a finding. |
days_running | number | Days the campaign has been delivering. |
impressions | number | Impressions recorded so far. |
spend | number | Amount spent so far, in USD. |
ab_test_significance
Run a two-proportion z-test on two variants of an ad, landing page or audience, and report the p-value, whether the difference is statistically significant at the chosen confidence level, and how much more traffic would be needed to resolve it if it is not. Use it for any comparison of two rates instead of judging the gap by eye.
| Parameter | Type | Description |
|---|---|---|
variant_a_successes * | integer | Numerator for variant A. |
variant_a_trials * | integer | Denominator for variant A: impressions for a click rate, clicks for a conversion rate. |
variant_b_successes * | integer | Numerator for variant B. |
variant_b_trials * | integer | Denominator for variant B. |
confidence | number | Confidence level for the test. |
build_utm
Assemble a campaign URL with consistent UTM tagging, normalise the values so they do not split into duplicate rows in analytics, and report every correction made and every risk found. Also flags a source or medium that departs from the conventional value for the platform, which silently breaks channel grouping.
| Parameter | Type | Description |
|---|---|---|
base_url * | string | Landing page URL, with or without an existing query string. |
campaign * | string | Campaign name. |
medium * | string | Traffic medium, for example 'cpc' or 'paid_social'. |
source * | string | Traffic source, for example 'google' or 'facebook'. |
content | string | Optional creative or variant identifier. |
convention | string | Naming convention applied to every value. |
platform | string | Optional platform key, used to check source and medium against the conventional values. |
term | string | Optional keyword or audience term. |
validate_utm
Inspect the UTM parameters already on a URL and report missing required parameters and values that will fragment reporting, such as mixed case or encoded spaces. Does not rewrite the URL.
| Parameter | Type | Description |
|---|---|---|
url * | string | The tagged URL to inspect. |
estimate_budget_feasibility
Work out whether a monthly budget can reach a target cost per acquisition or return on ad spend, and whether it produces enough weekly conversions for automated delivery to leave the learning phase. Nothing is filled in from industry averages: for any input not supplied, it solves for the value the goal would require and labels it as a condition rather than a forecast.
| Parameter | Type | Description |
|---|---|---|
monthly_budget * | number | Planned monthly media budget. |
ad_sets | integer | How many ad sets or campaigns the budget is split across. |
avg_order_value | number | Average order value, required with a return goal. |
currency | string | Currency code for the amounts supplied. |
expected_cpc | number | Cost per click. Supply it only if measured or quoted. |
expected_cvr | number | Conversion rate, as 0.03 or 3 for three percent. Supply it only if measured. |
target_cpa | number | Target cost per acquisition. |
target_roas | number | Target return on ad spend, as a multiple such as 4 for 4x. |
check_ad_policy_preflight
Scan ad copy for the two patterns behind most rejections: a business category the platform prohibits or gates behind certification, and a claim the platform treats as unverifiable. Returns each match with the governing policy page. This is a pattern pre-check, not an approval; only the platform's review decides whether an ad runs.
| Parameter | Type | Description |
|---|---|---|
platform * | string | Ad platform. Known keys: apple, google, linkedin, meta, microsoft, reddit, telegram, tiktok. |
text * | string | The ad copy to check. |
landing_url | string | Optional landing page URL, checked alongside the copy. |
vertical | string | Optional business category, for example 'dental clinic'. |