للأدوات ووكلاء الذكاء الاصطناعي: هذه الصفحة بصيغة Markdown · ملف OpenAPI العام
الوصف
يُفحص التعريف قبل حفظ أي شيء: حجمه (حتى 2 ميغابايت، و40 مستوى عمقاً، و20,000 مفتاح)، وبنيته، وفحوص المنصة لبيئة الاختبار، وباقتك. إذا فشل فحص لا يُحفظ شيء وتُعاد المشكلات. يُضاف التدفق إلى projectId أو إلى أول مشروع في مساحة عملك. مساحة العمل التي بلغت حدّ التدفقات في باقتها لا تستطيع إنشاء المزيد. إعدادات الاعتماد الحكومي التي يرسلها العميل تُحذف: وحده شخص يستطيع تفعيلها في التطبيق.
التدفق الجديد مسودة. ترفض exo_activate_flow التدفقات التي بيئتها الإنتاج، وهي البيئة التي يبدأ فيها كل تدفق جديد، لذلك يراجع شخص التدفق الجديد في التطبيق قبل تشغيله.
الصلاحية
تحتاج إلى مفتاح API أو اتصال OAuth يحمل صلاحية build.
المدخلات
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
name | string | نعم | اسم التدفق. |
definition | object | نعم | تعريف التدفق { nodes, edges }. |
description | string | لا | وصف التدفق (اختياري). |
projectId | string | لا | معرّف المشروع (اختياري). الافتراضي أول مشروع في مساحة عملك. |
triggerType | string: webhook, manual, scheduled, form, poll_trigger, email_trigger, voice_call_ended, whatsapp_message | لا | نوع المشغّل (اختياري، الافتراضي 'webhook'). |
ما تعيده
saved: true وflowId وstatus: "draft" وwarnings. وإذا حُذف اعتماد حكومي يذكر governmentConfirmationIgnored الخطوات المعنية.
فحص الباقة
لكل نوع خطوة باقة. الإنشاء أو التعديل الذي يضيف خطوة لا تشملها باقة مساحة عملك يُرفض قبل حفظ أي شيء، مع 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:
`name` is required.`triggerType` must be one of: <types> (default webhook). Nothing was created.`definition` object is required.`definition` rejected: <reason>.Flow NOT created — <n> error(s), <n> warning(s). Fix the errors and retry: <list>Flow NOT created — the definition failed the platform staging verifier: <violations>. Fix these issues and retry.Project "<projectId>" not found in your tenant.Your tenant has no projects yet. Create a project in the Exomations UI first, then retry.Maximum flow limit (<n>) reached for your plan. Delete a flow or upgrade.Flow NOT created — <reason> (step types: <types>). …
تُعاد كخطأ JSON-RPC:
| الرمز | HTTP | الرسالة |
|---|---|---|
| -32001 | 403 | API key lacks the 'build' permission required for flow authoring tools |
تظهر الرسائل كما يرسلها الخادم تماماً، بالإنجليزية. القيمة بين علامتي < > تُملأ وقت التشغيل.
أمثلة
مثال على الاستدعاء
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "exo_create_flow",
"arguments": {
"name": "Post new orders",
"definition": {
"nodes": [
{
"id": "trigger_1",
"type": "trigger",
"position": {
"x": 0,
"y": 0
},
"data": {
"nodeType": "trigger",
"label": "Webhook",
"config": {}
}
},
{
"id": "http_1",
"type": "http_request",
"position": {
"x": 260,
"y": 0
},
"data": {
"nodeType": "http_request",
"label": "Post order",
"config": {
"url": "https://example.com/orders",
"method": "POST",
"body": "{{trigger.order_id}}"
}
}
}
],
"edges": [
{
"id": "e1",
"source": "trigger_1",
"target": "http_1"
}
]
}
}
}
}curl -X POST https://exomations.com/api/mcp \
-H "X-Api-Key: exo_your_key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"exo_create_flow","arguments":{"name":"Post new orders","definition":{"nodes":[{"id":"trigger_1","type":"trigger","position":{"x":0,"y":0},"data":{"nodeType":"trigger","label":"Webhook","config":{}}},{"id":"http_1","type":"http_request","position":{"x":260,"y":0},"data":{"nodeType":"http_request","label":"Post order","config":{"url":"https://example.com/orders","method":"POST","body":"{{trigger.order_id}}"}}}],"edges":[{"id":"e1","source":"trigger_1","target":"http_1"}]}}}}'مثال على النتيجة
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Flow \"Post new orders\" created as a DRAFT (id=7a17617d-3c4e-4f0a-9b1e-2d5c8e0f4a61). A person reviews and activates it in the Exomations app; exo_activate_flow refuses a flow whose environment is production, which is where every new flow starts.\n{ ... }"
}
],
"structuredContent": {
"saved": true,
"flowId": "7a17617d-3c4e-4f0a-9b1e-2d5c8e0f4a61",
"status": "draft",
"warnings": []
},
"isError": false
}
}قيم للتوضيح. في content يحمل النص بعد سطر الملخص البيانات نفسها التي في structuredContent.