للأدوات ووكلاء الذكاء الاصطناعي: هذه الصفحة بصيغة Markdown · ملف OpenAPI العام
الوصف
مرّر definition، أو flowId لفحص تدفق محفوظ. تجري الفحوص الثابتة التي تجريها exo_create_flow وexo_update_flow أولاً، ولا تحفظ شيئاً. الخطوات التي لا تشملها باقتك تُذكر كتحذيرات وتبقى النتيجة صالحة. وفي التدفق المحفوظ لا تُذكر أنواع الخطوات الموجودة فيه أصلاً.
الصلاحية
تحتاج إلى مفتاح API أو اتصال OAuth يحمل صلاحية build.
المدخلات
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
definition | object | لا | تعريف تدفق { nodes, edges } لفحصه. |
flowId | string | لا | افحص هذا التدفق المحفوظ بدلاً من تعريف مضمَّن. |
ما تعيده
valid وerrors وwarnings. لكل ملاحظة level وmessage وnodeId حيث ينطبق.
فحص الباقة
لكل نوع خطوة باقة. الإنشاء أو التعديل الذي يضيف خطوة لا تشملها باقة مساحة عملك يُرفض قبل حفظ أي شيء، مع 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:
Flow "<flowId>" not found.Pass either `definition` or `flowId` to validate.`definition` rejected: <reason>.
تُعاد كخطأ 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_validate_flow",
"arguments": {
"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_validate_flow","arguments":{"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": "Valid. 0 warning(s).\n{ ... }"
}
],
"structuredContent": {
"valid": true,
"errors": [],
"warnings": []
},
"isError": false
}
}قيم للتوضيح. في content يحمل النص بعد سطر الملخص البيانات نفسها التي في structuredContent.