Skip to main content
Glama
199,110 tools. Last updated 2026-06-13 12:10

"JavaScript" matching MCP tools:

  • Perform one live, unauthenticated fetch against a public URL or API endpoint before you recommend it, document it, or build on top of it. Use this when the question is simply whether an endpoint currently responds and what kind of response it returns. It reports HTTP status, content type, elapsed time, likely auth/rate-limit signals, and a short response sample. A successful result only proves basic reachability at fetch time. Do not use it to validate authenticated flows, POST side effects, JavaScript execution, or deeper business logic.
    Connector
  • Run JavaScript in the page context and return the result. Use for state not in the a11y tree, captcha iframe inspection, DOM events. Expression is either a plain JS value ('document.title') or a zero-arg IIFE ('(() => { … })()'). Inline any runtime values into the expression itself. Result is JSON-serialized; non-serializable values become strings. 256KB cap on output.
    Connector
  • Run a JavaScript orchestration script in a sandboxed QuickJS runtime against the Meta Marketing API (Facebook + Instagram Ads). One runScript call can replace 10+ sequential Graph API tool invocations. ── WHEN TO USE THIS ── Default tool for any open-ended analytical question about a Meta ad account. Reach for it first when you see: - "How is my campaign doing?" / "What's working?" / "Find ad sets with bad ROAS" / "Why did CPM spike last week" - "Audit my account" / "Rank ad sets by spend efficiency" / "Compare creatives" - Any question where you'd otherwise call 3+ Graph endpoints in sequence - Any question that benefits from correlating insights + delivery info + recent edits in a single pass runScript owns reads — there are no per-surface read tools. Use `getInsights` only for the dedicated 1-account-1-window pull when you don't need to correlate. ── BATCHING DISCIPLINE ── Prefer ONE runScript call that fans out via `ads.graphParallel` (up to 20 calls concurrently). Cast a wide net on the first call; filter in-script for free. ── API SURFACE (all on the `ads` namespace) ── Async RPCs: - ads.graph(path, params?, method?) -> JSON — single Graph API call. Path may use the `{accountId}` template token (replaced with the active `act_<id>`). Default method: GET. - ads.graphParallel([{ name, path, params?, method?, paged?, limit? }]) -> { [name]: { ok, data } | { ok: false, error } } — fan-out, max 20. - Set `paged: true` to follow paging.next (capped at 20 pages). `limit` trims the final list to N rows. - ads.insights(adAccountId?, options?) -> rows — wrapper over /{accountId}/insights with sensible defaults. Pass `null` for the active account. - options: { level: "account"|"campaign"|"adset"|"ad", date_preset, time_range:{since,until}, time_increment, fields, breakdowns, action_breakdowns, limit } - ads.batch([{ method, relative_url, body? }]) -> [{ code, body }] — Graph API /batch endpoint. Up to 50 sub-requests. - ads.pagedAll(path, params?, maxPages?) -> [...] — read every page of a paged endpoint. Sync helpers: - ads.helpers.getDateRange(days) -> { since, until } — YYYY-MM-DD strings, UTC. - ads.helpers.formatDate(date) | daysBetween(a,b) | withActPrefix(id) | stripActPrefix(id) Constants: - ads.activeAccountId — the active ad-account numeric id (no act_ prefix). - ads.fields.* — comma-joined field-list strings: campaign, adset, ad, adAccount, insightsAudit, insightsLite. Drop into params.fields. - ads.datePresets — array of preset strings accepted by /insights date_preset. Path templates: - "/{accountId}/campaigns" → "/act_<active-id>/campaigns" - "/{accountId}/insights" → "/act_<active-id>/insights" - Plain ids like "/me/adaccounts" are untouched. ── COMMON PATTERNS ── Single insights pull: ```js return await ads.insights(null, { level: "campaign", date_preset: "last_30d", fields: ads.fields.insightsAudit.split(","), }); ``` Audit fan-out — campaigns + ad sets + ads + last 30d insights, in one call: ```js const r = await ads.graphParallel([ { name: "campaigns", path: "/{accountId}/campaigns", params: { fields: ads.fields.campaign }, paged: true }, { name: "adsets", path: "/{accountId}/adsets", params: { fields: ads.fields.adset }, paged: true }, { name: "ads", path: "/{accountId}/ads", params: { fields: ads.fields.ad }, paged: true, limit: 200 }, { name: "insights", path: "/{accountId}/insights", params: { level: "campaign", date_preset: "last_30d", fields: ads.fields.insightsAudit }, paged: true }, ]); const worst = (r.insights.ok ? r.insights.data : []).filter(x => Number(x.spend) > 100 && Number(x.ctr) < 0.5); return { worstCampaigns: worst, totals: { campaigns: r.campaigns.rowCount, adsets: r.adsets.rowCount } }; ``` ── RULES ── - Top-level await works. No fetch / require / process / fs reachable. - Return value must be JSON-serializable. Limits: 30s timeout (max 45s), 500KB return cap, 100K log chars. - Mutations (pause/enable/budget) go through dedicated tools (`pauseCampaign`, `pauseAdSet`, `pauseAd`, ...). Never write through runScript. ── ANTI-PATTERNS ── - Calling runScript 5+ times to fetch different surfaces — that's what graphParallel replaces. - Returning entire data arrays — summarize, rank, or aggregate first. - Manually computing dates with new Date() math — use ads.helpers.getDateRange / formatDate.
    Connector
  • Fetches any public web page and returns clean, readable plain text stripped of HTML, navigation, scripts, advertisements, and boilerplate. Returns the page title, meta description, word count, and main body text ready for analysis or summarisation. Use this tool when an agent needs to read the content of a specific web page or article URL — for example to summarise an article, extract facts from a page, verify a claim by reading the source, or convert a web page into plain text to pass to another tool. Pass article URLs returned by web_news_headlines to this tool to read full article content. Do not use this tool to discover current news headlines — use web_news_headlines instead. Does not execute JavaScript — best suited for standard HTML content pages. Will not work with paywalled, login-protected, or JavaScript-rendered single-page applications.
    Connector
  • Run a JavaScript orchestration script in a sandboxed QuickJS runtime. This is a REPLACEMENT for chaining individual tool calls, not a supplement — one runScript call does what would otherwise take 10+ sequential tool invocations. ── READ-ONLY (analytics and reporting only) ── runScript is a READ-ONLY analytics sandbox. ads.gaql() and ads.gaqlParallel() only execute SELECT GAQL queries — they cannot pause, update, create, or delete anything. To mutate the account (pause keywords, update bids, create campaigns, add negatives, etc.), call the dedicated mutation tools (pauseKeyword, updateBid, bulkPauseKeywords, pauseCampaign, createCampaign, addNegativeKeyword, etc.) directly. Never try to perform mutations inside a runScript call. ── WHEN TO USE THIS ── This is the DEFAULT tool for any open-ended analytical question about a Google Ads account. Reach for it first when you see: - "How is my account doing?" / "What's working?" / "What's broken?" / "How did last week go?" - "Audit my account" / "Find wasted spend" / "What should I change?" / "Any quick wins?" - Any question where you would otherwise fire 3+ read tools back-to-back - Any question that benefits from correlating surfaces (spend + search terms + quality scores + change events) in a single pass runScript owns EVERY read of Google Ads data. There are no point-query read tools anymore — if the caller asks for spend, CPA, search terms, keywords, ads, impression share, or anything else expressible in GAQL, you write a runScript that queries it. The only non-runScript reads are for specialized services that aren't GAQL-expressible: searchGeoTargets, getChanges (NotFair's own change log), reviewChangeImpact, getKeywordIdeas. For schema discovery before a query, use getResourceMetadata and listQueryableResources. ── BATCHING DISCIPLINE (read this first) ── Prefer ONE runScript call that fans out with ads.gaqlParallel (up to 20 queries concurrently) and does the full analysis in-script. Each runScript invocation costs ~5–10s of model deliberation PLUS the max GAQL latency across its queries. Batching 15 queries in one call ≈ 1 round-trip; doing the same across 5 calls ≈ 5 round-trips (5x slower). Rules of thumb: - Cast a wide net on the first call. You have 20 parallel slots — use them even if you're not sure yet what you'll need. Filtering in-script is free. - Do NOT make follow-up runScript calls just to pull one more surface you should have included. If you catch yourself about to call runScript a second time, ask: "could I have put this in the first batch?" (almost always yes). - Return the finished analysis (rankings, top offenders, aggregates), not raw GaqlReport.rows arrays. The caller reads your return value into context — summarize first. ── API SURFACE (all on the `ads` namespace) ── Async RPCs: - ads.gaql(query, limit?, options?) -> GaqlReport — single GAQL query. THIS IS THE ENTRY POINT FOR AD-HOC QUERIES. For one-off data pulls, use `return await ads.gaql('SELECT ...')` — there is no separate runGaqlQuery tool. - ads.gaqlParallel([{name, query, limit?}, ...], options?) -> { [name]: GaqlReport } — max 20 per call. USE THIS for multi-surface analysis. Fails the whole call if any subquery errors; pass `{ partial: true }` only when you explicitly want `{ error }` entries mixed with successful reports. - options.excludeRemovedParents defaults to true. Rows under REMOVED campaigns/ad groups are filtered out server-side because most audits need current serving state. Pass `{ excludeRemovedParents: false }` only for historical analysis. Canonical gaqlParallel shape: const r = await ads.gaqlParallel([ { name: "campaigns", query: `SELECT campaign.id, campaign.name, metrics.cost_micros FROM campaign WHERE segments.date DURING LAST_30_DAYS`, limit: 50 }, { name: "searchTerms", query: `SELECT search_term_view.search_term, metrics.clicks, metrics.conversions FROM search_term_view WHERE segments.date DURING LAST_30_DAYS`, limit: 100 }, ]); const campaigns = r.campaigns.rows ?? []; For intentional partial success: const r = await ads.gaqlParallel([...], { partial: true }); const rows = "error" in r.searchTerms ? [] : r.searchTerms.rows; Pre-built GAQL strings (sync, no RPC cost): - Parameterless: ads.queries.accountInfo | geoTargeting | qualityScores | adGroups | conversionActions | recommendations | billingSetups | audienceSegmentCheck | negativeKeywords | campaignAssets | adGroupAssets | sharedNegativeKeywordLists | sharedNegativeKeywordMembers | pausedCampaigns | customerManagerLinks - Date-windowed builders (call with YYYY-MM-DD): ads.queries.campaigns(start,end) | keywords | searchTerms | convertingSearchTerms | zeroConversionKeywords | ads | devicePerformance | networkSegmentation | landingPages | changeEvents | dailyCampaignMetrics | conversionActionPerformance - Canonical audit pack: ads.queries.auditPack(start,end) -> 23 named queries covering setup, campaigns, keywords, search terms, ads/assets, negatives, conversion actions/performance, recommendations, billing setup, paused campaigns, manager links, and recent Google-side change events. Prefer this for account audits instead of hand-selecting a narrow subset. Sync helpers: ads.helpers.getDateRange(days), formatDate, micros, toMicros, normalizeCustomerId, daysBetween, extractChangedFields, generateBrandVariants Constants: ads.constants.RESOURCE_CHANGE_OP, CHANGE_RESOURCE_TYPE, CHANGE_CLIENT_TYPE (numeric enum → label maps) ── HUMANIZED RESPONSES + REPORT METADATA ── Every GaqlReport includes meta: asOf, resource, dateRange/days, currencyCode/timeZone when selected, reportingLagDays, row limits/truncation, removed-parent behavior, campaign/ad-group status filters, campaign type filters, and data-completeness warnings. Read meta before making freshness/exhaustiveness claims. Rows are augmented post-fetch so you can read the LLM-friendly form directly: - Enum integer fields get a sibling `<field>_name` (canonical Google Ads enum name). Read `bidding_strategy_type_name === "MAXIMIZE_CONVERSIONS"`, not the integer 10. Avoids the BiddingStrategyType landmines (10=MAX_CONVERSIONS, 11=MAX_CONVERSION_VALUE, 9=TARGET_SPEND/MaxClicks, 15=TARGET_IMPRESSION_SHARE). - Money fields ending `_micros` get a sibling `<base>_value` in major units (`cost_micros: 11_000_000` ⇒ `cost_value: 11`). Currency-agnostic — works for USD/EUR/JPY. Raw `_micros` is preserved. ⚠ IMPORTANT: `_name` / `_value` siblings are NOT GAQL fields — do NOT put them in SELECT or WHERE. They appear automatically in result rows when the corresponding raw field is selected (`_name` → base enum field; `_value` → the `_micros` field). ── DATE LITERALS (GAQL only supports a fixed set) ── Valid `DURING` literals: TODAY, YESTERDAY, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS, THIS_MONTH, LAST_MONTH, LAST_BUSINESS_WEEK, LAST_WEEK_MON_SUN, LAST_WEEK_SUN_SAT, THIS_WEEK_MON_TODAY, THIS_WEEK_SUN_TODAY. **There is no LAST_60_DAYS, LAST_90_DAYS, LAST_180_DAYS, THIS_YEAR, or LAST_YEAR.** For windows >30 days, use a custom range: const { start, end } = ads.helpers.getDateRange(90); const q = `SELECT campaign.id, metrics.cost_micros FROM campaign WHERE segments.date BETWEEN '${start}' AND '${end}'`; (As a backstop, the server auto-rewrites unsupported `DURING LAST_N_DAYS`/`THIS_YEAR`/`LAST_YEAR` to BETWEEN, but writing it correctly is faster and clearer.) Note: `change_event` only supports the last 30 days regardless of how you express the range. ── COMMON GOTCHAS (the validator will reject these before they reach Google) ── - **change_event REQUIRES `change_event.change_date_time` in WHERE.** `segments.date DURING ...` does NOT work for this resource (Google rejects with change_event_error=3). Window cap is 30 rolling days. Easiest: `ads.queries.changeEvents(start, end)` builds the right shape. - **GAQL has no SQL JOIN.** Select compatible related-resource fields directly from one FROM resource (`campaign_budget.amount_micros` can be selected from `FROM campaign`), or run two queries and join rows in JavaScript. - **Enums in WHERE are STRING names, not numbers.** Write `WHERE campaign.status = 'PAUSED'`, never `= 3`. Same for `ad_group.status`, `ad_group_ad.status`, `ad_group_criterion.status`, `conversion_action.status`, `asset_group.status`. Valid status values: ENABLED, PAUSED, REMOVED. For other enums (advertising_channel_type, bidding_strategy_type, etc.), call `getResourceMetadata` with the query's FROM resource, e.g. `getResourceMetadata('campaign')`. - **Manager-link status has no REMOVED enum.** For `customer_manager_link.status`, use ACTIVE, INACTIVE, PENDING, REFUSED, or CANCELED; omit the filter if you only want all rows. - **`metrics.*` is NOT selectable from `FROM conversion_action`.** That resource carries dimensional fields only (name, type, status, counting). To break down metric counts by conversion action: query `FROM campaign` (or `ad_group`) and SELECT `segments.conversion_action_name`. To list configured actions: drop the metrics and keep only `conversion_action.*` fields. - **Local Services conversion actions are often segment-only.** LSA / `local_services_*` conversion names can appear in `segments.conversion_action_name` but not as mutable rows in `FROM conversion_action`. Before calling `updateConversionAction` / `removeConversionAction`, check `conversion_action.type` and `conversion_action.owner_customer` (e.g. via `ads.gaql(ads.queries.conversionActions)`); if the type is GA4/UA/Floodlight/Firebase/Salesforce/SA360 imports, Smart Campaign auto-actions, Store Visits, app-store actions, or the owner_customer points at a different customer (manager-inherited), treat as Google-managed/read-only. - **`segments.conversion_action_name` and friends don't pair with `metrics.cost_micros`.** Google reports cost at the campaign/ad_group level, not per conversion action — pick one or the other (query_error=53). For per-action cost-per-conversion, divide `cost_micros` (campaign-total) by per-action `metrics.conversions` in-script. - **Fields used in WHERE must also be in SELECT** (query_error=16). The server auto-injects `campaign.status`/`ad_group.status` for REMOVED-parent filters and promotes non-date `segments.*` predicate fields into SELECT automatically. Date segments are left unselected to avoid changing row granularity. - **`segments.date BETWEEN` takes explicit ISO dates only.** Do not write `BETWEEN 'LAST_30_DAYS' AND 'undefined'`; use `segments.date DURING LAST_30_DAYS`, or use `ads.helpers.getDateRange(days)` and interpolate `YYYY-MM-DD` dates. - **`search_term_view` requires a finite `segments.date` filter.** Include `segments.date DURING LAST_30_DAYS` or a `BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD'` clause. - **`keyword_view` includes ad-group-level NEGATIVES.** Filter `ad_group_criterion.negative = FALSE` for positives only — and add `ad_group_criterion.negative` to your SELECT (predicate-fields-must-be-in-SELECT applies). Negatives have 0 impressions/clicks/cost/conversions by definition (they block serving), so any `metrics.* = 0` filter without this predicate sweeps up every negative in the account. - **Keyword quality fields are split by resource.** Query delivery metrics (`metrics.clicks`, `metrics.cost_micros`, conversions, etc.) from `FROM keyword_view`. Query quality-score fields from `FROM ad_group_criterion` without metrics: `ad_group_criterion.quality_info.quality_score`, `creative_quality_score`, `post_click_quality_score`, and `search_predicted_ctr`. There is no `metrics.quality_info.quality_score`, `ad_group_criterion.quality_info.ad_relevance`, or `ad_group_criterion.quality_info.landing_page_experience`. - **Known hallucinated fields:** there is no `metrics.average_cpc_micros`, `metrics.cost_per_conversion_micros`, `metrics.impression_share`, `metrics.search_lost_is_rank`, `metrics.search_lost_is_budget`, `metrics.conversion_rate`, `metrics.quality_info.quality_score`, `asset.status`, `asset_group_asset.performance_label`, `asset.sitelink_asset.final_urls`, `campaign.url_expansion_opt_out`, `campaign.budget_micros`, `campaign.budget_amount_micros`, `campaign_criterion.proximity.address.city`, `campaign_criterion.audience.audience`, `change_event.campaign.name`, `change_event.resource_type`, `ad_group_criterion.quality_info.ad_relevance`, `ad_group_criterion.quality_info.landing_page_experience`, `campaign_experiment.*`, `conversion_action.default_value`, `conversion_action.last_conversion_date`, `conversion_action.most_recent_conversion_date`, `recommendation.impact.base_metrics.*`, `recommendation.keyword_match_type`, `billing_setup.payments_account_info.*`, `auction_insight.domain`, or bare `resource_name`. Use `metrics.average_cpc`; use `metrics.cost_per_conversion`; for Search campaigns use `metrics.search_impression_share`, `metrics.search_rank_lost_impression_share`, and `metrics.search_budget_lost_impression_share`; calculate conversion rate from `metrics.conversions / metrics.clicks`; budget lives on `campaign_budget.amount_micros`; asset serving status lives on the link resource (`campaign_asset.status`, `ad_group_asset.status`, `asset_group_asset.status`, `customer_asset.status`); use `campaign_criterion.proximity.address.city_name`; use `change_event.change_resource_type`; use `conversion_action.value_settings.default_value`; use `ads.queries.billingSetups` for safe billing reads; replace `resource_name` with `<resource>.resource_name`; call `getResourceMetadata(<resource>)` for the rest. Rules: top-level await works; no fetch/require/process/fs; return value must be JSON-serializable; defaults are 30s timeout (max 45s), 500KB return cap, 100K log chars. ── CANONICAL AUDIT (one call, wide net, filter in-script) ── const { start, end } = ads.helpers.getDateRange(30); const r = await ads.gaqlParallel(ads.queries.auditPack(start, end)); // Inspect r.campaigns.meta / r.searchTerms.meta for freshness, filters, and truncation before concluding. const worstCampaigns = (r.campaigns.rows ?? []) .map(c => ({ name: c.campaign.name, spend: c.metrics.cost_micros / 1e6, cpa: (c.metrics.cost_micros / 1e6) / (c.metrics.conversions || 1), convRate: c.metrics.conversions / (c.metrics.clicks || 1), })) .sort((a, b) => b.cpa - a.cpa).slice(0, 5); const topZeroConvKws = (r.zeroConversionKeywords.rows ?? []).slice(0, 10).map(k => ({ text: k.ad_group_criterion.keyword.text, spend: k.metrics.cost_micros / 1e6, })); return { worstCampaigns, topZeroConvKws, /* ... aggregates only, not raw rows ... */ }; ── ANTI-PATTERNS (don't) ── - Calling runScript 5+ times in sequence to fetch different surfaces — that's exactly what gaqlParallel replaces. - Using ads.gaql in a JS loop when the queries are independent — use gaqlParallel. - Returning entire GaqlReport.rows arrays — summarize, rank, or aggregate first. - Passing non-SELECT statements to ads.gaql() — GAQL is read-only, the call will throw immediately. Mutations go through dedicated tools, not runScript.
    Connector
  • Render a document (PDF / HTML / PPTX / DOCX) and save it to the workspace. This tool has two input pipelines — pass **exactly one** of `content_html` or `content_markdown`. # Pipeline A — `content_html` (canonical for decks, proposals, designed pages) You author full HTML+CSS. A baked-in design-system preamble ships first (`<style>` with Inter/Manrope as data-URI fonts, CSS-variable palette tokens, 8px spacing scale, and pre-styled layout helpers); your markup and any of your own `<style>` blocks land after the preamble so you can override anything. Chromium renders the assembled document into a static PDF — JavaScript is disabled and DNS is blackholed, so external font / image / script fetches will fail by configuration. Required when this pipeline is used: - `title` — human-readable, used for PDF metadata and the saved filename. - `content_html` — the `<body>` and any custom `<style>` blocks. The renderer wraps this in `<html>…</html>` and injects the preamble + a canonical `<meta charset>` + `<title>`. Do NOT emit `<script>`, `<iframe>`, `<object>`, `<embed>`, `<meta>`, `<link>`, `<base>`, `<form>`, or event handlers — the sanitizer strips them. - `output_type` — `"pdf"` or `"html"`. (`"pptx"` and `"docx"` require `content_markdown` since they need structured markdown intermediates.) Optional: - `page_preset` — `"slide_16_9"` (default for any deck), `"a4"` (default for flowing documents — used if omitted), `"letter"`, or `"none"` (you declare your own `@page` rule). - `design_tokens` — flat dict overriding the preamble's CSS variables. Whitelisted keys: `brand_primary`, `accent`, `surface_dark` (hex color), `font_display`, `font_body` (font name from ['Inter', 'Manrope', 'monospace', 'sans-serif', 'serif', 'system-ui', 'ui-monospace', 'ui-sans-serif', 'ui-serif']). - `language` — BCP-47 tag (default `"en"`). Drives `<html lang>`. ## Slide structure (`page_preset="slide_16_9"`) Each slide is `<section class="slide …">…</section>`. The base `.slide` class is what sizes it to the viewport and forces the page break — do not drop it. Composable variants (apply alongside `.slide`): - `.slide-cover` — gradient hero, big display title. - `.slide-split` — two equal columns, image + narrative. - `.slide-stats` — three-up KPI cards (use `<div class="stat">` with `.stat-value` + `.stat-label` inside). - `.slide-quote` — centered pull quote + `<cite>` attribution. Layout helpers (work in any preset): `.grid-2`, `.grid-3`, `.split`, `.stack`, `.cluster`, `.callout`, `.muted`, `.kbd`. ## Speaker notes `<aside class="notes">…text…</aside>` inside a `<section class="slide">`. The sanitizer strips them from the rendered PDF and returns them as `slide_notes[]` (parallel to slide order). Orphan notes outside any slide are dropped with a warning. ## Images Only these `src` schemes resolve: - `file:NNN` — workspace `file_id`. - `data:image/...;base64,...` — inline. - `https://<host>` where `<host>` ∈ `DOCUMENTS_MEDIA_URL_ALLOWLIST`. Other URLs are dropped and replaced with an HTML comment placeholder. # Pipeline B — `content_markdown` (invoice / contract only) Required: - `title`, `content_markdown`, `output_type`. Optional: - `theme` — `"invoice"` or `"contract"`. Triggers the corresponding exemplar styling and (for invoices) the arithmetic validator that fail-closes on missing or mismatched totals. - `language` — BCP-47 (default `"en"`). # Delivery contract (CRITICAL) After this tool returns `file_id`, deliver the file with `messages.send(attachments=[file_id], text="<short caption>")`. Embedding the file_id in a markdown link, `sandbox:` URL, or `/api/files/<id>/download` text will render as plain text on the recipient's channel — the `attachments` parameter is the only way the file actually attaches. # Exemplars INVOICE (English): # Invoice INV-{YYYYMMDD-HHMMSS} **From:** {Issuer Legal Name}, {Address}, {Tax ID} **To:** {Customer Name}, {Customer Address}, {Customer Tax ID} **Issue date:** {YYYY-MM-DD} **Due date:** {YYYY-MM-DD} | Description | Qty | Unit price | Total | |---|---:|---:|---:| | {Service 1} | 1 | 1500.00 | 1500.00 | | {Service 2} | 2 | 500.00 | 1000.00 | **Subtotal:** USD 2500.00 **Tax (20%):** USD 500.00 **Total:** USD 3000.00 **Payment:** {bank details OR crypto wallet — never both} INVOICE (Russian): # Счёт-фактура № INV-{YYYYMMDD-HHMMSS} **От:** {Юридическое название организации}, {Адрес}, ИНН {Tax ID} **Кому:** {Название клиента}, {Адрес клиента}, ИНН {Tax ID} **Дата:** {YYYY-MM-DD} **Срок оплаты:** {YYYY-MM-DD} | Описание | Кол-во | Цена | Сумма | |---|---:|---:|---:| | {Услуга 1} | 1 | 1500.00 | 1500.00 | | {Услуга 2} | 2 | 500.00 | 1000.00 | **Подытог:** USD 2500.00 **НДС (20%):** USD 500.00 **Итого:** USD 3000.00 **Реквизиты:** {банковские реквизиты ИЛИ криптокошелёк — не оба сразу} CONTRACT (English): # Service Agreement **Between:** {Provider Legal Name}, {Address} ("Provider") **And:** {Client Legal Name}, {Address} ("Client") **Effective date:** {YYYY-MM-DD} ## 1. Scope of services {Concise description of what Provider agrees to deliver.} ## 2. Term This Agreement begins on the Effective date and continues until {termination condition or end date}. ## 3. Compensation Client pays Provider {amount and currency} according to {payment schedule}. ## 4. Confidentiality Both parties agree to keep proprietary information of the other party confidential during and after the term of this Agreement. ## 5. Termination Either party may terminate with {N} days' written notice. ## 6. Governing law {Jurisdiction}. --- **Provider:** ____________________ **Client:** ____________________ {Provider signatory name} {Client signatory name} CONTRACT (Russian): # Договор оказания услуг **Между:** {Юридическое название Исполнителя}, {Адрес} ("Исполнитель") **И:** {Юридическое название Заказчика}, {Адрес} ("Заказчик") **Дата вступления в силу:** {YYYY-MM-DD} ## 1. Предмет договора {Краткое описание услуг, которые Исполнитель обязуется оказать.} ## 2. Срок действия Договор вступает в силу с указанной даты и действует до {условие прекращения или дата окончания}. ## 3. Стоимость и порядок оплаты Заказчик оплачивает услуги Исполнителя в размере {сумма и валюта} в порядке {график платежей}. ## 4. Конфиденциальность Стороны обязуются сохранять конфиденциальность сведений, полученных в ходе исполнения настоящего Договора, в течение срока его действия и после его прекращения. ## 5. Расторжение Любая из сторон вправе расторгнуть Договор, направив письменное уведомление не менее чем за {N} дней. ## 6. Применимое право {Юрисдикция}. --- **Исполнитель:** ____________________ **Заказчик:** ____________________ {ФИО подписанта Исполнителя} {ФИО подписанта Заказчика}
    Connector

