أداة MCP
تمديد صلاحية مفتاح API
sosoapi_extend_api_keyتعيين انتهاء لاحق (expires_at) لمفتاح API حسب id: حتى 365 يوماً من الآن، أو 30 لمفتاح أنشأه وكيل. لا يمدد الوكيل إلا مفاتيح تفويضه. يلزم تفويض Manage API keys.
اقرأ بصيغة Markdownالملفات التعريفية ووسائل النقل
الملفات التعريفية: full · وسائل النقل: stdio, http
اختر core أو full للأدوات التي يراها عميلك؛ لا يغيّر ذلك أذوناته. يحتاج رفع الملفات المحلية stdio ولا يتاح بـ HTTP. اضبط SOSOAPI_OUTPUT_SCHEMAS=1 لمخططات المخرجات بالاكتشاف. النتائج منظّمة بهذا الإعداد أوبدونه.
الأذونات والآثار الجانبية
تساعد الشروح العملاء على وصف الأداة. يظل كل استدعاء يفحص مصادقة المستخدم ودوره ووصوله إلى المورد وتفويض الإمكانات.
{
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}- /identity-api/api-keys/extend: agent:manage_api_keys · synchronous_http_response
حقول الإدخال
تعني «مطلوب» داخل الكائن الأب والفرع المختار. الحقل الابن المطلوب لا يجعل الأب الاختياري مطلوباً. نُسخت القواعد وأسماء الحقول أدناه من العقد.
| الحقل / الفرع | النوع / مطلوب | القيود |
|---|---|---|
$ | objectمطلوب في العنصر الأب |
|
id | stringمطلوب في العنصر الأب |
|
expires_at | stringمطلوب في العنصر الأب | الانتهاء المطلق الجديد المطلوب. أقصى عمر 365 يوماً من الآن، أو 30 لمفتاح وكيل مفوّض. يُمنح الشخص المسجّل الذي يمدّد مفتاحه الحد الأقصى إن طلب أبعد (حتى 3,650 يوماً من الآن)؛ في غير ذلك يُرفض الأبعد بـ API_KEY_LIFETIME_EXCEEDS_CAP. تحمل الاستجابة الانتهاء المُطبّق فعلاً.
|
مخطط JSON Schema الكامل
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"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)))$",
"description": "Requested new absolute expiry. The longest lifetime is 365 days from now, or 30 days for a key created by a delegated agent. A signed-in person extending their own key is granted that longest lifetime when they ask for a later time (up to 3,650 days from now); in every other case a later time is refused with API_KEY_LIFETIME_EXCEEDS_CAP. The response carries the expiry actually applied."
}
},
"required": [
"id",
"expires_at"
],
"additionalProperties": false
}مخرجات منظّمة
يصف المخطط structuredContent في نتيجة أداة ناجحة. تشمل استجابة MCP أيضاً content وقد تضبط isError عند الفشل. للنشر، اقرأ النتيجة النهائية بدلاً من اعتبار القبول أوالنص تأكيداً. تشرح عملية API المرتبطة الأذونات وقواعد المحاولة.
تعني «مطلوب» داخل الكائن الأب والفرع المختار. الحقل الابن المطلوب لا يجعل الأب الاختياري مطلوباً. نُسخت القواعد وأسماء الحقول أدناه من العقد.
| الحقل / الفرع | النوع / مطلوب | القيود |
|---|---|---|
$ | objectمطلوب في العنصر الأب |
|
apiKey | objectمطلوب في العنصر الأب |
|
apiKey.id | stringمطلوب في العنصر الأب |
|
apiKey.name | stringمطلوب في العنصر الأب | — |
apiKey.last_4 | stringمطلوب في العنصر الأب | — |
apiKey.scopes | arrayمطلوب في العنصر الأب | — |
apiKey.scopes[] | stringاختياري / عنصر | — |
apiKey.created_at | stringمطلوب في العنصر الأب |
|
apiKey.expires_at | string | nullمطلوب في العنصر الأب | — |
apiKey.expires_atanyOf 1 | stringمطلوب في العنصر الأب |
|
apiKey.expires_atanyOf 2 | nullمطلوب في العنصر الأب | — |
apiKey.last_used_at | string | nullمطلوب في العنصر الأب | — |
apiKey.last_used_atanyOf 1 | stringمطلوب في العنصر الأب |
|
apiKey.last_used_atanyOf 2 | nullمطلوب في العنصر الأب | — |
apiKey.revoked_at | string | nullمطلوب في العنصر الأب | — |
apiKey.revoked_atanyOf 1 | stringمطلوب في العنصر الأب |
|
apiKey.revoked_atanyOf 2 | nullمطلوب في العنصر الأب | — |
apiKey.status | stringمطلوب في العنصر الأب |
|
apiKey.replaces | object | nullمطلوب في العنصر الأب | — |
apiKey.replacesanyOf 1 | objectمطلوب في العنصر الأب |
|
apiKey.replaces.idanyOf 1 | stringمطلوب في العنصر الأب |
|
apiKey.replaces.nameanyOf 1 | stringمطلوب في العنصر الأب | — |
apiKey.replaces.last_4anyOf 1 | stringمطلوب في العنصر الأب | — |
apiKey.replaces.statusanyOf 1 | stringمطلوب في العنصر الأب |
|
apiKey.replacesanyOf 2 | nullمطلوب في العنصر الأب | — |
apiKey.replaced_by | arrayمطلوب في العنصر الأب | — |
apiKey.replaced_by[] | objectاختياري / عنصر |
|
apiKey.replaced_by[].id | stringمطلوب في العنصر الأب |
|
apiKey.replaced_by[].name | stringمطلوب في العنصر الأب | — |
apiKey.replaced_by[].last_4 | stringمطلوب في العنصر الأب | — |
apiKey.replaced_by[].status | stringمطلوب في العنصر الأب |
|
apiKey.capabilities | arrayاختياري / عنصر | — |
apiKey.capabilities[] | stringاختياري / عنصر |
|
apiKey.workspace_ids | array | nullاختياري / عنصر | — |
apiKey.workspace_idsanyOf 1 | arrayاختياري / عنصر | — |
apiKey.workspace_ids[]anyOf 1 | stringاختياري / عنصر |
|
apiKey.workspace_idsanyOf 2 | nullاختياري / عنصر | — |
apiKey.created_by_delegated_grant_id | string | nullاختياري / عنصر | — |
apiKey.created_by_delegated_grant_idanyOf 1 | stringاختياري / عنصر |
|
apiKey.created_by_delegated_grant_idanyOf 2 | nullاختياري / عنصر | — |
idempotent | booleanمطلوب في العنصر الأب | — |
مخطط JSON Schema الكامل
{
"type": "object",
"properties": {
"apiKey": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"last_4": {
"type": "string"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
}
},
"created_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)))$"
},
"expires_at": {
"anyOf": [
{
"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)))$"
},
{
"type": "null"
}
]
},
"last_used_at": {
"anyOf": [
{
"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)))$"
},
{
"type": "null"
}
]
},
"revoked_at": {
"anyOf": [
{
"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)))$"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"active",
"expired",
"revoked"
]
},
"replaces": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"last_4": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"active",
"expired",
"revoked"
]
}
},
"required": [
"id",
"name",
"last_4",
"status"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"replaced_by": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"last_4": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"active",
"expired",
"revoked"
]
}
},
"required": [
"id",
"name",
"last_4",
"status"
],
"additionalProperties": false
}
},
"capabilities": {
"type": "array",
"items": {
"type": "string",
"enum": [
"agent:operate",
"agent:publish",
"agent:engage"
]
}
},
"workspace_ids": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
{
"type": "null"
}
]
},
"created_by_delegated_grant_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"last_4",
"scopes",
"created_at",
"expires_at",
"last_used_at",
"revoked_at",
"status",
"replaces",
"replaced_by"
],
"additionalProperties": false
},
"idempotent": {
"type": "boolean"
}
},
"required": [
"apiKey",
"idempotent"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}مثال لاستدعاء أداة
تستخدم الأمثلة قيماً خيالية مفحوصة بالمخططات. استبدل المعرّفات بالمفوّض لك، والوسائط بأصول جاهزة، والتواريخ بوقت نشر مؤكد. افحص أهلية الحساب قبل الكتابة. لا تُرسل الصفحة طلبات API.
{
"name": "sosoapi_extend_api_key",
"arguments": {
"id": "11111111-1111-4111-8111-111111111111",
"expires_at": "2099-01-15T09:00:00Z"
}
}structuredContent
{
"apiKey": {
"id": "11111111-1111-4111-8111-111111111111",
"name": "example",
"last_4": "example",
"scopes": [],
"created_at": "2099-01-15T09:00:00Z",
"expires_at": null,
"last_used_at": null,
"revoked_at": null,
"status": "active",
"replaces": null,
"replaced_by": []
},
"idempotent": false
}