api.tools

listDocuments()

api.tools.listDocuments() → Promise<Source[]>

لا جدال، لا ائتمان، والاختصار لـ api.files.list().

GET /api/filesfreeno arguments
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

نفس الطلب api.files.list()الحالية api.tools "حتى يتسنى تسليم ما لديّ إلى نموذج كأداة.

القيمة المُعادة

[
  {
    id: "…",                       // the sourceId, to pass to readDocument()
    name: "report.md",
    category: "document",          // document | image | audio | video
    mimeType: "text/markdown",
    size: 9118,
    storageId: "…",                // where it lives, or null
    status: "ready",
    createdAt: "2026-10-05T18:02:11.000Z"
  }
]
documents = api.tools.list_documents()
# {
#   "computer": [{"name", "path", "type", "size"}],          # ~/.iagenify/files
#   "account":  [{"id": "…",                                  # the sourceId, for read_document()
#                 "name": "report.md", "category": "document",
#                 "mimeType": "text/markdown", "size": 9118,
#                 "storageId": "…", "status": "ready",
#                 "createdAt": "2026-10-05T18:02:11.000Z"}]
# }
لا شيء من خادم set secist موجود في

وهذا ما يبقي هوية قابلة للاستخدام من اي مكان — نصك ، صفحة ، تشغيل — دون ان يعرف اين تجلس الپايتات .

ما هي القائمة وما لا

:لا ليس ليس
منفذ api.filesملفات على حاسوب حاسوب — تلك files.list()
ملحقات مخزنة للحسابفي سلالة من الأشياء - تلك run({ action: "list" })
إنتاج وسائط الإعلام وحفظهاأي شيء في الهاتف

كأداة

It is one of the few declarations that take no argument, and the run makes more of it than a bare list: it answers with the account's files and the files of the caller's computer, each group named, so the model knows which identifier to use next — an id for one, a path for the other.

tools: {
  list_documents: api.tools.listDocuments,
  read_document: api.tools.readDocument,
}

// What the model is told, in a run:
// { computer: { storage: "MacBook", files: [{ path, mimeType, size }] },
//   server:   [{ sourceId, name, mimeType }] }
tools = {
    "list_documents": api.tools.list_documents,
    "read_document": api.tools.read_document,
}

# What the model is told, in a run:
# {"computer": {"storage": "MacBook", "files": [{"path", "mimeType", "size"}]},
#  "server":   [{"sourceId", "name", "mimeType"}]}

الأخطاء

فشل يزيد على الرسالة التي أعطاها الخادم. لا يوجد خطأ فارغ- سُلَطْح: حساب بدون أجوبة ملف مع مصفوفة فارغة.