أداة MCP

    exo_update_flow

    عدّل تعريف تدفق أو اسمه أو وصفه.

    للأدوات ووكلاء الذكاء الاصطناعي: هذه الصفحة بصيغة Markdown · ملف OpenAPI العام

    الوصف

    يمرّ التعريف الجديد بالفحوص نفسها التي في exo_create_flow، وإذا فشل فحص لا يُحفظ شيء. أنواع الخطوات الموجودة في التدفق تبقى مسموحة، أما نوع خطوة جديد لا تشمله باقتك فيُرفض. القيم التي أعادتها exo_get_flow بالشكل *** تحتفظ بقيمتها المحفوظة، وكل خطوة تحتفظ بإعداد الاعتماد الحكومي المحفوظ لها.

    بعد التعديل يعود التدفق إلى مسودة للمراجعة. التدفق الموجود في بيئة الاختبار أو التطوير يمكن تفعيله في بيئة الاختبار بالأداة exo_activate_flow؛ أما تدفق الإنتاج فيعيد شخص تفعيله في التطبيق. التدفق العامل في الإنتاج يبقى نشطاً ويواصل تشغيل نسخته المنشورة حتى يعتمد شخص التعديل في التطبيق؛ وإذا لم تكن له نسخة منشورة مستقلة يُرفض تعديل التعريف.

    الصلاحية

    تحتاج إلى مفتاح API أو اتصال OAuth يحمل صلاحية build.

    المدخلات

    الاسمالنوعمطلوبالوصف
    flowIdstringنعممعرّف التدفق المراد تعديله.
    definitionobjectلاتعريف التدفق الجديد { nodes, edges }.
    namestringلااسم التدفق الجديد.
    descriptionstringلاوصف التدفق الجديد.

    ما تعيده

    saved: true وflowId وstatus وwarnings. وللتدفق العامل في الإنتاج أيضاً environment: "production" وproductionPromoted: false.

    فحص الباقة

    لكل نوع خطوة باقة. الإنشاء أو التعديل الذي يضيف خطوة لا تشملها باقة مساحة عملك يُرفض قبل حفظ أي شيء، مع code: "PLAN_REQUIRED" والباقة المطلوبة (requiredPlan) والخطوات المعنية (steps) والرسالة بالإنجليزية والعربية والصينية (messages). وتوضح exo_get_node_types الخطوات التي تشملها باقتك، وتذكرها exo_validate_flow كتحذيرات.

    {
      "saved": false,
      "code": "PLAN_REQUIRED",
      "upgradeRequired": true,
      "currentPlan": "starter",
      "requiredPlan": "pro",
      "steps": [
        {
          "nodeId": "sftp_1",
          "type": "sftp",
          "label": "SFTP / FTP Files",
          "family": "advanced_integrations",
          "requiredPlan": "pro"
        }
      ],
      "messages": {
        "en": "Your Starter plan doesn't include these steps: SFTP / FTP Files. They are part of the Professional plan. Nothing was created. Upgrade to Professional, or use steps your plan includes.",
        "ar": "…",
        "zh": "…"
      }
    }

    الأخطاء

    تُعاد كنتيجة عادية مع isError: true:

    • `flowId` is required.
    • Flow "<flowId>" not found.
    • Flow "<name>" is live in production and has no separately published version, so a definition edit here would change what production runs immediately. …
    • `definition` must be an object.
    • `definition` rejected: <reason>.
    • Flow NOT updated: node(s) <ids> keep a hidden secret ("***") while their destination (url, host, endpoint, connection or step type) changed. …
    • Flow NOT updated — <n> error(s), <n> warning(s). Fix the errors and retry: <list>
    • Flow NOT updated — the definition failed the platform staging verifier: <violations>. Fix these issues and retry.
    • Flow NOT updated — <reason> (step types: <types>). …
    • `name` must not be empty.
    • Nothing to update — pass at least one of definition, name, description.
    • Update failed.

    تُعاد كخطأ JSON-RPC:

    الرمزHTTPالرسالة
    -32001403API key lacks the 'build' permission required for flow authoring tools

    تظهر الرسائل كما يرسلها الخادم تماماً، بالإنجليزية. القيمة بين علامتي < > تُملأ وقت التشغيل.

    أمثلة

    مثال على الاستدعاء

    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "tools/call",
      "params": {
        "name": "exo_update_flow",
        "arguments": {
          "flowId": "7a17617d-3c4e-4f0a-9b1e-2d5c8e0f4a61",
          "name": "Post new orders to the ERP"
        }
      }
    }

    مثال على النتيجة

    {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "content": [
          {
            "type": "text",
            "text": "Flow \"Post new orders to the ERP\" updated and set to DRAFT (id=7a17617d-3c4e-4f0a-9b1e-2d5c8e0f4a61). Review it, then call exo_activate_flow to reactivate staging.\n{ ... }"
          }
        ],
        "structuredContent": {
          "saved": true,
          "flowId": "7a17617d-3c4e-4f0a-9b1e-2d5c8e0f4a61",
          "status": "draft",
          "warnings": []
        },
        "isError": false
      }
    }

    قيم للتوضيح. في content يحمل النص بعد سطر الملخص البيانات نفسها التي في structuredContent.