{"tools":[{"type":"function","function":{"name":"auth","description":"Sign up or sign in. Pass email to have a 6-digit code emailed, then call again with email and otp to get a session key (a new email is signed up). Or pass api_key to swap a pol_live_ API key for a session key.","parameters":{"type":"object","properties":{"email":{"type":"string"},"otp":{"type":"string","description":"The 6-digit code from the email."},"api_key":{"type":"string"}}}}},{"type":"function","function":{"name":"list_templates","description":"All policy templates (privacy policy, terms, cookie policy, DPA, CCPA notice, refund, ...): slug, laws covered and the [KEY] placeholders each needs. No sign-in needed.","parameters":{"type":"object","properties":{}}}},{"type":"function","function":{"name":"get_template","description":"One template with its markdown. No sign-in needed.","parameters":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"]}}},{"type":"function","function":{"name":"get_public_policy","description":"A published policy as its readers see it: markdown, version, theme, older versions. No sign-in.","parameters":{"type":"object","properties":{"policy_id":{"type":"string","description":"Policy id (also the pageid in the public link)."},"version_no":{"type":"string","description":"An older version (optional)."}},"required":["policy_id"]}}},{"type":"function","function":{"name":"check_trackers","description":"Fetch a public web page and list the outside services it loads (analytics, ad pixels such as Meta and TikTok, session recording, chat, embeds, consent tools) with account ids, whether each loads before the visitor's consent, and rows for a cookie policy table. No sign-in needed.","parameters":{"type":"object","properties":{"url":{"type":"string","description":"The page, e.g. https://example.com"}},"required":["url"]}}},{"type":"function","function":{"name":"tracker_policies","description":"Cookie policy and privacy policy markdown with a table row and a line for each service a check_trackers result found. Only the website and date are filled; save with create_policy (a draft by default). The reply's warnings and questions are for the site owner: ask them before setting honours_gpc or does_not_sell. No sign-in needed.","parameters":{"type":"object","properties":{"site_url":{"type":"string","description":"The checked site, e.g. https://example.com"},"services":{"type":"array","items":{"type":"object"},"description":"The services list from check_trackers (key and before_consent are used)."},"honours_gpc":{"type":"boolean","description":"The owner confirmed the site treats a Global Privacy Control signal as an opt-out. Default false: line left out."},"does_not_sell":{"type":"boolean","description":"The owner confirmed the site doesn't sell personal data or share it for cross-context advertising. Default false: line left out."}},"required":["site_url","services"]}}},{"type":"function","function":{"name":"list_tracker_sites","description":"The account's saved sites for the tracker check: the services the last check found, when it ran and when the next monthly check is.","parameters":{"type":"object","properties":{}}}},{"type":"function","function":{"name":"save_tracker_site","description":"Save a site for the tracker check. It is checked again every month and the account owner gets an email when a service shows up that wasn't there before. Without services, it is checked now.","parameters":{"type":"object","properties":{"url":{"type":"string","description":"The page, e.g. https://example.com"},"services":{"type":"array","items":{"type":"object"},"description":"Optional: the services list from a check_trackers run, as the starting point."},"method":{"type":"string","description":"That run's method (browser or static)."}},"required":["url"]}}},{"type":"function","function":{"name":"delete_tracker_site","description":"Stop the monthly check of a saved site.","parameters":{"type":"object","properties":{"site_id":{"type":"string"}},"required":["site_id"]}}},{"type":"function","function":{"name":"get_account","description":"The signed-in account: email and counts of projects, policies and themes.","parameters":{"type":"object","properties":{}}}},{"type":"function","function":{"name":"list_projects","description":"The account's projects (a website or app each) with policy counts and consent keys.","parameters":{"type":"object","properties":{}}}},{"type":"function","function":{"name":"create_project","description":"Create a project (a website or app). Policies belong to a project.","parameters":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["WEB","MOBILE","OTHER"]},"url":{"type":"string","description":"Website URL or app store link."},"theme_id":{"type":"string","description":"Default theme for its policy pages."}},"required":["name"]}}},{"type":"function","function":{"name":"update_project","description":"Rename a project or change its kind, URL or default theme.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."},"name":{"type":"string"},"kind":{"type":"string","enum":["WEB","MOBILE","OTHER"]},"url":{"type":"string"},"theme_id":{"type":"string"}},"required":["project_id"]}}},{"type":"function","function":{"name":"delete_project","description":"Delete an empty project (delete its policies first).","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."}},"required":["project_id"]}}},{"type":"function","function":{"name":"list_policies","description":"The account's policies (optionally for one project) with their public url and markdown_url.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."},"with_markdown":{"type":"boolean","description":"Include the text (default false)."}}}}},{"type":"function","function":{"name":"get_policy","description":"One policy with its markdown and the list of published versions.","parameters":{"type":"object","properties":{"policy_id":{"type":"string","description":"Policy id (also the pageid in the public link)."}},"required":["policy_id"]}}},{"type":"function","function":{"name":"create_policy","description":"Create a policy from your own markdown. Draft unless is_active is true.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."},"name":{"type":"string","description":"Title, e.g. Privacy Policy."},"markdown":{"type":"string","description":"The full policy text in markdown."},"language":{"type":"string","description":"ENGLISH, SPANISH, FRENCH ... (default ENGLISH)."},"is_active":{"type":"boolean","description":"true = published, false = draft."},"version_no":{"type":"string","description":"Version label, e.g. 1.0. Bump it for material changes."},"theme_id":{"type":"string","description":"Page theme for this policy; empty = the project's theme."}},"required":["project_id","name","markdown"]}}},{"type":"function","function":{"name":"create_policy_from_template","description":"Create a policy from a template, filling its [KEY] placeholders from values (PROJECT_NAME, WEBSITE_URL and DATE are filled from the project and today if missing). Returns missing_keys still in the text: fix them with update_policy before publishing.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."},"template":{"type":"string","description":"Template slug from list_templates."},"values":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"language":{"type":"string"},"publish":{"type":"boolean"}},"required":["project_id","template"]}}},{"type":"function","function":{"name":"update_policy","description":"Change a policy. is_active=true publishes it. If people already accepted the current version and the text changes, it is saved as the next version (version_bumped true) so the agreed text stays on record.","parameters":{"type":"object","properties":{"policy_id":{"type":"string","description":"Policy id (also the pageid in the public link)."},"project_id":{"type":"string","description":"Project id."},"name":{"type":"string","description":"Title, e.g. Privacy Policy."},"markdown":{"type":"string","description":"The full policy text in markdown."},"language":{"type":"string","description":"ENGLISH, SPANISH, FRENCH ... (default ENGLISH)."},"is_active":{"type":"boolean","description":"true = published, false = draft."},"version_no":{"type":"string","description":"Version label, e.g. 1.0. Bump it for material changes."},"theme_id":{"type":"string","description":"Page theme for this policy; empty = the project's theme."}},"required":["policy_id"]}}},{"type":"function","function":{"name":"delete_policy","description":"Delete a policy. Its public link stops working at once.","parameters":{"type":"object","properties":{"policy_id":{"type":"string","description":"Policy id (also the pageid in the public link)."}},"required":["policy_id"]}}},{"type":"function","function":{"name":"list_themes","description":"The account's page themes (background colours or images, accent, font, width, dark/light).","parameters":{"type":"object","properties":{}}}},{"type":"function","function":{"name":"create_theme","description":"Create a page theme. Attach it to a project (theme_id) or a single policy.","parameters":{"type":"object","properties":{"name":{"type":"string"},"mode":{"type":"string","enum":["auto","light","dark"],"description":"Theme on first load; readers can switch."},"bg_light":{"type":"string","description":"Background colour in light mode (#rrggbb)."},"bg_dark":{"type":"string","description":"Background colour in dark mode (#rrggbb)."},"bg_image_light":{"type":"string","description":"https URL of a background image for light mode."},"bg_image_dark":{"type":"string","description":"https URL of a background image for dark mode."},"accent":{"type":"string","description":"Accent colour for links and headings (#rrggbb)."},"font":{"type":"string","enum":["sans","serif","mono"]},"width":{"type":"string","enum":["narrow","normal","wide"]},"card":{"type":"boolean","description":"Text on a card above the background."}},"required":["name"]}}},{"type":"function","function":{"name":"update_theme","description":"Change a page theme.","parameters":{"type":"object","properties":{"theme_id":{"type":"string"},"name":{"type":"string"},"mode":{"type":"string","enum":["auto","light","dark"],"description":"Theme on first load; readers can switch."},"bg_light":{"type":"string","description":"Background colour in light mode (#rrggbb)."},"bg_dark":{"type":"string","description":"Background colour in dark mode (#rrggbb)."},"bg_image_light":{"type":"string","description":"https URL of a background image for light mode."},"bg_image_dark":{"type":"string","description":"https URL of a background image for dark mode."},"accent":{"type":"string","description":"Accent colour for links and headings (#rrggbb)."},"font":{"type":"string","enum":["sans","serif","mono"]},"width":{"type":"string","enum":["narrow","normal","wide"]},"card":{"type":"boolean","description":"Text on a card above the background."}},"required":["theme_id"]}}},{"type":"function","function":{"name":"list_purposes","description":"A project's consent purposes (marketing_email, product_updates, analytics ...) with their wording.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."}},"required":["project_id"]}}},{"type":"function","function":{"name":"create_purpose","description":"Add a consent purpose to a project. Sites record consent for it with POST /api/public/consents {consent_key, subject, purpose: key} and read it with GET /api/public/consents/status?purpose=key.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."},"key":{"type":"string","description":"Lowercase id, e.g. marketing_email (letters, digits, _). Can't change later."},"label":{"type":"string","description":"Short name shown in the preferences panel, e.g. Marketing emails."},"wording":{"type":"string","description":"The exact sentence the person agrees to (kept in every consent row)."},"active":{"type":"boolean","description":"false = no new accepts (withdrawals still work)."}},"required":["project_id","key","label","wording"]}}},{"type":"function","function":{"name":"update_purpose","description":"Change a purpose's label, wording or active flag. Rows already recorded keep the wording they had.","parameters":{"type":"object","properties":{"purpose_id":{"type":"string"},"label":{"type":"string","description":"Short name shown in the preferences panel, e.g. Marketing emails."},"wording":{"type":"string","description":"The exact sentence the person agrees to (kept in every consent row)."},"active":{"type":"boolean","description":"false = no new accepts (withdrawals still work)."}},"required":["purpose_id"]}}},{"type":"function","function":{"name":"delete_purpose","description":"Delete a purpose that has no consent records yet (otherwise set active=false).","parameters":{"type":"object","properties":{"purpose_id":{"type":"string"}},"required":["purpose_id"]}}},{"type":"function","function":{"name":"list_consents","description":"Consent records (who accepted or withdrew which policy version or purpose, and when), newest first.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."},"policy_id":{"type":"string","description":"Policy id (also the pageid in the public link)."},"purpose":{"type":"string","description":"Purpose key."},"subject":{"type":"string"},"limit":{"type":"integer"}}}}},{"type":"function","function":{"name":"list_connectors","description":"A project's connectors: the URLs the hub calls (signed) to export or delete a person's data.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."}},"required":["project_id"]}}},{"type":"function","function":{"name":"create_connector","description":"Add a connector to a project. For each data request the hub POSTs {kind, email, request_id, project_id} to export_url (reply: the person's data as JSON) or delete_url (reply: JSON counts), with the header X-Policies-Signature: t=<unix>,v1=<HMAC-SHA256 of '<t>.<body>' with the secret>. The secret is in this reply only.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."},"name":{"type":"string","description":"e.g. accounts (the file name in an export)."},"export_url":{"type":"string","description":"https URL for exports; empty = none."},"delete_url":{"type":"string","description":"https URL for deletes; empty = none."}},"required":["project_id","name"]}}},{"type":"function","function":{"name":"update_connector","description":"Change a connector's name, export_url, delete_url or active flag.","parameters":{"type":"object","properties":{"connector_id":{"type":"string"},"name":{"type":"string"},"export_url":{"type":"string"},"delete_url":{"type":"string"},"active":{"type":"boolean"}},"required":["connector_id"]}}},{"type":"function","function":{"name":"delete_connector","description":"Remove a connector; later data requests no longer call it.","parameters":{"type":"object","properties":{"connector_id":{"type":"string"}},"required":["connector_id"]}}},{"type":"function","function":{"name":"test_connector","description":"Send a signed {kind: ping} to the connector and show its reply (ok, status, reply).","parameters":{"type":"object","properties":{"connector_id":{"type":"string"}},"required":["connector_id"]}}},{"type":"function","function":{"name":"list_requests","description":"Data requests (download or delete) to your projects, newest first, with status and due date.","parameters":{"type":"object","properties":{"project_id":{"type":"string","description":"Project id."},"status":{"type":"string","enum":["awaiting_code","verified","running","ready","scheduled","done","cancelled","failed","expired"]},"kind":{"type":"string","enum":["export","delete"]},"email":{"type":"string"},"limit":{"type":"integer"}}}}},{"type":"function","function":{"name":"get_request","description":"One data request: status, due date, grace period and each connector's result.","parameters":{"type":"object","properties":{"request_id":{"type":"string"}},"required":["request_id"]}}},{"type":"function","function":{"name":"retry_request","description":"Run a failed data request again (after fixing the connector); a ready export gets a fresh link.","parameters":{"type":"object","properties":{"request_id":{"type":"string"}},"required":["request_id"]}}},{"type":"function","function":{"name":"create_api_key","description":"Create a long-lived pol_live_ API key (max 10). Shown only once.","parameters":{"type":"object","properties":{"label":{"type":"string"}}}}}]}