Matching MCP Servers

Matching MCP Connectors

  • Host static HTML pages, generate PDFs, screenshots, scrape JS sites, run sandboxed JavaScript.

  • Render chart images from JSON configs via a simple HTTP API. Six themes, ten marks, PNG/SVG output. No client-side JavaScript, no installs – just a URL that returns an image. MCP tools include render, validate, list themes, and browse examples.

  • Fetch a public pricing page and extract first-pass pricing signals before you quote plan costs, free tiers, or plan names. Use this when you already have a likely pricing URL and need a quick live scan of visible page text. It returns price-like strings, heuristic plan labels, free or free-trial signals, and cache information. It does not map prices to exact plans, normalize currencies, execute checkout flows, or guarantee that a price applies to a specific region or customer type. JavaScript-rendered, logged-in, or heavily obfuscated pricing details can be missed. Results are cached for 5 minutes.
    Connector
  • Read a JavaScript value from the browser by property path. Walks a strict property path — NO expression evaluation, NO function calls, NO arbitrary code. Accepts identifiers, integer indices in brackets, and double-quoted string keys in brackets. Use this to read runtime state that isn't visible in the DOM: - Framework hydration: window.__NEXT_DATA__.props.pageProps - Redux/Zustand/etc stores (if exposed on window): window.__STORE__._currentState - Feature flags stashed on globals: window.APP.flags - Nested config: window["site-config"].features[0] EXPLORATION MODE: pass mode="keys" to get Object.keys() at the path instead of the value. Start with path="window" to discover globals, then drill in. This is how to find exposed state without guessing: get_js_value(path="window", mode="keys") -> ["document", "__NEXT_DATA__", "store", ...] get_js_value(path="window.store", mode="keys") -> ["_currentState", "subscribe", "dispatch", ...] get_js_value(path="window.store._currentState") -> the actual state object LIMITATIONS (intentional — security): - Cannot call functions. "store.getState()" fails. Expose the value as a readable property instead, e.g. window.__STORE__.state. - No arithmetic, comparisons, or expressions. - Path must start with an identifier and walk down via dots/brackets. Responses are cycle-safe, depth-capped, and size-capped. DOM nodes and React fiber trees are summarized rather than traversed. Args: key: Session key secret: Session secret from create_session path: Property path, e.g. "window.__NEXT_DATA__.props.pageProps" or 'window["site-config"].features[0]' or 'window.arr[0].name' mode: "value" (default) returns the serialized value; "keys" returns Object.keys() at the path max_depth: Max traversal depth when serializing (default 6, capped at 10) max_bytes: Max serialized size in bytes (default 20000, capped at 100000) Returns: {path, type, value, truncated, size_bytes} in value mode {path, mode, type, keys} in keys mode {error: "..."} on bad path / function / failure Requires a connected browser session and middleware v0.9.6+ (older middleware works — the relay doesn't care; the browser needs agent.js from relay.sncro.net which auto-updates).
    Connector
  • Pre-flight check on html / css / js BEFORE writing via update_html. Returns { ok, errors, warnings, parsed } where parsed has byte counts per field and `dropped` (true if the sanitizer would strip anything from `html`). Errors cover cap breaches (`html_too_large`, `css_too_large`, `js_too_large`, `total_too_large`) and sanitizer rejection (`html_sanitize_rejected`, `html_sanitize_empty`). At v2 the sanitizer accepts `<script>` and `<link>` — those used to be smells but are now first-class agent markup; isolation lives in the opaque render iframe, not the sanitizer. The smells still stripped: inline `on*=` attributes, `javascript:`/`data:text/html` URIs, `<meta http-equiv>` tags. NEVER writes anything. Use when iterating on a payload so you don't burn a write on something the surface would reject.
    Connector
  • Fetch a URL with full reliability — retry, circuit breaker, cache, and anti-bot bypass. Returns both raw HTML and clean markdown. Automatically retries on failure with exponential backoff, falls back to plain HTTP if browser fetch fails, and circuit-breaks domains that are consistently down. Args: url: The URL to fetch use_cache: Whether to use cached results (default: true, TTL 1 hour) js_render: Whether to render JavaScript (default: true, disable for speed) wait_for: CSS selector to wait for before capturing (e.g., '.results-loaded')
    Connector
  • Search and inspect the Wix REST API documentation/spec by writing JavaScript code that runs in a sandboxed read-only environment. This tool overlaps with `SearchWixRESTDocumentation`, `BrowseWixRESTDocsMenu`, `ReadFullDocsArticle`, and `ReadFullDocsMethodSchema`: use any of them to discover Wix REST endpoints, schemas, examples, and related docs. Prefer `SearchWixAPISpec` over `ReadFullDocsMethodSchema` for REST method schemas when it is available, especially after you already have a docs URL from semantic search, menu browsing, or conversation context. Prefer URL-first results: - If you have a docs URL or partial docs URL, search `resource.docsUrl` and `method.docsUrl` first. - If you have a method docs URL and need the request/response shape, call `getResourceSchemaByUrl(methodDocsUrl)` in this tool and return the selected method schema directly. - For API execution, return and use `method.publicUrl` when available. It is the preferred executable `https://www.wixapis.com/...` URL. - Return `docsUrl` for relevant resources/methods when the next step needs an article or API call source URL; do not hand off to `ReadFullDocsMethodSchema` just to inspect a REST method schema. - Use `resourceId` only as the internal handle for low-level loaders; prefer URL helpers when you have a docs URL. Your code has access to these globals: **lightIndex** — Current lightweight REST API resource array: ```typescript interface LightIndex extends Array<LightResource> { updatedAt?: string; // ISO timestamp for when spec sync generated this index } interface LightResource { name: string; // e.g. "Products V3", "Contact V4" resourceId: string; // internal handle for getResourceSchema() docsUrl: string; // e.g. "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3" menuPath: string[]; // e.g. ["business-solutions", "stores", "catalog-v3", "products-v3"] methods: Array<{ operationId: string; // e.g. "wix.stores.catalog.v3.CatalogApi.CreateProduct" summary: string; // e.g. "Create Product" httpMethod: string; // "get" | "post" | "patch" | "delete" path: string; // e.g. "/v3/products" docsUrl?: string; // e.g. "https://dev.wix.com/docs/api-reference/.../query-products" publicUrl?: string; // preferred executable URL for ExecuteWixAPI, when available after spec sync publicBaseUrl?: string; description: string; // truncated to 200 chars }>; } ``` **getResourceSchemaByUrl(docsUrl)** and **getResourceSchema(resourceId)** return the full schema for a resource: ```typescript interface FullSchema { title: string; description: string; fqdn: string; docsUrl?: string; methods: Array<{ summary: string; description: string; operationId: string; httpMethod: string; path: string; docsUrl?: string; publicUrl?: string; // Preferred executable URL for ExecuteWixAPI, e.g. "https://www.wixapis.com/..." publicBaseUrl?: string; // Public Wix APIs base URL used to derive publicUrl servers: Array<{ url: string }>; // Base URLs (e.g. "https://www.wixapis.com/...") requestBody: object | null; responses: object; parameters: Array<object>; permissions: string[]; legacyExamples: Array<{ // Curl examples content: { title: string; request: string; response: string }; }>; }>; components: { schemas: object }; } ``` **articles** — Array of all Wix documentation articles (~1000 guides, tutorials, concepts): ```typescript interface LightArticle { name: string; // e.g. "About the Wix API Query Language" resourceId: string; docsUrl: string; // e.g. "https://dev.wix.com/docs/api-reference/articles/..." menuPath: string[]; // e.g. ["work-with-wix-apis", "data-retrieval", "about-the-wix-api-query-language"] description: string; // first ~200 chars of the article content } ``` **getResourceSchemaByUrl(docsUrl)** — Async function returning the full schema for the resource or method docs URL. **getResourceSchema(resourceId)** — Lower-level async function returning the full schema for a resource ID. Prefer `getResourceSchemaByUrl(docsUrl)` when you have a docs URL. **getArticleContentByUrl(docsUrl)** — Async function returning the full markdown content of an article docs URL (string). **getArticleContent(resourceId)** — Lower-level async function returning the full markdown content of an article resource ID. Prefer `getArticleContentByUrl(docsUrl)` when you have a docs URL. Articles and API resources share the same menuPath hierarchy. Use menuPath to find related articles and APIs within the same domain. Your code MUST be an `async function()` expression that returns a value. app-management [12 resources]: oauth-2, app-instance, app-billing, embedded-scripts, bi-event, market-listing, app-installations, app-permissions, site-plugins business-solutions [154 resources]: e-commerce, stores, bookings, cms, events, restaurants, blog, forum, pricing-plans, portfolio, benefit-programs, suppliers-hub, gift-cards, donations, coupons assets [4 resources]: media, rich-content, pro-gallery crm [58 resources]: members-contacts, forms, community, communication, loyalty-program, crm business-management [103 resources]: ai-site-chat, analytics, app-installation, automations, async-job, calendar, branches, captcha, cookie-consent-policy, custom-embeds, faq-app, dashboard, functions, get-paid, data-extension-schema, headless, locations, marketing, multilingual, notifications, online-programs, payments, site-urls, site-search, secrets, tags, site-properties account-level [17 resources]: sites, resellers, domains, b2b-site-management, user-management site [2 resources]: viewer Important schema guidance: - For ExecuteWixAPI, use `method.publicUrl` when available. It is the preferred executable `https://www.wixapis.com/...` URL for that method. - Do not use `method.servers[0]` to build execution URLs. `method.servers` includes internal Wix hosts such as `www.wix.com`, `manage.wix.com`, and editor hosts. - `method.path` is usually an internal relative path, such as `/v3/items/{item.id}`. Use it for matching/debugging, not as the primary execution URL when `method.publicUrl` exists. - Do not exact-match full Wix API URLs against `method.path`. - Search docs URLs first when you have them. Search broadly across `resource.name`, `resource.docsUrl`, `resource.menuPath.join("/")`, `method.summary`, `method.operationId`, `method.description`, `method.path`, and `method.docsUrl` only when you still need discovery. - Method schemas can contain `{ "$circular": "TypeName" }` references. Use `schema.components.schemas[TypeName]` to inspect selected nested types. Avoid dumping huge fully-expanded schemas unless necessary. - When inspecting a specific method schema (i.e. you have found a single method and are returning its details), always include `responses: method.responses` alongside `requestBody`. Knowing the response shape up front prevents speculative re-runs of mutations just to see what the API returned. Examples: Inspect one method schema by exact docs URL: ```javascript async function() { const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products"; const schema = await getResourceSchemaByUrl(methodUrl); const method = schema.methods.find(method => method.docsUrl === methodUrl); if (!method) { return { message: "Found the resource, but no exact method URL match. Returning available methods.", resourceDocsUrl: schema.docsUrl, methods: schema.methods.map(method => ({ title: method.summary, docsUrl: method.docsUrl, httpMethod: method.httpMethod.toUpperCase(), publicUrl: method.publicUrl, path: method.path })) }; } return { title: method.summary, docsUrl: method.docsUrl, resourceDocsUrl: schema.docsUrl, publicUrl: method.publicUrl, publicBaseUrl: method.publicBaseUrl, httpMethod: method.httpMethod.toUpperCase(), path: method.path, operationId: method.operationId, permissions: method.permissions, parameters: method.parameters, requestBody: method.requestBody, responses: method.responses, curlExamples: method.legacyExamples?.map(example => example.content) }; } ``` Inspect one resource by resource docs URL: ```javascript async function() { const resourceUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3"; const schema = await getResourceSchemaByUrl(resourceUrl); return { resource: schema.title, docsUrl: schema.docsUrl, description: schema.description, methods: schema.methods.map(method => ({ title: method.summary, docsUrl: method.docsUrl, httpMethod: method.httpMethod.toUpperCase(), publicUrl: method.publicUrl, path: method.path, operationId: method.operationId })) }; } ``` Inspect one method from a partial docs URL: ```javascript async function() { const partialUrl = "stores/catalog-v3/products-v3/query-products"; const resource = lightIndex.find(resource => resource.docsUrl.includes(partialUrl) || resource.methods.some(method => method.docsUrl?.includes(partialUrl)) ); if (!resource) return "No API resource found for this partial docs URL"; const schema = await getResourceSchemaByUrl( resource.methods.find(method => method.docsUrl?.includes(partialUrl))?.docsUrl ?? resource.docsUrl ); const method = schema.methods.find(method => method.docsUrl?.includes(partialUrl) ); if (!method) { return { message: "Found the resource, but no exact method match.", resource: resource.name, resourceDocsUrl: resource.docsUrl, methods: schema.methods.map(method => ({ title: method.summary, docsUrl: method.docsUrl, httpMethod: method.httpMethod.toUpperCase(), publicUrl: method.publicUrl, path: method.path })) }; } return { title: method.summary, docsUrl: method.docsUrl, resource: resource.name, resourceDocsUrl: resource.docsUrl, httpMethod: method.httpMethod.toUpperCase(), publicUrl: method.publicUrl, publicBaseUrl: method.publicBaseUrl, path: method.path, requestBody: method.requestBody, responses: method.responses, curlExamples: method.legacyExamples?.map(example => example.content) }; } ``` Expand selected nested schema refs: ```javascript async function() { const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products"; const schema = await getResourceSchemaByUrl(methodUrl); const method = schema.methods.find(method => method.docsUrl === methodUrl); return { title: method.summary, docsUrl: method.docsUrl, requestBody: method.requestBody, selectedNestedTypes: { product: schema.components.schemas["com.wix.stores.catalog.product.api.v3.Product"], cursorPaging: schema.components.schemas["wix.stores.catalog.v3.upstream.wix.common.CursorPaging"], sorting: schema.components.schemas["wix.stores.catalog.v3.upstream.wix.common.Sorting"] } }; } ``` Advanced: bounded recursive expansion for one method. Use only when top-level schema and selected nested refs are not enough; keep depth small because schemas can become very large. ```javascript async function() { const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products"; const schema = await getResourceSchemaByUrl(methodUrl); const method = schema.methods.find(method => method.docsUrl === methodUrl); function expandRefs(value, depth = 0, seen = []) { if (depth > 3) return value; if (Array.isArray(value)) return value.map(item => expandRefs(item, depth, seen)); if (!value || typeof value !== "object") return value; if (value.$circular) { const refName = value.$circular; if (seen.includes(refName)) return { $ref: refName, circular: true }; const target = schema.components?.schemas?.[refName]; if (!target) return { $ref: refName, missing: true }; return { $ref: refName, schema: expandRefs(target, depth + 1, seen.concat(refName)) }; } return Object.fromEntries( Object.entries(value).map(([key, nested]) => [ key, expandRefs(nested, depth, seen) ]) ); } return { title: method.summary, docsUrl: method.docsUrl, httpMethod: method.httpMethod.toUpperCase(), publicUrl: method.publicUrl, path: method.path, requestBody: expandRefs(method.requestBody), responses: expandRefs(method.responses) }; } ``` Find APIs by broad keywords when you do not have a docs URL: ```javascript async function() { const words = ["stores", "query", "products"]; return lightIndex.flatMap(resource => resource.methods .filter(method => { const haystack = [ resource.name, resource.docsUrl, resource.menuPath.join("/"), method.summary, method.operationId, method.description, method.path, method.docsUrl ].join(" ").toLowerCase(); return words.every(word => haystack.includes(word)); }) .map(method => ({ title: method.summary, docsUrl: method.docsUrl, resource: resource.name, resourceDocsUrl: resource.docsUrl, resourceId: resource.resourceId, operationId: method.operationId, httpMethod: method.httpMethod.toUpperCase(), publicUrl: method.publicUrl, path: method.path })) ); } ```
    Connector
  • Scrape content from a single URL with advanced options. This is the most powerful, fastest and most reliable scraper tool, if available you should always default to using this tool for any web scraping needs. **Best for:** Single page content extraction, when you know exactly which page contains the information. **Not recommended for:** Multiple pages (call scrape multiple times or use crawl), unknown page location (use search). **Common mistakes:** Using markdown format when extracting specific data points (use JSON instead). **Other Features:** Use 'branding' format to extract brand identity (colors, fonts, typography, spacing, UI components) for design analysis or style replication. **CRITICAL - Format Selection (you MUST follow this):** When the user asks for SPECIFIC data points, you MUST use JSON format with a schema. Only use markdown when the user needs the ENTIRE page content. **Use JSON format when user asks for:** - Parameters, fields, or specifications (e.g., "get the header parameters", "what are the required fields") - Prices, numbers, or structured data (e.g., "extract the pricing", "get the product details") - API details, endpoints, or technical specs (e.g., "find the authentication endpoint") - Lists of items or properties (e.g., "list the features", "get all the options") - Any specific piece of information from a page **Use markdown format ONLY when:** - User wants to read/summarize an entire article or blog post - User needs to see all content on a page without specific extraction - User explicitly asks for the full page content **Handling JavaScript-rendered pages (SPAs):** If JSON extraction returns empty, minimal, or just navigation content, the page is likely JavaScript-rendered or the content is on a different URL. Try these steps IN ORDER: 1. **Add waitFor parameter:** Set `waitFor: 5000` to `waitFor: 10000` to allow JavaScript to render before extraction 2. **Try a different URL:** If the URL has a hash fragment (#section), try the base URL or look for a direct page URL 3. **Use firecrawl_map to find the correct page:** Large documentation sites or SPAs often spread content across multiple URLs. Use `firecrawl_map` with a `search` parameter to discover the specific page containing your target content, then scrape that URL directly. Example: If scraping "https://docs.example.com/reference" fails to find webhook parameters, use `firecrawl_map` with `{"url": "https://docs.example.com/reference", "search": "webhook"}` to find URLs like "/reference/webhook-events", then scrape that specific page. 4. **Use firecrawl_agent:** As a last resort for heavily dynamic pages where map+scrape still fails, use the agent which can autonomously navigate and research **Usage Example (JSON format - REQUIRED for specific data extraction):** ```json { "name": "firecrawl_scrape", "arguments": { "url": "https://example.com/api-docs", "formats": ["json"], "jsonOptions": { "prompt": "Extract the header parameters for the authentication endpoint", "schema": { "type": "object", "properties": { "parameters": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "required": { "type": "boolean" }, "description": { "type": "string" } } } } } } } } } ``` **Prefer markdown format by default.** You can read and reason over the full page content directly — no need for an intermediate query step. Use markdown for questions about page content, factual lookups, and any task where you need to understand the page. **Use JSON format when user needs:** - Structured data with specific fields (extract all products with name, price, description) - Data in a specific schema for downstream processing **Use query format only when:** - The page is extremely long and you need a single targeted answer without processing the full content - You want a quick factual answer and don't need to retain the page content **Usage Example (markdown format - default for most tasks):** ```json { "name": "firecrawl_scrape", "arguments": { "url": "https://example.com/article", "formats": ["markdown"], "onlyMainContent": true } } ``` **Usage Example (branding format - extract brand identity):** ```json { "name": "firecrawl_scrape", "arguments": { "url": "https://example.com", "formats": ["branding"] } } ``` **Branding format:** Extracts comprehensive brand identity (colors, fonts, typography, spacing, logo, UI components) for design analysis or style replication. **Performance:** Add maxAge parameter for 500% faster scrapes using cached data. **Returns:** JSON structured data, markdown, branding profile, or other formats as specified. **Safe Mode:** Read-only content extraction. Interactive actions (click, write, executeJavascript) are disabled for security.
    Connector
  • Render a document (PDF / HTML / PPTX / DOCX) and save it to the workspace. This tool has two input pipelines — pass **exactly one** of `content_html` or `content_markdown`. # Pipeline A — `content_html` (canonical for decks, proposals, designed pages) You author full HTML+CSS. A baked-in design-system preamble ships first (`<style>` with Inter/Manrope as data-URI fonts, CSS-variable palette tokens, 8px spacing scale, and pre-styled layout helpers); your markup and any of your own `<style>` blocks land after the preamble so you can override anything. Chromium renders the assembled document into a static PDF — JavaScript is disabled and DNS is blackholed, so external font / image / script fetches will fail by configuration. Required when this pipeline is used: - `title` — human-readable, used for PDF metadata and the saved filename. - `content_html` — the `<body>` and any custom `<style>` blocks. The renderer wraps this in `<html>…</html>` and injects the preamble + a canonical `<meta charset>` + `<title>`. Do NOT emit `<script>`, `<iframe>`, `<object>`, `<embed>`, `<meta>`, `<link>`, `<base>`, `<form>`, or event handlers — the sanitizer strips them. - `output_type` — `"pdf"` or `"html"`. (`"pptx"` and `"docx"` require `content_markdown` since they need structured markdown intermediates.) Optional: - `page_preset` — `"slide_16_9"` (default for any deck), `"a4"` (default for flowing documents — used if omitted), `"letter"`, or `"none"` (you declare your own `@page` rule). - `design_tokens` — flat dict overriding the preamble's CSS variables. Whitelisted keys: `brand_primary`, `accent`, `surface_dark` (hex color), `font_display`, `font_body` (font name from ['Inter', 'Manrope', 'monospace', 'sans-serif', 'serif', 'system-ui', 'ui-monospace', 'ui-sans-serif', 'ui-serif']). - `language` — BCP-47 tag (default `"en"`). Drives `<html lang>`. ## Slide structure (`page_preset="slide_16_9"`) Each slide is `<section class="slide …">…</section>`. The base `.slide` class is what sizes it to the viewport and forces the page break — do not drop it. Composable variants (apply alongside `.slide`): - `.slide-cover` — gradient hero, big display title. - `.slide-split` — two equal columns, image + narrative. - `.slide-stats` — three-up KPI cards (use `<div class="stat">` with `.stat-value` + `.stat-label` inside). - `.slide-quote` — centered pull quote + `<cite>` attribution. Layout helpers (work in any preset): `.grid-2`, `.grid-3`, `.split`, `.stack`, `.cluster`, `.callout`, `.muted`, `.kbd`. ## Speaker notes `<aside class="notes">…text…</aside>` inside a `<section class="slide">`. The sanitizer strips them from the rendered PDF and returns them as `slide_notes[]` (parallel to slide order). Orphan notes outside any slide are dropped with a warning. ## Images Only these `src` schemes resolve: - `file:NNN` — workspace `file_id`. - `data:image/...;base64,...` — inline. - `https://<host>` where `<host>` ∈ `DOCUMENTS_MEDIA_URL_ALLOWLIST`. Other URLs are dropped and replaced with an HTML comment placeholder. # Pipeline B — `content_markdown` (invoice / contract only) Required: - `title`, `content_markdown`, `output_type`. Optional: - `theme` — `"invoice"` or `"contract"`. Triggers the corresponding exemplar styling and (for invoices) the arithmetic validator that fail-closes on missing or mismatched totals. - `language` — BCP-47 (default `"en"`). # Delivery contract (CRITICAL) After this tool returns `file_id`, deliver the file with `messages.send(attachments=[file_id], text="<short caption>")`. Embedding the file_id in a markdown link, `sandbox:` URL, or `/api/files/<id>/download` text will render as plain text on the recipient's channel — the `attachments` parameter is the only way the file actually attaches. # Exemplars INVOICE (English): # Invoice INV-{YYYYMMDD-HHMMSS} **From:** {Issuer Legal Name}, {Address}, {Tax ID} **To:** {Customer Name}, {Customer Address}, {Customer Tax ID} **Issue date:** {YYYY-MM-DD} **Due date:** {YYYY-MM-DD} | Description | Qty | Unit price | Total | |---|---:|---:|---:| | {Service 1} | 1 | 1500.00 | 1500.00 | | {Service 2} | 2 | 500.00 | 1000.00 | **Subtotal:** USD 2500.00 **Tax (20%):** USD 500.00 **Total:** USD 3000.00 **Payment:** {bank details OR crypto wallet — never both} INVOICE (Russian): # Счёт-фактура № INV-{YYYYMMDD-HHMMSS} **От:** {Юридическое название организации}, {Адрес}, ИНН {Tax ID} **Кому:** {Название клиента}, {Адрес клиента}, ИНН {Tax ID} **Дата:** {YYYY-MM-DD} **Срок оплаты:** {YYYY-MM-DD} | Описание | Кол-во | Цена | Сумма | |---|---:|---:|---:| | {Услуга 1} | 1 | 1500.00 | 1500.00 | | {Услуга 2} | 2 | 500.00 | 1000.00 | **Подытог:** USD 2500.00 **НДС (20%):** USD 500.00 **Итого:** USD 3000.00 **Реквизиты:** {банковские реквизиты ИЛИ криптокошелёк — не оба сразу} CONTRACT (English): # Service Agreement **Between:** {Provider Legal Name}, {Address} ("Provider") **And:** {Client Legal Name}, {Address} ("Client") **Effective date:** {YYYY-MM-DD} ## 1. Scope of services {Concise description of what Provider agrees to deliver.} ## 2. Term This Agreement begins on the Effective date and continues until {termination condition or end date}. ## 3. Compensation Client pays Provider {amount and currency} according to {payment schedule}. ## 4. Confidentiality Both parties agree to keep proprietary information of the other party confidential during and after the term of this Agreement. ## 5. Termination Either party may terminate with {N} days' written notice. ## 6. Governing law {Jurisdiction}. --- **Provider:** ____________________ **Client:** ____________________ {Provider signatory name} {Client signatory name} CONTRACT (Russian): # Договор оказания услуг **Между:** {Юридическое название Исполнителя}, {Адрес} ("Исполнитель") **И:** {Юридическое название Заказчика}, {Адрес} ("Заказчик") **Дата вступления в силу:** {YYYY-MM-DD} ## 1. Предмет договора {Краткое описание услуг, которые Исполнитель обязуется оказать.} ## 2. Срок действия Договор вступает в силу с указанной даты и действует до {условие прекращения или дата окончания}. ## 3. Стоимость и порядок оплаты Заказчик оплачивает услуги Исполнителя в размере {сумма и валюта} в порядке {график платежей}. ## 4. Конфиденциальность Стороны обязуются сохранять конфиденциальность сведений, полученных в ходе исполнения настоящего Договора, в течение срока его действия и после его прекращения. ## 5. Расторжение Любая из сторон вправе расторгнуть Договор, направив письменное уведомление не менее чем за {N} дней. ## 6. Применимое право {Юрисдикция}. --- **Исполнитель:** ____________________ **Заказчик:** ____________________ {ФИО подписанта Исполнителя} {ФИО подписанта Заказчика}
    Connector
  • Execute JavaScript code against the Wix REST API. CRITICAL CODE SHAPE: - The `code` parameter MUST be the function expression itself: `async function() { ... }` or `async () => { ... }`. - Do NOT send a script body like `const result = await ...; return result;`. - Do NOT call the function yourself. The tool calls it for you. - Put all `const`, `await`, and `return` statements inside the function body. Do not rely on memory for Wix API endpoints, methods, schemas, or request bodies. Before writing code, use SearchWixAPISpec or the search, browse, read-docs, and schema tools to confirm the exact API URL, HTTP method, request body structure, schema field names, required fields, enum values, and auth context. Before accessing fields on a response object, know the exact shape — don't guess paths like `result.id` when the actual path might be `result.results[0].item.id`. When you fetch the method schema for the request body, include `responses: method.responses` at the same time — it costs nothing and tells you exactly what fields come back. When SearchWixAPISpec returns a method schema, use `method.publicUrl` for ExecuteWixAPI when available; do not use `method.servers[0]`, which may be an internal Wix host. Pass the docs article, recipe, or schema URLs you used in the `sourceDocUrls` parameter. Then write code using wix.request(). Auth is handled automatically — do NOT set Authorization, wix-site-id, or wix-account-id headers. This tool overlaps with `CallWixSiteAPI` and `ManageWixSite`: all can call Wix REST APIs. Use `ExecuteWixAPI` when code helps express the task: repeating one API call in a loop, paginating through results, transforming data between calls, branching on API responses, or chaining several related API calls in one operation. Probing is useful when it is read-only: use GET/query/list/search calls to inspect existing state, resolve real IDs, confirm response shapes, or verify a previous write. For create/update/delete calls, search docs, read docs, and inspect schemas first; call the mutation only with real resolved inputs, and avoid using placeholder IDs or speculative mutation calls just to discover validation behavior or response shape. If a mutation succeeds but you need more details, use the returned data or follow up with a read-only GET/query; do not repeat the mutation only to get a different response shape. Use `wix.request({ method, url, body })` for API calls. Scope defaults to `"site"` when the ExecuteWixAPI `siteId` parameter is passed, otherwise `"account"`. Set `scope: "site"` explicitly for site-level APIs, which is the common case for business domains such as Stores, Bookings, CRM, Forms, CMS, Events, and Blog. Set `scope: "account"` explicitly for account-level APIs such as Sites, Site Folders, Domains, and User Management, or when the docs/schema indicate account-level auth. A single `ExecuteWixAPI` invocation can target at most one site. For site-level API calls, pass the site ID in the tool-level `siteId` parameter, not inside `wix.request()`. Do not use `wix.request({ siteId: "..." })`; per-request site switching is not supported. Error handling: `wix.request()` throws when the Wix API returns an error. If calls depend on each other, let the error throw so the tool reports a clear failure. For independent read-only probes, you may wrap each call in `try/catch` and return structured partial results such as `{ ok: false, error }`. When running independent calls in parallel, use `Promise.allSettled` rather than `Promise.all` so that a single failure does not discard the other results. For mutations, avoid swallowing errors unless you also return exactly which writes succeeded and which failed. Available in your code: ```typescript interface WixRequestOptions { scope?: "site" | "account"; // Defaults to "site" with ExecuteWixAPI siteId, otherwise "account" method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; url: string; // Prefer method.publicUrl from SearchWixAPISpec, e.g. "https://www.wixapis.com/stores/v1/products/query"; paths like "/stores/v1/products/query" are resolved against https://www.wixapis.com body?: unknown; headers?: Record<string, string>; // Do NOT set Authorization, wix-site-id, or wix-account-id } interface WixResponse<T = unknown> { status: number; data: T; json(): Promise<T>; // Fetch-compatible alias for data } declare const wix: { request<T = unknown>(options: WixRequestOptions): Promise<WixResponse<T>>; }; declare const siteId: string | undefined; // Tool-level siteId passed to ExecuteWixAPI, if any. ``` Your code MUST be an async function expression that returns the result: ```javascript async () => { const response = await wix.request({ method: "GET", url: "https://www.wixapis.com/<account-level-endpoint>" }); return response.data; } ``` The response is available as `response.data`. For compatibility with fetch-style code, `await response.json()` returns the same data. Return compact, task-focused data instead of raw API responses. For list/query/search endpoints, especially "list all" tasks or APIs that may return many items, paginate in code and map each item to the fields needed for the task. Include IDs, metadata, nested fields, or raw response fragments when they are needed to complete the task, disambiguate entities, verify mutations, or answer the user. If the user asks for names and types, return only names and types. For hundreds of items, avoid verbose JSON objects because repeated keys waste tokens; return compact strings such as `"Name - TYPE"` joined with newlines, or small tuples such as `["Name", "TYPE"]`. If the user asks for a specific output value, include that value explicitly in the returned object so the final answer can report it. If you need to filter by a field, verify the endpoint supports that filter in the method docs/schema or related "Supported Filters and Sorting" docs; otherwise retrieve a bounded page and filter in JavaScript. When looking up an item by user-provided name, paginate/search until you find an exact name match; never update or delete the first result unless it exactly matches. Example — site-level request with compact output: ```javascript async function() { const response = await wix.request({ method: "POST", url: "https://www.wixapis.com/<site-level-endpoint>", body: { query: { cursorPaging: { limit: 100 } } } }); const items = response.data.items ?? response.data.results ?? []; return { count: items.length, items: items.map(item => item.name + " - " + item.type).join("\ ") }; } ``` Example — account-level request: ```javascript async function() { const response = await wix.request({ scope: "account", method: "POST", url: "https://www.wixapis.com/<account-level-endpoint>", body: { query: { cursorPaging: { limit: 50 } } } }); return response.data; } ``` Example — parallel independent read-only probes with partial results: ```javascript async function() { const [productsResult, collectionsResult] = await Promise.allSettled([ wix.request({ scope: "site", method: "POST", url: "https://www.wixapis.com/<products-query-endpoint>", body: { query: { cursorPaging: { limit: 10 } } } }), wix.request({ scope: "site", method: "POST", url: "https://www.wixapis.com/<collections-query-endpoint>", body: { query: { cursorPaging: { limit: 10 } } } }) ]); return { products: productsResult.status === "fulfilled" ? { ok: true, count: (productsResult.value.data.items ?? productsResult.value.data.products ?? []).length } : { ok: false, error: String(productsResult.reason) }, collections: collectionsResult.status === "fulfilled" ? { ok: true, count: (collectionsResult.value.data.items ?? collectionsResult.value.data.collections ?? []).length } : { ok: false, error: String(collectionsResult.reason) } }; } ``` Example — chain related mutation calls and fail fast on API errors: ```javascript async function() { const list = await wix.request({ scope: "site", method: "POST", url: "https://www.wixapis.com/<query-endpoint>", body: { query: { cursorPaging: { limit: 20 } } } }); const items = list.data.items ?? []; const match = items.find(item => item.name === "Target name"); if (!match) { return { error: "NOT_FOUND", available: items.map(item => ({ id: item.id, name: item.name })) }; } const updated = await wix.request({ scope: "site", method: "PATCH", url: `https://www.wixapis.com/<update-endpoint>/${match.id}`, body: { item: { id: match.id, revision: match.revision, name: "Updated name" } } }); return { id: updated.data.item?.id, name: updated.data.item?.name, revision: updated.data.item?.revision }; } ```
    Connector
  • Get code from a remote public git repository — either a specific function/class by name, a line range, or a full file. PREFERRED WORKFLOW: When search results or findings have already identified a specific function, method, or class, use symbol_name to extract just that declaration. This avoids fetching entire files and keeps context focused. Only fetch full files when you need a broad understanding of a file you haven't seen before. For supported languages (Go, Python, TypeScript, JavaScript, Java, C, C++, C#, Kotlin, Swift, Rust) the response includes a symbols list of declarations with line ranges. This is not a first-call tool — use code_analyze or code_search first to identify targets, then extract precisely what you need.
    Connector
  • Fetch a webpage and extract specific information using AI. Use this when you need structured data from a page (e.g. pricing, specs, contact info) rather than the raw content. Costs 5 credits. If the page has no usable text (empty or JavaScript-rendered body), the model is NOT called: content comes back empty and usage.low_content is true, rather than a fabricated answer. Gate on usage.low_content (or usage.content_chars) to detect pages you cannot ground on. Returns: content (the extracted text), url, credits_used, credits_remaining, usage (input_tokens, output_tokens, content_chars, low_content). Args: url: The URL to extract from prompt: What information to extract (e.g. "list all pricing tiers with features" or "extract the author name and publication date")
    Connector
  • Deploy or update a serverless function with custom business logic. Example: Input: { app_id: "app_abc123", name: "send-welcome-email", code: "export async function handler(req, ctx) { ... }", trigger: { type: "http", config: { method: "POST", path: "/welcome", auth: "required" } } } Output: { function_id: "fn_xyz789", name: "send-welcome-email", url: "https://api.butterbase.ai/v1/app_abc123/fn/send-welcome-email", status: "deployed" } Function signature: export async function handler(request: Request, context: { db: PostgresClient, // Query your app database env: Record<string, string>, // Access envVars user: { id: string } | null, // Current user (if auth: required) waitUntil: (promise: Promise) => void, // Keep alive for background work after response idempotency: { // Webhook / event dedup primitive claim: (key: string, opts?: { scope?: string; ttlSeconds?: number }) => Promise<boolean> } }): Promise<Response> Console output: console.log(), console.info(), console.warn(), console.error(), and console.debug() calls are captured and stored with invocation logs. View them via manage_function (action: "get_logs"). IMPORTANT: Handlers MUST return a Response object (Web API standard). Do NOT return plain objects like { status: 200, body: "..." }. Idempotent webhook handlers with ctx.idempotency.claim(): Third-party webhook providers (Stripe, Telegram, GitHub, Slack, Twilio, Discord) retry delivery on non-2xx responses with the same event id. Use ctx.idempotency.claim() to atomically dedupe — it returns true if you're the first to see this key, false if another invocation already claimed it. export async function handler(req, ctx) { const event = await req.json(); if (!(await ctx.idempotency.claim(event.id))) { // Already processed — ack the retry without re-doing work. return new Response('duplicate', { status: 200 }); } await processEvent(event); return new Response('ok', { status: 200 }); } Options: - scope: 'stripe' | 'telegram' | ... (default: 'default'). Namespace claims so keys from different providers can never collide. - ttlSeconds: mark the claim with an expiry. Cleanup is your responsibility: DELETE FROM _idempotency_keys WHERE expires_at < now(); Background work with ctx.waitUntil(): Use ctx.waitUntil(promise) to keep the function alive after the response is sent. This is useful for fire-and-forget tasks like sending emails or logging. Background work has a 30-second timeout. ctx.db is available inside waitUntil promises. export async function handler(req, ctx) { ctx.waitUntil(fetch("https://api.email.com/send", { method: "POST", body: "..." })); return new Response(JSON.stringify({ accepted: true }), { headers: { "Content-Type": "application/json" } }); } Example: export async function handler(req, ctx) { const data = { hello: "world" }; return new Response(JSON.stringify(data), { status: 200, headers: { "Content-Type": "application/json" } }); } Row-Level Security in Functions: Functions respect RLS policies based on how they're invoked: - Invoked with end-user JWT → butterbase_user role (RLS enforced) * ctx.db queries see only the user's data * ctx.user.id contains the authenticated user ID * Use case: User-facing operations - Invoked with platform API key → butterbase_service role (RLS bypassed) * ctx.db queries see all data * ctx.user is null * Use case: Admin operations, background jobs - Invoked by cron trigger → butterbase_service role (RLS bypassed) * ctx.db queries see all data * ctx.user is null * Use case: Scheduled tasks, cleanup jobs Trigger types: - http: Invoke via HTTP request (GET, POST, etc) - cron: Schedule periodic execution (e.g., "0 9 * * *" = daily at 9am) - websocket: Trigger on WebSocket event from client via realtime connection - s3_upload: Trigger on file upload [not yet implemented] - webhook: Receive webhooks from external services [not yet implemented] Common errors: - VALIDATION_INVALID_SCHEMA: Check code exports a handler function - RESOURCE_NOT_FOUND: App doesn't exist - Syntax error: Code must be valid TypeScript/JavaScript Idempotency: Safe to call multiple times (updates existing function with same name). Next steps: Use invoke_function to test, then manage_function (action: "get_logs") to debug.
    Connector
  • Fetches any public web page and returns clean, readable plain text stripped of HTML, navigation, scripts, advertisements, and boilerplate. Returns the page title, meta description, word count, and main body text ready for analysis or summarisation. Use this tool when an agent needs to read the content of a specific web page or article URL — for example to summarise an article, extract facts from a page, verify a claim by reading the source, or convert a web page into plain text to pass to another tool. Pass article URLs returned by web_news_headlines to this tool to read full article content. Do not use this tool to discover current news headlines — use web_news_headlines instead. Does not execute JavaScript — best suited for standard HTML content pages. Will not work with paywalled, login-protected, or JavaScript-rendered single-page applications.
    Connector
  • Fetches any public web page and returns clean, readable plain text stripped of HTML, navigation, scripts, advertisements, and boilerplate. Returns the page title, meta description, word count, and main body text ready for analysis or summarisation. Use this tool when an agent needs to read the content of a specific web page or article URL — for example to summarise an article, extract facts from a page, verify a claim by reading the source, or convert a web page into plain text to pass to another tool. Pass article URLs returned by web_news_headlines to this tool to read full article content. Do not use this tool to discover current news headlines — use web_news_headlines instead. Does not execute JavaScript — best suited for standard HTML content pages. Will not work with paywalled, login-protected, or JavaScript-rendered single-page applications.
    Connector
  • Fetches up to 32KB of the domain's HTML and response headers from the edge, then fingerprints the content for known CMS platforms, JavaScript frameworks, CDN providers, and analytics tools. Detection is based on meta generator tags, script src patterns, response headers, and cookie names. Use this tool when: - You need to know what CMS (WordPress, Drupal, Shopify) a site runs. - You are assessing a domain's infrastructure before a security review. - You want to identify analytics or marketing tools a site embeds. Do NOT use this tool when: - You want HTTP headers and security posture — use `intel_http` instead. - You want tracker database classification — use `get_domain` instead. - You need robots.txt AI policy — use `intel_robots` instead. Inputs: - `domain` (query, required): Domain to fingerprint. Returns: - `cms`: detected content management system, or null. - `frameworks`: JavaScript/backend frameworks detected. - `cdn`: CDN provider detected, or null. - `analytics`: analytics and tracking tools detected. - `meta_generators`: raw meta generator tag values. Cost: - Free. No API key required. Latency: - Typical: 2-4s (HTML fetch), p99: 7s.
    Connector