MCP टूल
एसेट क्वेरी करें
sosoapi_query_assetsasset_type, source या tag से Workspace के एसेट खोजें; एक पेज (limit अधिकतम 100, साथ में offset) और कुल संख्या लौटाता है। workspace_id स्पष्ट रूप से दें।
Markdown में पढ़ेंप्रोफ़ाइल और ट्रांसपोर्ट
प्रोफ़ाइल: core, full · ट्रांसपोर्ट: stdio, http
क्लाइंट में दिखने वाले टूल के लिए core या full चुनें; इससे अनुमतियाँ नहीं बदलतीं। लोकल फ़ाइल अपलोड के लिए stdio चाहिए और HTTP पर उपलब्ध नहीं। खोज में आउटपुट स्कीमा के लिए SOSOAPI_OUTPUT_SCHEMAS=1 सेट करें। इस सेटिंग के साथ या बिना टूल संरचित परिणाम लौटाते हैं।
अनुमतियाँ और अन्य प्रभाव
एनोटेशन क्लाइंट को टूल का वर्णन करने में मदद करते हैं। हर कॉल फिर भी यूज़र का प्रमाणीकरण, भूमिका, संसाधन एक्सेस और क्षमता अधिकार जाँचती है।
{
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}- /assets-api/list: agent:operate · synchronous_http_response
इनपुट फ़ील्ड
Required का अर्थ पैरेंट ऑब्जेक्ट और चुनी शाखा के भीतर अनिवार्य है। अनिवार्य चाइल्ड से वैकल्पिक पैरेंट अनिवार्य नहीं होता। नीचे के नियम और फ़ील्ड नाम कॉन्ट्रैक्ट से लिए गए हैं।
| फ़ील्ड / शाखा | प्रकार / अनिवार्य | शर्तें |
|---|---|---|
$ | objectपैरेंट में अनिवार्य |
|
workspace_id | stringवैकल्पिक / आइटम |
|
asset_type | string | arrayवैकल्पिक / आइटम | — |
asset_typeanyOf 1 | stringवैकल्पिक / आइटम |
|
asset_typeanyOf 2 | arrayवैकल्पिक / आइटम | — |
asset_type[]anyOf 2 | stringवैकल्पिक / आइटम |
|
source | stringवैकल्पिक / आइटम |
|
tag | stringवैकल्पिक / आइटम |
|
limit | integerवैकल्पिक / आइटम |
|
offset | integerवैकल्पिक / आइटम | छोड़ने वाली पंक्तियाँ। अधिकतम 100000 तक; उसके बाद 400 OFFSET_TOO_LARGE। बहुत आगे पेज बदलने के बजाय फ़िल्टर को प्राथमिकता दें।
|
include_version | booleanवैकल्पिक / आइटम | वैकल्पिक। true से उत्तर में संसाधन का संस्करण जुड़ता है। — |
संपूर्ण JSON Schema
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"asset_type": {
"anyOf": [
{
"type": "string",
"enum": [
"text",
"image",
"video",
"audio"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"text",
"image",
"video",
"audio"
]
}
}
]
},
"source": {
"type": "string",
"maxLength": 64
},
"tag": {
"type": "string",
"maxLength": 64
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"offset": {
"description": "Rows to skip. Served up to 100000; beyond it 400 OFFSET_TOO_LARGE. Prefer filters to paging deep.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"include_version": {
"description": "Optional. true adds the resource version to the answer.",
"type": "boolean"
}
},
"additionalProperties": false
}संरचित आउटपुट
यह स्कीमा सफल टूल परिणाम के structuredContent का वर्णन करता है। MCP रिस्पॉन्स में content भी होता है और कॉल विफल होने पर isError सेट हो सकता है। प्रकाशन के लिए स्वीकृत अनुरोध या टेक्स्ट रिस्पॉन्स को पुष्टि मानने के बजाय पोस्ट का अंतिम परिणाम पढ़ें। लिंक किया गया API ऑपरेशन अनुमतियाँ और पुनः प्रयास के नियम समझाता है।
Required का अर्थ पैरेंट ऑब्जेक्ट और चुनी शाखा के भीतर अनिवार्य है। अनिवार्य चाइल्ड से वैकल्पिक पैरेंट अनिवार्य नहीं होता। नीचे के नियम और फ़ील्ड नाम कॉन्ट्रैक्ट से लिए गए हैं।
| फ़ील्ड / शाखा | प्रकार / अनिवार्य | शर्तें |
|---|---|---|
$ | objectपैरेंट में अनिवार्य |
|
assets | arrayपैरेंट में अनिवार्य | — |
assets[] | objectवैकल्पिक / आइटम |
|
assets[].id | integer | stringपैरेंट में अनिवार्य | — |
assets[].idanyOf 1 | integerपैरेंट में अनिवार्य |
|
assets[].idanyOf 2 | stringपैरेंट में अनिवार्य | — |
assets[].workspace_id | stringपैरेंट में अनिवार्य |
|
assets[].user_id | stringपैरेंट में अनिवार्य |
|
assets[].asset_type | stringपैरेंट में अनिवार्य |
|
assets[].asset_url | string | nullपैरेंट में अनिवार्य | — |
assets[].asset_urlanyOf 1 | stringपैरेंट में अनिवार्य | — |
assets[].asset_urlanyOf 2 | nullपैरेंट में अनिवार्य | — |
assets[].preview_url | string | nullवैकल्पिक / आइटम | Workspace-अधिकृत अस्थायी रीड URL। preview_expires_at के बाद Asset read/list से रिफ़्रेश करें; स्थायी मीडिया पहचान के रूप में asset_url रखें। — |
assets[].preview_urlanyOf 1 | stringवैकल्पिक / आइटम |
|
assets[].preview_urlanyOf 2 | nullवैकल्पिक / आइटम | — |
assets[].preview_expires_at | string | nullवैकल्पिक / आइटम | — |
assets[].preview_expires_atanyOf 1 | stringवैकल्पिक / आइटम |
|
assets[].preview_expires_atanyOf 2 | nullवैकल्पिक / आइटम | — |
assets[].title | string | nullपैरेंट में अनिवार्य | — |
assets[].titleanyOf 1 | stringपैरेंट में अनिवार्य | — |
assets[].titleanyOf 2 | nullपैरेंट में अनिवार्य | — |
assets[].description | string | nullपैरेंट में अनिवार्य | — |
assets[].descriptionanyOf 1 | stringपैरेंट में अनिवार्य | — |
assets[].descriptionanyOf 2 | nullपैरेंट में अनिवार्य | — |
assets[].tags | array | nullपैरेंट में अनिवार्य | — |
assets[].tagsanyOf 1 | arrayपैरेंट में अनिवार्य | — |
assets[].tags[]anyOf 1 | stringवैकल्पिक / आइटम | — |
assets[].tagsanyOf 2 | nullपैरेंट में अनिवार्य | — |
assets[].metadata | object | nullपैरेंट में अनिवार्य | — |
assets[].metadataanyOf 1 | objectपैरेंट में अनिवार्य |
|
assets[].metadata.*anyOf 1 | any JSON valueवैकल्पिक / आइटम | — |
assets[].metadataanyOf 2 | nullपैरेंट में अनिवार्य | — |
assets[].source | string | nullवैकल्पिक / आइटम | — |
assets[].sourceanyOf 1 | stringवैकल्पिक / आइटम | — |
assets[].sourceanyOf 2 | nullवैकल्पिक / आइटम | — |
assets[].source_metadata | object | nullवैकल्पिक / आइटम | — |
assets[].source_metadataanyOf 1 | objectवैकल्पिक / आइटम |
|
assets[].source_metadata.*anyOf 1 | any JSON valueवैकल्पिक / आइटम | — |
assets[].source_metadataanyOf 2 | nullवैकल्पिक / आइटम | — |
assets[].created_at | stringपैरेंट में अनिवार्य | — |
assets[].version | integerवैकल्पिक / आइटम |
|
total | integerपैरेंट में अनिवार्य |
|
संपूर्ण JSON Schema
{
"type": "object",
"properties": {
"assets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "string"
}
]
},
"workspace_id": {
"type": "string",
"format": "uuid"
},
"user_id": {
"type": "string",
"format": "uuid"
},
"asset_type": {
"type": "string",
"enum": [
"text",
"image",
"video",
"audio"
]
},
"asset_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"preview_url": {
"description": "Workspace-authorized temporary read URL. Refresh through Asset read/list after preview_expires_at; keep asset_url as persisted media identity.",
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"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"
}
]
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tags": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"source_metadata": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"created_at": {
"type": "string"
},
"version": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"id",
"workspace_id",
"user_id",
"asset_type",
"asset_url",
"title",
"description",
"tags",
"metadata",
"created_at"
],
"additionalProperties": false
}
},
"total": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"assets",
"total"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}टूल कॉल का उदाहरण
उदाहरणों में स्कीमा से जाँचे काल्पनिक मान हैं। IDs को अधिकृत IDs, मीडिया को तैयार एसेट और तारीखों को पुष्ट प्रकाशन समय से बदलें। राइट सबमिट करने से पहले खाते की पात्रता जाँचें। यह पेज API अनुरोध नहीं भेजता।
{
"name": "sosoapi_query_assets",
"arguments": {}
}structuredContent
{
"assets": [],
"total": 0
}