כלי MCP
עדכון פרופיל משתמש
sosoapi_update_user_profileשינוי הפרופיל של המשתמש המחובר עצמו (display_name, timezone, avatar_url, theme). שלחו רק את השדות שיש לשנות.
קריאה בפורמט Markdownפרופילים ואמצעי תעבורה
פרופילים: full · אמצעי תעבורה: stdio, http
בחרו core או full כדי לשלוט בכלים שהלקוח רואה; הבחירה אינה משנה את ההרשאות שלו. העלאת קבצים מקומיים דורשת stdio ואינה זמינה דרך HTTP. הגדירו SOSOAPI_OUTPUT_SCHEMAS=1 להכללת סכמות פלט בגילוי הכלים. הכלים מחזירים תוצאות מובנות עם ההגדרה הזו או בלעדיה.
הרשאות והשפעות לוואי
הערות המטא-נתונים עוזרות ללקוחות לתאר כלי. כל קריאה עדיין בודקת את אימות המשתמש, תפקידו, גישתו למשאבים והרשאות היכולות שלו.
{
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}- /identity-api/user/profile/update: agent:operate · synchronous_http_response
שדות קלט
שדה חובה נדרש בתוך אובייקט האב והענף הנבחר שלו. צאצא נדרש אינו הופך אב אופציונלי לנדרש. הכללים ושמות השדות שלהלן מועתקים מהחוזה.
| שדה / ענף | סוג / חובה | אילוצים |
|---|---|---|
$ | objectחובה באובייקט האב |
|
display_name | stringרשות / פריט |
|
timezone | stringרשות / פריט |
|
avatar_url | stringרשות / פריט |
|
theme | stringרשות / פריט |
|
expected_version | integerרשות / פריט | רשות. הגרסה שקראתם. אם השתנתה מאז, העדכון נכשל עם 409 VERSION_CONFLICT במקום לדרוס.
|
include_version | booleanרשות / פריט | רשות. true מוסיף את גרסת המשאב לתשובה. — |
JSON Schema מלא
{
"type": "object",
"properties": {
"display_name": {
"type": "string",
"minLength": 0,
"maxLength": 120
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"avatar_url": {
"type": "string",
"minLength": 0,
"maxLength": 2048
},
"theme": {
"type": "string",
"enum": [
"light",
"dark",
"system"
]
},
"expected_version": {
"description": "Optional. The version you read. If it changed since, the update fails with 409 VERSION_CONFLICT instead of overwriting.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 2147483647
},
"include_version": {
"description": "Optional. true adds the resource version to the answer.",
"type": "boolean"
}
},
"additionalProperties": false
}פלט מובנה
הסכמה מתארת את structuredContent בתוצאת כלי מוצלחת. תגובת MCP כוללת גם content ועשויה להגדיר isError כשקריאה נכשלת. בפרסום, קראו את התוצאה הסופית של הפוסט במקום לראות בבקשה שהתקבלה או בתגובת טקסט אישור. פעולת ה-API המקושרת מסבירה הרשאות וכללי ניסיון חוזר.
שדה חובה נדרש בתוך אובייקט האב והענף הנבחר שלו. צאצא נדרש אינו הופך אב אופציונלי לנדרש. הכללים ושמות השדות שלהלן מועתקים מהחוזה.
| שדה / ענף | סוג / חובה | אילוצים |
|---|---|---|
$ | objectחובה באובייקט האב |
|
action | stringחובה באובייקט האב |
|
profile | objectחובה באובייקט האב |
|
profile.user_id | stringחובה באובייקט האב |
|
profile.display_name | string | nullחובה באובייקט האב | — |
profile.display_nameanyOf 1 | stringחובה באובייקט האב | — |
profile.display_nameanyOf 2 | nullחובה באובייקט האב | — |
profile.timezone | string | nullחובה באובייקט האב | — |
profile.timezoneanyOf 1 | stringחובה באובייקט האב | — |
profile.timezoneanyOf 2 | nullחובה באובייקט האב | — |
profile.avatar_url | string | nullחובה באובייקט האב | — |
profile.avatar_urlanyOf 1 | stringחובה באובייקט האב | — |
profile.avatar_urlanyOf 2 | nullחובה באובייקט האב | — |
profile.avatar_preview_url | string | nullרשות / פריט | — |
profile.avatar_preview_urlanyOf 1 | stringרשות / פריט |
|
profile.avatar_preview_urlanyOf 2 | nullרשות / פריט | — |
profile.avatar_preview_expires_at | string | nullרשות / פריט | — |
profile.avatar_preview_expires_atanyOf 1 | stringרשות / פריט |
|
profile.avatar_preview_expires_atanyOf 2 | nullרשות / פריט | — |
profile.theme | string | nullחובה באובייקט האב | — |
profile.themeanyOf 1 | stringחובה באובייקט האב |
|
profile.themeanyOf 2 | nullחובה באובייקט האב | — |
profile.created_at | string | nullחובה באובייקט האב | — |
profile.created_atanyOf 1 | stringחובה באובייקט האב | — |
profile.created_atanyOf 2 | nullחובה באובייקט האב | — |
profile.updated_at | string | nullחובה באובייקט האב | — |
profile.updated_atanyOf 1 | stringחובה באובייקט האב | — |
profile.updated_atanyOf 2 | nullחובה באובייקט האב | — |
profile.deletion_scheduled_at | string | nullחובה באובייקט האב | — |
profile.deletion_scheduled_atanyOf 1 | stringחובה באובייקט האב | — |
profile.deletion_scheduled_atanyOf 2 | nullחובה באובייקט האב | — |
profile.hard_delete_at | string | nullחובה באובייקט האב | — |
profile.hard_delete_atanyOf 1 | stringחובה באובייקט האב | — |
profile.hard_delete_atanyOf 2 | nullחובה באובייקט האב | — |
profile.version | integerרשות / פריט |
|
JSON Schema מלא
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "update"
},
"profile": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"format": "uuid"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"timezone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"avatar_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"avatar_preview_url": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"avatar_preview_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))$"
},
{
"type": "null"
}
]
},
"theme": {
"anyOf": [
{
"type": "string",
"enum": [
"light",
"dark",
"system"
]
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"deletion_scheduled_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hard_delete_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"user_id",
"display_name",
"timezone",
"avatar_url",
"theme",
"created_at",
"updated_at",
"deletion_scheduled_at",
"hard_delete_at"
],
"additionalProperties": false
}
},
"required": [
"action",
"profile"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}דוגמת קריאה לכלי
הדוגמאות משתמשות בערכים בדויים שנבדקו מול הסכמות. החליפו את המזהים בכאלה שאתם מורשים להשתמש בהם, את המדיה בנכסים מוכנים ואת התאריכים במועד הפרסום שאישרתם. בדקו את התאמת החשבון לפני שליחת כתיבה. העמוד הזה אינו שולח בקשות API.
{
"name": "sosoapi_update_user_profile",
"arguments": {}
}structuredContent
{
"action": "update",
"profile": {
"user_id": "11111111-1111-4111-8111-111111111111",
"display_name": null,
"timezone": null,
"avatar_url": null,
"theme": null,
"created_at": null,
"updated_at": null,
"deletion_scheduled_at": null,
"hard_delete_at": null
}
}