apply_project_changes
ChatGPTAtomically applies one exact, user-approved project draft revision to the live site. Verifies the complete composed project structure and rejects stale draft or live revisions. HTML quality validation happens when content is created or updated, not when the approved draft is applied.
archive_commerce_product
ChatGPTStops offering one exact commerce product without deleting its payment or order history. This also works before Stripe is connected. Warn the user before proceeding. Existing completed purchases remain visible and the product can later be reactivated with update_commerce_product.
check_and_sync_stripe_commerce
ChatGPTChecks whether Stripe commerce is connected and ready for a workspace, synchronizes one bounded batch of compatible Prot0 products still pending in Stripe when payments are ready, and returns the synchronization summary plus the current Prot0 application fee for the owner's plan. productSync.failedProducts identifies up to 50 exact projectId/productId entries and reasons for products needing correction; correct them before retrying and do not loop on unchanged failures. failedProductsTruncated=true means more failed entries will be exposed after the listed ones are corrected. When productSync.hasMore=true and the current batch has no failures, call this tool again until hasMore=false. When failed>0 and failedProducts is empty, productSync.error describes a batch-level failure; report it and at most retry later instead of looping. Never claim every product is payment-ready while failed>0, failedProductsTruncated=true or hasMore=true. This is a mutating recovery operation because it may create Stripe products and save their mappings. If connected but not ready, call setup_stripe_commerce only when the user chooses to continue onboarding; it returns a fresh short-lived link. Products can be created and displayed before ready=true, but checkout cannot accept payments yet. The Stripe Dashboard link is where the owner manages payouts, refunds, disputes and financial reporting. Normal Stripe processing fees are separate from Prot0's applicationFee. This status is unrelated to the user's Prot0 subscription.
configure_commerce_pickup
ChatGPTEnables, updates or disables free local pickup for one exact project. First call get_commerce_shipping_settings and pass its exact revision. When enabled, name is the customer-facing option and instructions explain where or when to collect the order. Pickup does not collect a shipping address in Stripe Checkout; buyer email and phone are still collected. Delivery zones are preserved.
connect_project_domain
ChatGPTConnects one custom domain controlled by the user to a project. Only the workspace owner can use this tool, and only after the project has been published. Basic supports 1 custom domain per account, Creator supports 5 and Pro supports 12. The response contains the exact DNS and certificate-validation records to add at the DNS provider; give those records to the user, then use list_project_domains and never claim activation until ready=true. Ownership is proven through DNS and Prot0 never asks the user to transfer the domain. The existing prot0.com project URL remains active.
create_commerce_product
ChatGPTCreates one product and one reusable one-time Stripe price for an exact project, then returns the product ID that generated page code must use. Connect Stripe first. Before choosing currency or converting the customer-facing price into unitAmount, call list_stripe_commerce_currencies and follow the exact returned minorUnitDigits. Upload product images before this call. imageUrls is the complete gallery of up to 8 exact uploaded assetUrls. If the user identifies one as the cover, main, first or featured image, pass that exact gallery member as coverImageUrl. If a gallery has multiple images and the user does not choose a cover, ask which image should be used. The cover appears first by default in the full product-detail gallery, is returned as imageUrl for lightweight listings and is the image shown by Stripe Checkout. fulfillmentType is required; stockQuantity is also required for physical products and forbidden for every other type. stockQuantity is the absolute total physical stock on hand and may be zero. unitAmount is always an integer in the currency's smallest unit. Before assigning categories, call list_product_categories and reuse exact IDs; if a needed category is absent, call upsert_product_category first. When categories is omitted or empty, Prot0 assigns the protected fallback category for the product type. Use account_required for persistent entitlements or purchase history; digital products and courses enforce it and therefore require project visitor registration/sign-in. Physical goods, services and donations may use guest_allowed.
create_component_draft
ChatGPTCreates one purposeful, self-contained HTML fragment inside one page that uses nested components. Components are ordered sections such as hero, features, gallery or form, not arbitrary tiny DOM nodes. The new component is appended to componentOrder unless afterComponentId is supplied. Submit exactly one component per call so retries and reviews remain small and isolated. Component classic scripts run again whenever the visitor returns to their page. Put the complete component behavior inside one IIFE or one window.pocPageInitializers initializer; never declare const, let or class in the classic script-global scope. Register page-scoped cleanup normally inside that initializer. For every internal project destination, including brand, logo and home controls, pair data-poc-page with the exact planned pageId during creation or exact saved pageId during editing, plus a canonical href to that page slug; href="/" is never valid project navigation. For visitor authentication, subscribe to POC.auth.onChange exactly once during the owning shell or page-component initializer and retain currentUser for later actions; never subscribe inside click, submit, checkout or another interactive handler. Bind each authentication control once with either addEventListener("click", ...) or .onclick, never both. A shell-navigation subscription lives for the document; a page-component subscription registers its unsubscribe function through window.pocRegisterCleanup. Before submitting buyer-commerce HTML, first call get_commerce_guidelines and use its matching catalogViewTemplate, productDetailViewTemplate or cartViewTemplate as the implementation baseline, not merely as guidance. For an existing project, first call get_project(source="draft"). If the response contains shellHtml, the project uses the current shell/page/nested-component architecture; its page entries may include componentOrder. If the response contains body and does not contain shellHtml, the project is legacy and stores complete HTML directly on each page. Use this tool only when projectId came directly from create_project_draft in the current creation flow or get_project returned shellHtml. Never use it when get_project returned body without shellHtml; use the matching legacy page tool instead. Saves only to the shared project draft: the live site and all custom domains remain unchanged. When this call includes generated HTML, it must first pass deterministic runtime, commerce and layout checks; if rejected, correct only the listed issues and retry this tool once in the current response instead of stopping after an explanation. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. During a multi-call creation or edit, keep intermediate previewUrl values internal and present only the final preview after the complete requested draft is assembled and verified. Call apply_project_changes only after the user reviews and explicitly approves that final preview. If the tool reports project_draft_write_limit_exceeded, do not retry the rejected write or discard completed work. First inspect the composed draft and confirm it is structurally valid and coherent on its own. Only then present that bounded preview for approval, apply it after approval, and continue remaining changes in a new draft. If the rejected write left an empty or otherwise invalid page staged, remove only that incomplete page when possible; never present or apply an invalid draft. HTML writes may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
create_page_component
ChatGPTCreates a page component inside an existing multi-component project. The component renders inside the base template; use update_project to modify that template. pageId is the stable internal navigation identifier and slug is its editable public URL segment. Generated HTML receives one advisory UX and platform-rules review. The review never blocks persistence and may return qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
create_page_component_draft
ChatGPTDraft counterpart of create_page_component. Creates one page component only in the shared project draft. Saves only to the shared project draft: the live site and all custom domains remain unchanged. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. Call apply_project_changes only after the user reviews and explicitly approves the preview. It may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
create_page_draft
ChatGPTCreates one page metadata document in a current-architecture draft. A page is a navigable route and contains ordered component documents; this tool never accepts page HTML. After this call, create at least one component with create_component_draft. The first page automatically becomes both defaultPage states. For an existing project, first call get_project(source="draft"). If the response contains shellHtml, the project uses the current shell/page/nested-component architecture; its page entries may include componentOrder. If the response contains body and does not contain shellHtml, the project is legacy and stores complete HTML directly on each page. Use this tool only when projectId came directly from create_project_draft in the current creation flow or get_project returned shellHtml. Never use it when get_project returned body without shellHtml; use the matching legacy page tool instead. Saves only to the shared project draft: the live site and all custom domains remain unchanged. When this call includes generated HTML, it must first pass deterministic runtime, commerce and layout checks; if rejected, correct only the listed issues and retry this tool once in the current response instead of stopping after an explanation. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. During a multi-call creation or edit, keep intermediate previewUrl values internal and present only the final preview after the complete requested draft is assembled and verified. Call apply_project_changes only after the user reviews and explicitly approves that final preview. If the tool reports project_draft_write_limit_exceeded, do not retry the rejected write or discard completed work. First inspect the composed draft and confirm it is structurally valid and coherent on its own. Only then present that bounded preview for approval, apply it after approval, and continue remaining changes in a new draft. If the rejected write left an empty or otherwise invalid page staged, remove only that incomplete page when possible; never present or apply an invalid draft. HTML writes may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
create_project
ChatGPTCreates a project from complete base HTML. Call only after the required HTML is fully generated and the user confirms creation. For multi-component projects, this creates the base template; add individual pages afterwards with create_page_component. Generated HTML receives one advisory UX and platform-rules review. The review never blocks persistence and may return qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
create_project_draft
ChatGPTDraft counterpart of create_project. Creates a new project from complete base HTML without making it publicly visible. Saves only to the shared project draft: the live site and all custom domains remain unchanged. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. Call apply_project_changes only after the user reviews and explicitly approves the preview. It may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
delete_commerce_shipping_zone
ChatGPTPermanently deletes one exact delivery zone after explicit user confirmation. First call get_commerce_shipping_settings, explain which countries and methods will stop accepting delivery, then pass its exact zone ID and revision. Pickup is unaffected. If no delivery zone or pickup remains, new physical-product checkout becomes unavailable until shipping is configured again.
delete_component_draft
ChatGPTStages deletion of one nested page component and removes it from that page componentOrder in the same draft revision. Publication is rejected if this would leave the page without components. For a legacy page, remove one section by safely editing its complete HTML with update_page_component_draft; delete_page_component_draft removes the whole legacy page. For an existing project, first call get_project(source="draft"). If the response contains shellHtml, the project uses the current shell/page/nested-component architecture; its page entries may include componentOrder. If the response contains body and does not contain shellHtml, the project is legacy and stores complete HTML directly on each page. Use this tool only when projectId came directly from create_project_draft in the current creation flow or get_project returned shellHtml. Never use it when get_project returned body without shellHtml; use the matching legacy page tool instead. Saves only to the shared project draft: the live site and all custom domains remain unchanged. When this call includes generated HTML, it must first pass deterministic runtime, commerce and layout checks; if rejected, correct only the listed issues and retry this tool once in the current response instead of stopping after an explanation. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. During a multi-call creation or edit, keep intermediate previewUrl values internal and present only the final preview after the complete requested draft is assembled and verified. Call apply_project_changes only after the user reviews and explicitly approves that final preview. If the tool reports project_draft_write_limit_exceeded, do not retry the rejected write or discard completed work. First inspect the composed draft and confirm it is structurally valid and coherent on its own. Only then present that bounded preview for approval, apply it after approval, and continue remaining changes in a new draft. If the rejected write left an empty or otherwise invalid page staged, remove only that incomplete page when possible; never present or apply an invalid draft. HTML writes may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
delete_page_component
ChatGPTPermanently deletes one page component from a project and automatically remaps any affected defaultPage state to a remaining component, or clears it when none remain. Warn the user before proceeding.
delete_page_component_draft
ChatGPTDraft counterpart of delete_page_component. Stages removal of one page component and atomically remaps affected defaultPage states. The live site is unchanged until the user reviews the preview and approves apply_project_changes. Saves only to the shared project draft: the live site and all custom domains remain unchanged. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. Call apply_project_changes only after the user reviews and explicitly approves the preview. It may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
delete_page_draft
ChatGPTStages deletion of one current-architecture page and all of its nested components. Affected defaultPage states are remapped atomically when another page remains. Publication is rejected if no page remains. Legacy projects use delete_page_component_draft. For an existing project, first call get_project(source="draft"). If the response contains shellHtml, the project uses the current shell/page/nested-component architecture; its page entries may include componentOrder. If the response contains body and does not contain shellHtml, the project is legacy and stores complete HTML directly on each page. Use this tool only when projectId came directly from create_project_draft in the current creation flow or get_project returned shellHtml. Never use it when get_project returned body without shellHtml; use the matching legacy page tool instead. Saves only to the shared project draft: the live site and all custom domains remain unchanged. When this call includes generated HTML, it must first pass deterministic runtime, commerce and layout checks; if rejected, correct only the listed issues and retry this tool once in the current response instead of stopping after an explanation. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. During a multi-call creation or edit, keep intermediate previewUrl values internal and present only the final preview after the complete requested draft is assembled and verified. Call apply_project_changes only after the user reviews and explicitly approves that final preview. If the tool reports project_draft_write_limit_exceeded, do not retry the rejected write or discard completed work. First inspect the composed draft and confirm it is structurally valid and coherent on its own. Only then present that bounded preview for approval, apply it after approval, and continue remaining changes in a new draft. If the rejected write left an empty or otherwise invalid page staged, remove only that incomplete page when possible; never present or apply an invalid draft. HTML writes may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
delete_product_category
ChatGPTPermanently deletes one exact project category after explicit user confirmation. First call list_product_categories and warn how many active or archived products productCount says will be affected. The category is removed from every affected Prot0 product and from Stripe when that product is synchronized. A product that would otherwise have no category receives a protected automatic fallback based on its fulfillment type, so storefront filtering remains valid. This operation is resumable after a transient failure. Automatic system categories cannot be deleted.
delete_project
ChatGPTPermanently deletes a project identified by projectId or publicLink, including its page components, uploaded assets and connected custom domains. Warn the user before proceeding.
delete_project_asset
ChatGPTPermanently deletes a project image. Restoring a project version cannot recover deleted files, so warn the user before proceeding. If the exact imageName is unknown, call get_project first.
delete_project_record
ChatGPTPermanently deletes one record from a project collection. If the exact documentId, collectionName, or visibility is unknown, call view_project_records first and identify the intended record before deleting it.
delete_workspace
ChatGPTPermanently deletes one workspace and all its projects, pages, records and images. Only the workspace owner can use this tool. Prot0 user accounts are not deleted. Warn the user before proceeding.
discard_project_draft
ChatGPTDiscards one exact project draft revision without changing the live site. Use only after the user explicitly asks to discard it.
generate_project_image
ChatGPTGenerates exactly one purposeful image with GPT Image 2 at medium quality, validates and optimizes it through the same project-asset pipeline used by uploads, stores it under imageName, and returns its project-relative assetUrl. Generation consumes Prot0 credits based on actual model usage and stored bytes count toward the workspace owner's plan-wide storage quota. Choose aspectRatio from the image's real placement: square for balanced tiles or avatars, portrait for vertically composed media, landscape for standard horizontal sections, and wide for cinematic hero backgrounds. This tool only saves the asset; it never edits HTML or makes the image visible. Apply assetUrl exactly as returned to the relevant draft with update_project_draft or update_page_component_draft before claiming the preview is ready. Generate one image per call and do not use it for generic filler or repeated variants unless the user requests them.
get_commerce_guidelines
ChatGPTReturns the complete buyer-commerce playbook: the mandatory storefront rules, SDK contracts, shipping selector contract, catalog/cart/checkout flow and the catalogViewTemplate, productDetailViewTemplate and cartViewTemplate reference implementations. Call this before generating or editing any HTML for a project that presents products, a catalog, a cart or online payments, and before using the commerce product, shipping or order tools for storefront work. Not needed for projects without commerce.
get_commerce_order
ChatGPTReturns one exact project commerce order with its complete available customer-facing fulfillment timeline, buyer identity and private Stripe Dashboard payment link when available. Use view_commerce_orders first when the order ID is unknown. This owner-only MCP result is { ok, order }; its order.fulfillment is null until the merchant adds an update, otherwise { status, message, tracking:{ carrier, number, url }|null, estimatedDeliveryAt, updatedAt, updates:[...], hasMore, nextCursor }. updates are newest first; pass nextCursor unchanged as updatesCursor to retrieve older updates. Generated page code must instead use const order = await POC.commerce.orders.get(orderId, { updatesCursor, updatesLimit }); it returns the Order directly, never { ok, order } and never order.data. The browser SDK requires a project visitor signed into that exact project, returns only that buyer's completed purchase, never exposes buyer identity or stripeDashboardUrl, and returns not found for another buyer's order. Use one reusable localized detail view at its actual saved slug: order cards pass order.id as the orderId query parameter, and the detail view reads it with URLSearchParams before calling orders.get. Never put full order details in an inline disclosure, create one component per order or hardcode order or fulfillment data. Buyer order.status is paid, partially_refunded, refunded or disputed; order.paymentStatus is paid, unpaid or no_payment_required; fulfillment.status and every fulfillment.updates[].status are processing, ready_for_pickup, shipped, delayed, delivered, completed or canceled. These are machine codes: define localized labels for every listed value and never render them directly.
get_commerce_product
ChatGPTReturns the full current detail of one exact project commerce product. Important response distinction: this owner-only MCP tool returns { ok, product } and product.inventory additionally includes stockQuantity and reservedQuantity for inventory management. Generated page code must use const product = await POC.commerce.products.get(productId), which returns the Product directly and exposes only inventory { tracked, availableQuantity, inStock }; never expect owner-only stock fields in browser code. Never use (await POC.commerce.products.get(productId)).data or .product. Read product.id, product.name, product.description, product.imageUrl, product.coverImageUrl, product.imageUrls, product.categories, product.categoryDetails, product.inventory, product.price.unitAmount and product.price.currency directly. categories contains stable filter IDs; display the corresponding categoryDetails[].name values to buyers. product.imageUrl and product.coverImageUrl are the same selected cover; product.imageUrls is the complete ordered gallery with that cover first. Product-detail UI must show the full gallery when it contains multiple images and initially select the cover. Use list_commerce_products first when the product ID is unknown. Featured-product and product-detail HTML must contain only the exact productId and fetch every displayed product field through this SDK method; never hardcode a second copy of its name, price, image, description or availability. In a multi-component catalog, use one reusable detail component whose slug matches the project's language and content. Link to it with an ordinary same-origin link without data-poc-page and the exact stable product ID in the query string, for example const href = '/producto?productId=' + encodeURIComponent(product.id) or use /product for English. Read productId with URLSearchParams and call POC.commerce.products.get(productId). Do not create one component per product or use a Stripe Product or Price ID. Browser Product is { id, active, name, description, imageUrl, coverImageUrl, imageUrls, categories, categoryDetails, purchaseAccess, fulfillmentType, paymentsReady, inventory:{ tracked, availableQuantity, inStock }, price:{ id, currency, unitAmount } }. paymentsReady reports synchronization only and does not select the storefront sales mode; follow COMMERCE CART AND CHECKOUT before adding cart or checkout UI. inventory.tracked=false means unlimited; otherwise enforce availableQuantity in the UI and disable purchasing when inStock=false. Use an exact product ID obtained from a listing or this tool.
get_commerce_shipping_settings
ChatGPTReturns the current per-project delivery zones, local-pickup option, exact revision and physical-product currencies requiring rates. Call after physical products and their currencies are known, before editing shipping and before claiming checkout is ready. configured=false means new physical-product checkout must remain unavailable until delivery or pickup is configured. Every zone country is exclusive to that zone. Prices are integer minor units.
get_component
ChatGPTRetrieves one nested page component from the current shell/page/component architecture, including its complete HTML fragment. Legacy projects whose complete page HTML is stored directly on each page use get_page_component instead. For edits use source="draft", change only the requested content, preserve every unrelated behavior in this fragment, then call update_component_draft with the exact draftRevision. For an existing project, first call get_project(source="draft"). If the response contains shellHtml, the project uses the current shell/page/nested-component architecture; its page entries may include componentOrder. If the response contains body and does not contain shellHtml, the project is legacy and stores complete HTML directly on each page. Use this tool only when projectId came directly from create_project_draft in the current creation flow or get_project returned shellHtml. Never use it when get_project returned body without shellHtml; use the matching legacy page tool instead.
get_component_exact_version
ChatGPTRetrieves the exact complete HTML fragment of one nested page component from a saved project version. First use get_project_exact_version and get_page_component_exact_version to identify the page and component IDs.
get_page
ChatGPTRetrieves current-architecture page metadata and its exact componentOrder without returning component HTML. Use get_component for the one nested component you need to inspect or edit. Legacy projects whose complete page HTML is stored directly on each page use get_page_component instead. With source="draft", the result includes the exact draftRevision required by the next draft write. For an existing project, first call get_project(source="draft"). If the response contains shellHtml, the project uses the current shell/page/nested-component architecture; its page entries may include componentOrder. If the response contains body and does not contain shellHtml, the project is legacy and stores complete HTML directly on each page. Use this tool only when projectId came directly from create_project_draft in the current creation flow or get_project returned shellHtml. Never use it when get_project returned body without shellHtml; use the matching legacy page tool instead.
get_page_component
ChatGPTRetrieves the title, slug and complete HTML of one page component. Use get_project first to find its pageId. For normal reviewed edits, pass source="draft", use the complete returned HTML as the baseline, preserve every unrelated part, and call update_page_component_draft with its exact draftRevision.
get_page_component_exact_version
ChatGPTRetrieves one page component title and HTML from a project version. Use get_project_exact_version first to discover the page IDs stored in that version.
get_project
ChatGPTRetrieves project metadata, visibility, userAuth settings, complete base HTML, images map, and page map. For normal reviewed edits, pass source="draft", use the complete returned body as the baseline, preserve every unrelated part, and call update_project_draft with its exact draftRevision. For multi-component projects, the page map contains page IDs, titles and public slugs but not page HTML; use get_page_component with the same source to retrieve it. Reuse URLs from the images map when editing HTML. To obtain one stored image's exact size, pass its exact project-relative URL from this images map to view_storage_usage together with workspaceId and this projectId or publicLink. When the user asks to view or receive a stored image, provide its full browser URL by appending its project-relative image URL to publicUrl, whether the project is public or private. For a private project, explain that they must first sign in at publicUrl in the same browser, then open the image URL; do not claim that private images cannot be linked or require creating a gallery.
get_project_exact_version
ChatGPTRetrieves the project-level snapshot at one version, including base HTML, title, publicLink, settings, and images. Page component HTML is excluded; use get_page_component_exact_version for it.
get_project_showcase_status
ChatGPTReturns the current Showcase participation, review status, public-listing state and rejection reason for one project. Call this when the user asks whether a page was submitted, approved, rejected, suspended, withdrawn or is currently visible on https://prot0.com/showcase, or asks why it was rejected. This tool is read-only. Never call set_project_showcase_preference merely to inspect status.
get_prot0_project_guidelines
ChatGPTCall this tool at the start of every new conversation. Returns the rules, standards and page template for generating Prot0 projects. Always call this first before generating any HTML.
list_commerce_products
ChatGPTReturns a lightweight, bounded page of products for one project, ordered by name. Generated-browser contract: const response = await POC.commerce.products.list({ category, cursor, limit }); response is { data: ProductSummary[], hasMore, nextCursor }, so use const products = response.data; never treat response as an array or read response.products or response.items. For complete dynamic filters, call POC.commerce.categories.list({ cursor, limit }); it returns { data: Category[], hasMore, nextCursor }, where Category is { id, name, system, systemType, deleting, productCount, activeProductCount }. Follow its cursor until hasMore=false, omit deleting categories and categories whose activeProductCount is zero from buyer filters, display category.name and pass the exact category.id to products.list. Never use a visible name as the filter key. The owner-only MCP result additionally contains ok and, for inventory management, product.inventory.stockQuantity and reservedQuantity; generated page code must not expect those owner-only fields. Generated catalog HTML must render this SDK response; never duplicate product names, prices, images, availability or other product data as static HTML. Keep listing cards to the most useful summary fields and use imageUrl as the cover; imageUrls is intentionally omitted from summaries, so open a reusable detail view and call products.get for the complete gallery and information. Use category for one exact category-ID filter and pass the returned nextCursor unchanged as cursor in the next call; never guess or modify it. When hasMore=true, render a working localized "Load more" control or equivalent cursor navigation: preserve category and limit, request the next page with nextCursor, append response.data without duplicates, replace the stored cursor, and hide the control when hasMore=false. Reset results and cursor when filters change; never leave buyers with only the first page while more products exist. By default only active products are returned. Each browser ProductSummary is { id, active, name, imageUrl, categories, categoryDetails, purchaseAccess, fulfillmentType, paymentsReady, inventory:{ tracked, availableQuantity, inStock }, price:{ id, currency, unitAmount } }. paymentsReady reports product synchronization only; it does not select the storefront sales mode. Always keep catalog behavior available, include a cart only under COMMERCE CART AND CHECKOUT, and call checkout only for an online-payment flow. categories contains stable IDs for filtering; categoryDetails contains { id, name, system, systemType, deleting } for customer-facing labels. When inventory.tracked=false, availableQuantity is null and inventory is unlimited; when tracked=true, never let the buyer select more than availableQuantity and disable purchase when inStock=false. Price is nested: use product.price.unitAmount and product.price.currency, never product.unitAmount or product.currency. description is intentionally omitted; call POC.commerce.products.get(productId) for full detail. Never request an unbounded catalog.
list_commerce_shipping_countries
ChatGPTLists the authoritative countries supported by Stripe hosted Checkout for Prot0 delivery zones. Results are localized, sorted and paginated. Use exact two-letter code values when configuring a zone. When hasMore=true, pass nextCursor unchanged with the same locale and search until the needed country is found; never invent country codes.
list_product_categories
ChatGPTLists the authoritative product-category catalog for one exact project. Call this before creating a product or whenever an update will change categories. Reuse the exact category.id values returned here; category IDs are stable storefront-filter keys and category names are customer-facing labels that may be renamed without breaking filters. Results are ordered by name and paginated. Pass nextCursor back unchanged while hasMore=true to inspect every category. search is an optional normalized prefix search for autocomplete. productCount includes active and archived products; activeProductCount counts only products buyers can currently list.
list_project_domains
ChatGPTLists a project's custom domains and their current DNS, hostname and SSL activation status. For the workspace owner, this refreshes status from the domain provider. A domain is usable only when ready=true.
list_project_files
ChatGPTLists the files registered in one project with pagination and includes their names, types, sizes and usage. Start with offset=0. If hasMore=true, call this tool again with offset=nextOffset while preserving workspaceId, projectId, limit and order; continue until the requested file is found or hasMore=false. Each file can contain both assetUrls and downloadUrl, which have strictly different purposes. assetUrls are stable project-relative references for internal project use: use them exactly as returned in HTML, products and tool inputs; never show them to the user as links and never construct, modify or guess one. downloadUrl is a temporary authorized link for the user to open or download that file: give it to the user when they ask to see, receive or download a file, but never save it in HTML, products, project data or any persistent field. downloadUrl expires after downloadUrlExpiresInSeconds; if it expires, call list_project_files again. An unavailable file has no usable downloadUrl.
list_project_users
ChatGPTLists visitors who completed verified registration or sign-in for one project. This owner-side tool returns a bounded page with name, email, provider, verification/status and registration/last-login timestamps; it never returns internal user IDs. Identify the project with exactly one of projectId or publicLink. totalCount is the project-wide registered-user count, while returnedCount is this page size. Results are ordered by registration time. When hasMore=true, pass nextCursor unchanged with the same workspace, project identifier and order to get the next page. If the user asks for all registered users, keep paging in the same turn until hasMore=false instead of stopping after the first page. This tool is only for the owner or authorized workspace collaborators through Prot0 agents; generated page code cannot call it.
list_project_versions
ChatGPTLists available project versions with their version number, trigger, title, publicLink, page IDs, and creation time. Use this before retrieving or restoring a version.
list_projects
ChatGPTLists projects in a workspace with their identifiers, titles, visibility, userAuth settings, public URLs, component settings, data collections, and update time.
list_stripe_commerce_currencies
ChatGPTLists payment currencies for one workspace. Before Stripe is connected, it returns Stripe's current general payment-currency catalog with accountValidated=false; after connection, it returns the exact currencies permitted for that account country with accountValidated=true. Call this before creating a product or changing its currency, then use an exact returned code. A pre-connection choice may need adjustment after the account country is known. displayFractionDigits controls what the owner can enter and see; minorUnitDigits controls unitAmount sent to product tools. For example, a value of 179.00 with minorUnitDigits=2 is unitAmount=17900, while JPY 179 with minorUnitDigits=0 is unitAmount=179. Never infer decimal behavior from the code alone.
list_workspace_members
ChatGPTLists workspace members, roles, scopes and editor access status, together with the workspace editor limit. Use this to inspect access or identify a member before updating or removing them.
list_workspaces
ChatGPTLists every workspace the authenticated user can access, including workspaceId, name, isDefault and ownerUserId. Use the user's explicit choice when provided; otherwise select isDefault=true, or the sole workspace, without asking. If multiple workspaces have no clear choice, ask the user. Names are not unique, so identify workspaces by workspaceId; when matching names are ambiguous, call list_projects for each and summarize their projects.
remove_project_domain
ChatGPTPermanently disconnects one custom domain from a project. Only the workspace owner can use this tool. The project remains available at its prot0.com URL.
remove_workspace_member
ChatGPTPermanently removes a non-owner workspace member, revoking workspace tool and Private-project page access without deleting their Prot0 account. To suspend access while preserving the membership, use upsert_workspace_member with status="inactive" instead.
restore_project_version
ChatGPTRestores project content from a previous version, overwriting the current base HTML, title, publicLink, component settings, and page components. Visibility remains unchanged, and the restored state is saved as a new version. Deleted asset files are not restored, so warn the user before proceeding.
set_project_showcase_preference
ChatGPTSubmits a published Public project to https://prot0.com/showcase, or withdraws it, after the user explicitly confirms that choice. optedIn=true starts a manual review and does not guarantee approval; optedIn=false removes Showcase participation. This tool never changes the project's Published or Private visibility. Only the workspace owner or an active admin may use it. Never call this tool merely to inspect current status or a rejection reason; call get_project_showcase_status instead.
setup_stripe_commerce
ChatGPTStarts or continues Stripe-hosted onboarding for one workspace so its projects can accept one-time customer payments. Call only when the user explicitly chooses to configure Stripe or asks to start receiving payments; products may be created first. For a new commerce project, call after create_project_draft and its requested draft components are saved so its intended https://{publicLink}.prot0.com selling URL is known; first call check_and_sync_stripe_commerce and skip setup when ready=true. Only the workspace owner can connect the financial account. Return onboardingUrl as a clickable link and explicitly tell the user to enter that intended project URL when Stripe asks for their business website. (If the user is creating the page and its first version has not been applied yet, also explain that this public URL will become available only after they approve the preview and the first draft is applied.) Before returning the link, clearly state the exact applicationFee.percent returned by this tool, that normal Stripe processing fees are separate and that completed checkout payments are real charges. Explain that Stripe collects the business country, identity, bank, tax and verification details directly; Prot0 never asks for or stores the user's Stripe secret key. This is separate from Prot0 plan and credit billing.
update_commerce_order_fulfillment
ChatGPTAdds a customer-visible operational update to one exact paid commerce order and returns the updated detailed order. This never changes or refunds Stripe payment status. Use view_commerce_orders and get_commerce_order first when the order is ambiguous. status must describe fulfillment only: processing, ready_for_pickup, shipped, delayed, delivered, completed or canceled. canceled means fulfillment stopped and does not refund the payment; direct refund requests to the order's Stripe Dashboard link. customerMessage, tracking details and estimatedDeliveryAt are shown to the buyer, so never put private staff notes or sensitive data in them. Omitted tracking and estimated-delivery fields preserve their latest values; pass null to clear one. trackingUrl must be HTTPS. Each call appends an immutable timeline entry, newest first. Generated pages cannot call this owner tool; signed-in buyers read their own updates with POC.commerce.orders.get(orderId).
update_commerce_product
ChatGPTUpdates one exact project commerce product. Omitted fields are preserved. Before changing categories, call list_product_categories and reuse exact IDs; call upsert_product_category first only when the requested category does not exist. Never send categories during an unrelated edit. To add, remove or reorder gallery images, send the complete replacement imageUrls; the current cover appears first by default. To change only the cover, send coverImageUrl without imageUrls. If the user asks to make an image the cover, main, primary, featured or first image, update coverImageUrl with this tool so listings, featured products, carts, product details and Stripe remain consistent. Treat the request only as a view-specific display order when the user explicitly says it should apply to that view alone; otherwise never implement it only by reordering or hardcoding a separate HTML gallery. coverImageUrl must exactly match a gallery member. When a replacement gallery has multiple images and does not retain the current cover, ask the user to choose and send coverImageUrl. Upload new images first. For a physical product, stockQuantity sets the absolute total stock on hand; omit it when stock is not changing. A legacy physical product with inventory.tracked=false remains unlimited until stockQuantity is explicitly set. Changing a non-physical product to physical requires stockQuantity. Changing a tracked physical product to another type removes inventory tracking only when no Checkout reservation is active. Do not provide stockQuantity for non-physical products. Changing the amount or currency creates a new one-time Stripe Price and makes it the default, preserving past order history. This does not edit project HTML: after a material catalog or layout change, fetch the current project/component and apply only the requested HTML change. Digital products and courses require account_required and project visitor login.
update_component_draft
ChatGPTUpdates one nested page component name and/or complete HTML fragment. First call get_component(source="draft"), change only what the user requested, preserve every unrelated behavior inside that component, and submit the complete modified fragment in the same turn. The requested edit already authorizes this technical full-fragment resubmission, so never ask separately for permission to replace the component. This isolates the edit from the shell, page metadata and sibling components. Component classic scripts run again whenever the visitor returns to their page. Put the complete component behavior inside one IIFE or one window.pocPageInitializers initializer; never declare const, let or class in the classic script-global scope. Register page-scoped cleanup normally inside that initializer. For every internal project destination, including brand, logo and home controls, pair data-poc-page with the exact planned pageId during creation or exact saved pageId during editing, plus a canonical href to that page slug; href="/" is never valid project navigation. For visitor authentication, subscribe to POC.auth.onChange exactly once during the owning shell or page-component initializer and retain currentUser for later actions; never subscribe inside click, submit, checkout or another interactive handler. Bind each authentication control once with either addEventListener("click", ...) or .onclick, never both. A shell-navigation subscription lives for the document; a page-component subscription registers its unsubscribe function through window.pocRegisterCleanup. Before submitting buyer-commerce HTML, first call get_commerce_guidelines and use its matching catalogViewTemplate, productDetailViewTemplate or cartViewTemplate as the implementation baseline, not merely as guidance. For an existing project, first call get_project(source="draft"). If the response contains shellHtml, the project uses the current shell/page/nested-component architecture; its page entries may include componentOrder. If the response contains body and does not contain shellHtml, the project is legacy and stores complete HTML directly on each page. Use this tool only when projectId came directly from create_project_draft in the current creation flow or get_project returned shellHtml. Never use it when get_project returned body without shellHtml; use the matching legacy page tool instead. Saves only to the shared project draft: the live site and all custom domains remain unchanged. When this call includes generated HTML, it must first pass deterministic runtime, commerce and layout checks; if rejected, correct only the listed issues and retry this tool once in the current response instead of stopping after an explanation. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. During a multi-call creation or edit, keep intermediate previewUrl values internal and present only the final preview after the complete requested draft is assembled and verified. Call apply_project_changes only after the user reviews and explicitly approves that final preview. If the tool reports project_draft_write_limit_exceeded, do not retry the rejected write or discard completed work. First inspect the composed draft and confirm it is structurally valid and coherent on its own. Only then present that bounded preview for approval, apply it after approval, and continue remaining changes in a new draft. If the rejected write left an empty or otherwise invalid page staged, remove only that incomplete page when possible; never present or apply an invalid draft. HTML writes may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
update_page_component
ChatGPTUpdates the title, HTML and/or public slug of an existing page component. Use update_project instead for the base template. When changing html, first call get_page_component, use its complete current html as the baseline, modify only what the user requested, preserve everything else, and submit the complete modified component in the same turn because html replaces the saved component. Do not stop after describing the edit or uploading an asset. Generated HTML receives one advisory UX and platform-rules review. The review never blocks persistence and may return qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
update_page_component_draft
ChatGPTDraft counterpart of update_page_component. Updates a component title, slug, and/or complete HTML. Whenever component HTML content is being edited, resubmitting the complete current component HTML is the normal save mechanism even for one small text change, not a redesign. The requested HTML edit authorizes that technical resubmission: retrieve the complete draft HTML, preserve every unrelated behavior, and call this tool in the same turn without asking separately for permission to replace the whole component. Saves only to the shared project draft: the live site and all custom domains remain unchanged. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. Call apply_project_changes only after the user reviews and explicitly approves the preview. It may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
update_page_draft
ChatGPTUpdates current-architecture page metadata or reorders its complete componentOrder. It never edits component HTML; use update_component_draft for that. When componentOrder is supplied it must contain every current component ID exactly once. For an existing project, first call get_project(source="draft"). If the response contains shellHtml, the project uses the current shell/page/nested-component architecture; its page entries may include componentOrder. If the response contains body and does not contain shellHtml, the project is legacy and stores complete HTML directly on each page. Use this tool only when projectId came directly from create_project_draft in the current creation flow or get_project returned shellHtml. Never use it when get_project returned body without shellHtml; use the matching legacy page tool instead. Saves only to the shared project draft: the live site and all custom domains remain unchanged. When this call includes generated HTML, it must first pass deterministic runtime, commerce and layout checks; if rejected, correct only the listed issues and retry this tool once in the current response instead of stopping after an explanation. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. During a multi-call creation or edit, keep intermediate previewUrl values internal and present only the final preview after the complete requested draft is assembled and verified. Call apply_project_changes only after the user reviews and explicitly approves that final preview. If the tool reports project_draft_write_limit_exceeded, do not retry the rejected write or discard completed work. First inspect the composed draft and confirm it is structurally valid and coherent on its own. Only then present that bounded preview for approval, apply it after approval, and continue remaining changes in a new draft. If the rejected write left an empty or otherwise invalid page staged, remove only that incomplete page when possible; never present or apply an invalid draft. HTML writes may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
update_project
ChatGPTUpdates project-level metadata, visibility, end-user authentication, component settings, or the base HTML template. It does not edit individual page components; use update_page_component for those. When changing body, first call get_project, use its complete current body as the baseline, modify only what the user requested, preserve everything else, and submit the complete modified document in the same turn because body replaces the saved base HTML. Do not stop after describing the edit or uploading an asset. A change limited to visibility or userAuth does not create a content version, and restoring a version never changes either setting. Generated HTML receives one advisory UX and platform-rules review. The review never blocks persistence and may return qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
update_project_draft
ChatGPTDraft counterpart of update_project. Updates metadata, settings, component configuration, or the complete base HTML. Whenever base HTML content is being edited, resubmitting the complete current base HTML is the normal save mechanism even for one small text change, not a redesign. The requested HTML edit authorizes that technical resubmission: retrieve the complete draft source, preserve every unrelated behavior, and call this tool in the same turn without asking separately for permission to replace the whole template. Saves only to the shared project draft: the live site and all custom domains remain unchanged. The result returns an exact draftRevision and private previewUrl. Use that revision for the next draft write. Call apply_project_changes only after the user reviews and explicitly approves the preview. It may also return non-blocking qualityRecommendations; follow the single-review guidance from get_prot0_project_guidelines and continue the requested workflow.
upload_project_asset
ChatGPTDownloads, validates, optimizes, and stores one project image up to 20 MB under a descriptive imageName, then returns its project-relative assetUrl. Stored bytes count toward the workspace owner's plan-wide storage quota across all owned workspaces. This tool only saves the asset; it never makes the image visible. In the normal review workflow, apply assetUrl exactly as returned to every relevant draft HTML reference with update_project_draft or update_page_component_draft before claiming the preview is ready; after apply, asset access follows the project visibility. Use the legacy stable tools only when the user explicitly requests an immediate live write. Provide exactly one source: imageUrl for a public URL, imageFile for a ChatGPT attachment, or webChatImage for a Prot0 web-chat attachment. Never insert the original URL directly when upload succeeds. If upload fails, an original public URL may be used only as an explicitly disclosed temporary fallback after telling the user it was not persisted, may break later, and should be uploaded again.
upload_project_file
ChatGPTValidates and stores one PDF, MP3, M4A (AAC), or WAV (PCM) file up to 20 MB. PDF files must open without a password. Files count toward the workspace owner's storage quota. Returns an exact project-relative assetUrl and registers it in the existing images map. For music, put that URL in an <audio controls> element. For PDFs, use a download link with target="_blank" and rel="noopener" so it opens outside the editor preview. Saving a file does not update the page: add the returned URL to the draft with update_project_draft or update_page_component_draft. Provide exactly one source: fileUrl, file for a ChatGPT attachment, or webChatFile for a Prot0 chat attachment.
upsert_product_category
ChatGPTCreates or renames one customer-facing product category in an exact project. To create, omit categoryId and provide the desired name; use the returned stable ID in product tools. To rename, first call list_product_categories and pass its exact categoryId. Renaming changes the visible label everywhere that uses categoryDetails but never changes the stable ID used by POC.commerce.products.list({ category }) filters. Never invent categoryId and never use this tool merely to attach a category to one product.
upsert_workspace
ChatGPTCreate or update a workspace. Omit workspaceId to create a new workspace. Provide workspaceId to update name, description, or active state. The workspace name is an organizational label for projects and members and does not need to be unique. Use workspaceId to identify a specific workspace. Workspace names must be kebab-case, 3-30 characters.
upsert_workspace_member
ChatGPTAdds or updates an existing Prot0 user as a workspace member. The user must already be registered by connecting the Prot0 MCP to a supported AI agent. Existing memberships preserve omitted fields. Membership grants access to every project in the workspace according to the selected role. site_viewer provides browser access to Private projects but no MCP scopes or source access; viewer is read-only; member can edit projects; admin can also manage members. The owner and active member/admin users consume the workspace editor limit, while viewer and site_viewer do not. Each person spends their own credits when executing tools. Use status="inactive" to suspend all access without deleting the membership; use remove_workspace_member only for permanent removal.
view_commerce_orders
ChatGPTReturns a bounded page of Stripe commerce orders received by one project, newest first, including trusted payment state, line items, buyer identity when available, and a compact customer-facing fulfillment summary when the merchant has added one. Generated-browser contract for a signed-in customer area: const response = await POC.commerce.orders.list({ status, cursor, limit }); response is { data: Order[], hasMore, nextCursor }, so use const orders = response.data; never treat response as an array or read response.orders or response.items. The MCP tool result additionally contains ok and may include buyer identity, but generated page code must not expect either. This owner-facing tool returns every payment status by default and can filter by one of: pending, paid, failed, expired, refunded, partially_refunded or disputed; use pending to follow up on Checkout attempts that did not finish. Unlike this owner tool, the buyer SDK returns only purchases that reached payment: paid, partially_refunded, refunded or disputed; it never returns pending, failed or expired Checkout attempts. Pass the returned nextCursor unchanged as cursor in the next call. Call get_commerce_order with an exact order ID for its complete fulfillment-update history. Completed-payment orders include stripeDashboardUrl when available; present it as a clickable link when the user wants to inspect Stripe-managed payment, shipping-address, refund or dispute details. Stripe login and permission for the connected account are still required. The buyer SDK never receives this private Dashboard link. Refunds, disputes, payouts and financial reporting remain managed in the connected owner's Stripe Dashboard. Do not use view_project_records for these platform-controlled orders. Each owner-facing Order is { id, mode, status, paymentStatus, currency, amountSubtotal, amountTotal, amountRefunded, items:[{ productId, name, quantity, unitAmount }], createdAt, paidAt, fulfillment:null|{ status, message, tracking, estimatedDeliveryAt, updatedAt }, stripeDashboardUrl? }; all amount fields are integer minor units. Buyer order.status is paid, partially_refunded, refunded or disputed; order.paymentStatus is paid, unpaid or no_payment_required; fulfillment.status is processing, ready_for_pickup, shipped, delayed, delivered, completed or canceled. These are machine codes: generated pages must define localized labels for every listed value and never render them directly. status/paymentStatus are controlled by Stripe; fulfillment is separate merchant-managed progress. By default, render each customer purchase with its product names, quantities, formatted line prices and order total, purchase date and localized human-readable statuses; keep the order id smaller and secondary for support. Do not add developer or security notices about Stripe, passwords, card storage, authentication or SDK behavior unless the user explicitly requests them. await POC.commerce.orders.hasPurchased(productId) returns a boolean directly, never an object or .data. Both browser APIs are restricted to the current signed-in project user and never expose another buyer's orders.
view_project_records
ChatGPTRetrieves records from one project collection. Use this to view data submitted or shared through a page, such as orders, registrations, or messages. Each record includes a trusted creator with uid, email, name and type when it was submitted by an authenticated project user or workspace member; anonymous and older unlinked records return creator=null. Private file attachments include a temporary authorized downloadUrl that expires after 15 minutes.
view_storage_usage
ChatGPTReturns exact stored-image usage at one requested level without returning an asset inventory. Always pass workspaceId. With no project identifier, it returns the effective plan and total, used and available storage shared account-wide across every workspace owned by the selected workspace owner. With exactly one of projectId or publicLink, it returns only that project's aggregate stored usage. To inspect one image, first call get_project, then pass the project identifier and the exact project-relative assetUrl from its images map; this returns the optimized file's final stored size. Never construct or guess assetUrl. Values are returned as exact bytes and readable units.