{
  "name": "read_runtime",
  "description": "Read custom JavaScript saved through the Page Builder runtime lane. This lane is separate from section HTML and CSS. Use it for page-level or reusable-part behavior only. Warning: do not rely on section root id attributes in runtime code. Page Builder owns section root ids and may replace them with system ids like upb-section-<id>. Target runtime behavior with stable classes or explicit data-* attributes instead, or place custom ids on nested child elements. If no JavaScript exists yet, the response returns an honest empty state instead of an error. For micro or local repairs, read here first, then use preview_runtime_change and edit_runtime operation=source_patch. Use edit_runtime operation=replace only for broad rewrites. When maintaining library-dependent code, preserve UPBJavaScriptLibraries.whenReady and request only the libraries actually used. Prefer the callback runtime argument's reveal() and mountSwiper() helpers for ordinary entrances and carousels; use raw Anime.js v4 named APIs only for choreography those helpers cannot express.",
  "http": {
    "method": "GET",
    "path": "/wp-json/uncanny-page-builder/v1/agent/runtime"
  },
  "parameters": [
    {
      "name": "scope",
      "type": "string",
      "enum": ["page", "global_part"],
      "required": true,
      "in": "query",
      "description": "Runtime owner scope: page or global_part."
    },
    {
      "name": "page_id",
      "type": "integer",
      "required": false,
      "in": "query",
      "description": "Uncanny Page Builder page ID when scope=page."
    },
    {
      "name": "global_part_id",
      "type": "integer",
      "required": false,
      "in": "query",
      "description": "Reusable global part post ID when scope=global_part."
    }
  ],
  "output": {
    "content_type": "text/plain",
    "description": "Plain-text runtime read with scope, owner id, presence flag, the current JavaScript source, and next-step guidance for preview_runtime_change or edit_runtime."
  },
  "auto_approve": true,
  "group": "read"
}
