# Cari aset

URL kanonis: https://sosoapi.ai/id/docs/mcp/query-assets

`sosoapi_query_assets`

Cari aset ruang kerja berdasarkan asset_type, source, atau tag; mengembalikan satu halaman (limit maksimal 100, ditambah offset) dan jumlah total. Sertakan workspace_id secara eksplisit.

## Profil dan transport

Profil: core, full

Transport: stdio, http

Pilih core atau full untuk mengatur alat yang terlihat oleh klien; ini tidak mengubah izinnya. Unggahan file lokal memerlukan stdio dan tidak tersedia melalui HTTP. Atur SOSOAPI_OUTPUT_SCHEMAS=1 untuk menyertakan skema output saat penemuan. Alat mengembalikan hasil terstruktur dengan atau tanpa pengaturan itu.

## Izin dan efek samping

Anotasi membantu klien menjelaskan alat. Setiap panggilan tetap memeriksa autentikasi pengguna, peran, akses sumber daya, dan izin kemampuan.

```json
{
  "readOnlyHint": true,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
```

`/assets-api/list` — agent:operate; synchronous_http_response

## Kolom input

```json
{
  "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
}
```

## Output terstruktur

Skema ini menjelaskan structuredContent dalam hasil alat yang berhasil. Respons MCP juga menyertakan content dan dapat menetapkan isError saat panggilan gagal. Untuk publikasi, baca hasil akhir postingan alih-alih menganggap permintaan diterima atau respons teks sebagai konfirmasi. Operasi API yang ditautkan menjelaskan izin dan aturan percobaan ulang.

```json
{
  "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
}
```

## Contoh panggilan alat

Contoh ini menggunakan nilai fiktif yang diperiksa terhadap skema. Ganti ID dengan yang diizinkan bagi Anda, media dengan aset siap, dan tanggal dengan waktu publikasi yang dikonfirmasi. Periksa kelayakan akun sebelum mengirim penulisan. Halaman ini tidak mengirim permintaan API.

```json
{
  "name": "sosoapi_query_assets",
  "arguments": {}
}
```

structuredContent

```json
{
  "assets": [],
  "total": 0
}
```

## Operasi API yang mendasari

- [/assets-api/list](https://sosoapi.ai/id/docs/api/assets-api-list)
