MCP टूल
API key नवीनीकृत करें
sosoapi_renew_api_keyAPI key (id) की उत्तराधिकारी key बनाएँ, एक बार लौटाए जाने वाले नए सीक्रेट और समान क्षमताओं व Workspace सीमा के साथ; चाहें तो नया नाम या अवधि दें (अधिकतम 365 दिन, एजेंट द्वारा बनाई key के लिए 30)। मूल key निरस्त नहीं होती। Manage API keys का अधिकार आवश्यक है।
Markdown में पढ़ेंप्रोफ़ाइल और ट्रांसपोर्ट
प्रोफ़ाइल: full · ट्रांसपोर्ट: stdio, http
क्लाइंट में दिखने वाले टूल के लिए core या full चुनें; इससे अनुमतियाँ नहीं बदलतीं। लोकल फ़ाइल अपलोड के लिए stdio चाहिए और HTTP पर उपलब्ध नहीं। खोज में आउटपुट स्कीमा के लिए SOSOAPI_OUTPUT_SCHEMAS=1 सेट करें। इस सेटिंग के साथ या बिना टूल संरचित परिणाम लौटाते हैं।
अनुमतियाँ और अन्य प्रभाव
एनोटेशन क्लाइंट को टूल का वर्णन करने में मदद करते हैं। हर कॉल फिर भी यूज़र का प्रमाणीकरण, भूमिका, संसाधन एक्सेस और क्षमता अधिकार जाँचती है।
{
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": false
}- /identity-api/api-keys/renew: agent:manage_api_keys · synchronous_http_response
इनपुट फ़ील्ड
Required का अर्थ पैरेंट ऑब्जेक्ट और चुनी शाखा के भीतर अनिवार्य है। अनिवार्य चाइल्ड से वैकल्पिक पैरेंट अनिवार्य नहीं होता। नीचे के नियम और फ़ील्ड नाम कॉन्ट्रैक्ट से लिए गए हैं।
| फ़ील्ड / शाखा | प्रकार / अनिवार्य | शर्तें |
|---|---|---|
$ | objectपैरेंट में अनिवार्य |
|
id | stringपैरेंट में अनिवार्य |
|
name | stringवैकल्पिक / आइटम |
|
lifetime_days | integerवैकल्पिक / आइटम | उत्तराधिकारी key की समाप्ति तक दिन (1-365, डिफ़ॉल्ट 365; प्रत्यायोजित एजेंट की key के लिए अधिकतम 30)। उत्तराधिकारी पिछली key की क्षमताएँ और Workspace सीमा रखती है।
|
idempotency_key | stringवैकल्पिक / आइटम | वैकल्पिक। सुरक्षित पुनः प्रयास के लिए समान key इस्तेमाल करें। नया सीक्रेट एक बार दिखता है: उत्तराधिकारी पहले से बनी मिले तो पुनः प्रयास 409 IDEMPOTENT_REPLAY लौटाता है (details.existing_key उसकी पहचान देता है)। उसे निरस्त करें और नई idempotency_key से फिर नवीनीकृत करें।
|
संपूर्ण JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"lifetime_days": {
"description": "Days until the successor expires (1-365, default 365; 30 at most for a key created by a delegated agent). The successor keeps the predecessor's capabilities and Workspace limit.",
"type": "integer",
"minimum": 1,
"maximum": 365
},
"idempotency_key": {
"description": "Optional. Reuse the same key to retry safely. The new secret is shown once: a retry that finds the successor already created answers 409 IDEMPOTENT_REPLAY (details.existing_key names it). Revoke it and renew again with a new idempotency_key.",
"type": "string",
"minLength": 8,
"maxLength": 160,
"pattern": "^[!-~]+$"
}
},
"required": [
"id"
],
"additionalProperties": false
}संरचित आउटपुट
यह स्कीमा सफल टूल परिणाम के structuredContent का वर्णन करता है। MCP रिस्पॉन्स में content भी होता है और कॉल विफल होने पर isError सेट हो सकता है। प्रकाशन के लिए स्वीकृत अनुरोध या टेक्स्ट रिस्पॉन्स को पुष्टि मानने के बजाय पोस्ट का अंतिम परिणाम पढ़ें। लिंक किया गया API ऑपरेशन अनुमतियाँ और पुनः प्रयास के नियम समझाता है।
Required का अर्थ पैरेंट ऑब्जेक्ट और चुनी शाखा के भीतर अनिवार्य है। अनिवार्य चाइल्ड से वैकल्पिक पैरेंट अनिवार्य नहीं होता। नीचे के नियम और फ़ील्ड नाम कॉन्ट्रैक्ट से लिए गए हैं।
| फ़ील्ड / शाखा | प्रकार / अनिवार्य | शर्तें |
|---|---|---|
$ | 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वैकल्पिक / आइटम | — |
secret | stringपैरेंट में अनिवार्य |
|
संपूर्ण 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
},
"secret": {
"type": "string",
"minLength": 1
}
},
"required": [
"apiKey",
"secret"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}टूल कॉल का उदाहरण
उदाहरणों में स्कीमा से जाँचे काल्पनिक मान हैं। IDs को अधिकृत IDs, मीडिया को तैयार एसेट और तारीखों को पुष्ट प्रकाशन समय से बदलें। राइट सबमिट करने से पहले खाते की पात्रता जाँचें। यह पेज API अनुरोध नहीं भेजता।
{
"name": "sosoapi_renew_api_key",
"arguments": {
"id": "11111111-1111-4111-8111-111111111111"
}
}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": []
},
"secret": "example"
}