כלי MCP
קבלת סטטוס תובנות מספק
sosoapi_get_provider_insight_statusקריאת בקשת תובנות (request_id): queued, processing, completed (עם תוצאת הספק וזמינות לכל מדד) או failed.
קריאה בפורמט Markdownפרופילים ואמצעי תעבורה
פרופילים: core, full · אמצעי תעבורה: stdio, http
בחרו core או full כדי לשלוט בכלים שהלקוח רואה; הבחירה אינה משנה את ההרשאות שלו. העלאת קבצים מקומיים דורשת stdio ואינה זמינה דרך HTTP. הגדירו SOSOAPI_OUTPUT_SCHEMAS=1 להכללת סכמות פלט בגילוי הכלים. הכלים מחזירים תוצאות מובנות עם ההגדרה הזו או בלעדיה.
הרשאות והשפעות לוואי
הערות המטא-נתונים עוזרות ללקוחות לתאר כלי. כל קריאה עדיין בודקת את אימות המשתמש, תפקידו, גישתו למשאבים והרשאות היכולות שלו.
{
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}- /analytics-api/provider-insights/status: agent:operate · תוצאה מקורית של הספק או סיבה מפורשת לאי-זמינות
שדות קלט
שדה חובה נדרש בתוך אובייקט האב והענף הנבחר שלו. צאצא נדרש אינו הופך אב אופציונלי לנדרש. הכללים ושמות השדות שלהלן מועתקים מהחוזה.
| שדה / ענף | סוג / חובה | אילוצים |
|---|---|---|
$ | objectחובה באובייקט האב |
|
workspace_id | stringחובה באובייקט האב |
|
request_id | stringחובה באובייקט האב |
|
JSON Schema מלא
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"request_id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"workspace_id",
"request_id"
],
"additionalProperties": false
}פלט מובנה
הסכמה מתארת את structuredContent בתוצאת כלי מוצלחת. תגובת MCP כוללת גם content ועשויה להגדיר isError כשקריאה נכשלת. בפרסום, קראו את התוצאה הסופית של הפוסט במקום לראות בבקשה שהתקבלה או בתגובת טקסט אישור. פעולת ה-API המקושרת מסבירה הרשאות וכללי ניסיון חוזר.
שדה חובה נדרש בתוך אובייקט האב והענף הנבחר שלו. צאצא נדרש אינו הופך אב אופציונלי לנדרש. הכללים ושמות השדות שלהלן מועתקים מהחוזה.
| שדה / ענף | סוג / חובה | אילוצים |
|---|---|---|
$ | objectחובה באובייקט האב |
|
contract_version | stringחובה באובייקט האב |
|
request_id | stringחובה באובייקט האב |
|
status | stringחובה באובייקט האב |
|
attempt_count | integerחובה באובייקט האב |
|
result | objectרשות / פריט |
|
result.contract_version | stringחובה באובייקט האב |
|
result.request_id | stringחובה באובייקט האב |
|
result.platform | stringחובה באובייקט האב |
|
result.resource | objectחובה באובייקט האב |
|
result.resource.kind | stringחובה באובייקט האב |
|
result.resource.social_account_id | stringחובה באובייקט האב |
|
result.resource.provider_resource_id | string | nullחובה באובייקט האב | — |
result.resource.provider_resource_idanyOf 1 | stringחובה באובייקט האב | — |
result.resource.provider_resource_idanyOf 2 | nullחובה באובייקט האב | — |
result.provider_api_version | stringחובה באובייקט האב |
|
result.fetched_at | stringחובה באובייקט האב |
|
result.status | stringחובה באובייקט האב |
|
result.availability | arrayחובה באובייקט האב |
|
result.availability[] | objectרשות / פריט |
|
result.availability[].scope | stringחובה באובייקט האב |
|
result.availability[].status | stringחובה באובייקט האב |
|
result.availability[].reason | stringרשות / פריט |
|
result.provider_data | any JSON value | nullחובה באובייקט האב | — |
result.provider_dataanyOf 1 | any JSON valueחובה באובייקט האב | — |
result.provider_dataanyOf 2 | nullחובה באובייקט האב | — |
result.requested_date_range | object | nullחובה באובייקט האב | — |
result.requested_date_rangeanyOf 1 | objectחובה באובייקט האב |
|
result.requested_date_range.start_dateanyOf 1 | stringחובה באובייקט האב |
|
result.requested_date_range.end_dateanyOf 1 | stringחובה באובייקט האב |
|
result.requested_date_rangeanyOf 2 | nullחובה באובייקט האב | — |
result.cache | objectחובה באובייקט האב |
|
result.cache.authoritative | booleanחובה באובייקט האב |
|
result.cache.status | stringחובה באובייקט האב |
|
result.cache.expires_at | stringחובה באובייקט האב |
|
error | objectרשות / פריט |
|
error.code | stringחובה באובייקט האב |
|
error.reason | stringחובה באובייקט האב |
|
error.retryable | booleanחובה באובייקט האב | — |
JSON Schema מלא
{
"type": "object",
"properties": {
"contract_version": {
"type": "string",
"const": "provider-insights/v1"
},
"request_id": {
"type": "string",
"format": "uuid"
},
"status": {
"type": "string",
"enum": [
"queued",
"processing",
"completed",
"failed"
]
},
"attempt_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"result": {
"type": "object",
"properties": {
"contract_version": {
"type": "string",
"const": "provider-insights/v1"
},
"request_id": {
"type": "string",
"format": "uuid"
},
"platform": {
"type": "string",
"enum": [
"facebook",
"instagram",
"threads",
"youtube"
]
},
"resource": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"account",
"post"
]
},
"social_account_id": {
"type": "string",
"format": "uuid"
},
"provider_resource_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"social_account_id",
"provider_resource_id"
],
"additionalProperties": false
},
"provider_api_version": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"fetched_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"status": {
"type": "string",
"enum": [
"available",
"partial",
"unavailable"
]
},
"availability": {
"minItems": 1,
"maxItems": 64,
"type": "array",
"items": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"status": {
"type": "string",
"enum": [
"available",
"partial",
"not_returned",
"unsupported",
"permission_required",
"threshold_not_met",
"no_data",
"failed"
]
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 2000
}
},
"required": [
"scope",
"status"
],
"additionalProperties": false
}
},
"provider_data": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"requested_date_range": {
"anyOf": [
{
"type": "object",
"properties": {
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"required": [
"start_date",
"end_date"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"cache": {
"type": "object",
"properties": {
"authoritative": {
"type": "boolean",
"const": false
},
"status": {
"type": "string",
"enum": [
"stored",
"hit",
"bypassed"
]
},
"expires_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"authoritative",
"status",
"expires_at"
],
"additionalProperties": false
}
},
"required": [
"contract_version",
"request_id",
"platform",
"resource",
"provider_api_version",
"fetched_at",
"status",
"availability",
"provider_data",
"requested_date_range",
"cache"
],
"additionalProperties": false
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"retryable": {
"type": "boolean"
}
},
"required": [
"code",
"reason",
"retryable"
],
"additionalProperties": false
}
},
"required": [
"contract_version",
"request_id",
"status",
"attempt_count"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}דוגמת קריאה לכלי
הדוגמאות משתמשות בערכים בדויים שנבדקו מול הסכמות. החליפו את המזהים בכאלה שאתם מורשים להשתמש בהם, את המדיה בנכסים מוכנים ואת התאריכים במועד הפרסום שאישרתם. בדקו את התאמת החשבון לפני שליחת כתיבה. העמוד הזה אינו שולח בקשות API.
{
"name": "sosoapi_get_provider_insight_status",
"arguments": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"request_id": "11111111-1111-4111-8111-111111111111"
}
}structuredContent
{
"contract_version": "provider-insights/v1",
"request_id": "11111111-1111-4111-8111-111111111111",
"status": "queued",
"attempt_count": 0
}