{"openapi":"3.1.0","info":{"title":"Infomaniak kDrive (BYOK) API","version":"0.1.0","description":"Infomaniak kDrive (BYOK) lets an AI assistant read your own Infomaniak kDrive data through the Infomaniak kDrive API with a key you supply (Infomaniak API token with the drive scope). Read-only: 11 tools (list_drives, get_drive, get_drive_settings, list_directory, get_file, count_directory, list_largest_files, list_last_modified_files, search_files, list_categories, get_trash_count). The BYOK key...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-kdrive.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-kdrive/docs"},"termsOfService":"https://connectorbay.com/byok-kdrive/terms"},"servers":[{"url":"https://byok-kdrive.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-kdrive/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_drives":{"post":{"operationId":"list_drives","summary":"List the kDrives the token can access for one Infomaniak account: name, total and used size in bytes, user counts and qu","description":"List the kDrives the token can access for one Infomaniak account: name, total and used size in bytes, user counts and quota, role, lock and maintenance state. Use for \"Which kDrives do I have and how full are they\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Infomaniak account ID that owns the drives.","minimum":1,"title":"Account Id","type":"integer"},"page":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Items per page.","title":"Per Page"}},"required":["account_id"],"title":"list_drivesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_drive":{"post":{"operationId":"get_drive","summary":"Get one kDrive: name, total and used size in bytes, user count and quota, your role, lock, maintenance and expiry state.","description":"Get one kDrive: name, total and used size in bytes, user count and quota, your role, lock, maintenance and expiry state. Use for \"How much space is used in kDrive 92170\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"}},"required":["drive_id"],"title":"get_driveArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_drive_settings":{"post":{"operationId":"get_drive_settings","summary":"Get a drive's settings: trash retention, file versioning limits, AI scan approvals and default office modes. Use for \"Wh","description":"Get a drive's settings: trash retention, file versioning limits, AI scan approvals and default office modes. Use for \"What are the versioning and trash settings of kDrive 92170\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"}},"required":["drive_id"],"title":"get_drive_settingsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_directory":{"post":{"operationId":"list_directory","summary":"List the files and sub directories of one directory (use file_id 1 for the drive root) with names, paths, types, sizes, ","description":"List the files and sub directories of one directory (use file_id 1 for the drive root) with names, paths, types, sizes, MIME types and dates. Cursor paged. Use for \"What is in the root folder of kDrive 92170\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"},"file_id":{"description":"File or directory ID; 1 is the root directory of the drive.","title":"File Id","type":"integer"},"limit":{"anyOf":[{"maximum":1000,"minimum":5,"type":"integer"},{"type":"null"}],"default":50,"description":"Items per page (5 to 1000).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's cursor field to get the next page; empty for the first page.","title":"Cursor"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction: asc or desc.","title":"Order"}},"required":["drive_id","file_id"],"title":"list_directoryArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_file":{"post":{"operationId":"get_file","summary":"Get one file or directory by ID: name, path, type, status, visibility, size, MIME type and dates. Does not download cont","description":"Get one file or directory by ID: name, path, type, status, visibility, size, MIME type and dates. Does not download content. Use for \"Show the details of kDrive file 28077\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"},"file_id":{"description":"File or directory ID.","title":"File Id","type":"integer"}},"required":["drive_id","file_id"],"title":"get_fileArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/count_directory":{"post":{"operationId":"count_directory","summary":"Count the files and directories in a directory (current level only, or the whole subtree with depth unlimited). Use for ","description":"Count the files and directories in a directory (current level only, or the whole subtree with depth unlimited). Use for \"How many files are in kDrive folder 30810\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"},"file_id":{"description":"Directory ID; 1 for the drive root.","title":"File Id","type":"integer"},"depth":{"anyOf":[{"enum":["folder","unlimited"],"type":"string"},{"type":"null"}],"default":null,"description":"folder (default) counts one level, unlimited counts the whole subtree.","title":"Depth"}},"required":["drive_id","file_id"],"title":"count_directoryArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_largest_files":{"post":{"operationId":"list_largest_files","summary":"List the largest files in the whole drive, biggest first, with names, paths and sizes in bytes. Cursor paged. Use for \"W","description":"List the largest files in the whole drive, biggest first, with names, paths and sizes in bytes. Cursor paged. Use for \"Which files take the most space in kDrive 92170\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"},"limit":{"anyOf":[{"maximum":1000,"minimum":5,"type":"integer"},{"type":"null"}],"default":50,"description":"Items per page (5 to 1000).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's cursor field to get the next page; empty for the first page.","title":"Cursor"}},"required":["drive_id"],"title":"list_largest_filesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_last_modified_files":{"post":{"operationId":"list_last_modified_files","summary":"List the most recently modified files and directories in the drive. Cursor paged. Use for \"What changed recently in kDri","description":"List the most recently modified files and directories in the drive. Cursor paged. Use for \"What changed recently in kDrive 92170\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"},"limit":{"anyOf":[{"maximum":1000,"minimum":5,"type":"integer"},{"type":"null"}],"default":50,"description":"Items per page (5 to 1000).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's cursor field to get the next page; empty for the first page.","title":"Cursor"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort direction: asc or desc.","title":"Order"}},"required":["drive_id"],"title":"list_last_modified_filesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_files":{"post":{"operationId":"search_files","summary":"Search files and directories of a drive by name or content (query of at least 3 characters), optionally inside one direc","description":"Search files and directories of a drive by name or content (query of at least 3 characters), optionally inside one directory or limited to recent modifications. Use for \"Find kDrive files about the annual report\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"},"query":{"description":"Search text, at least 3 characters.","maxLength":200,"title":"Query","type":"string"},"query_scope":{"anyOf":[{"enum":["all","content","filename"],"type":"string"},{"type":"null"}],"default":null,"description":"Where to match: all, content or filename.","title":"Query Scope"},"directory_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only search inside this directory ID.","title":"Directory Id"},"modified_at":{"anyOf":[{"enum":["last_24_hours","last_7_days","last_30_days","last_90_days","last_12_months"],"type":"string"},{"type":"null"}],"default":null,"description":"Modification window.","title":"Modified At"},"limit":{"anyOf":[{"maximum":1000,"minimum":5,"type":"integer"},{"type":"null"}],"default":50,"description":"Items per page (5 to 1000).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's cursor field to get the next page; empty for the first page.","title":"Cursor"}},"required":["drive_id","query"],"title":"search_filesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_categories":{"post":{"operationId":"list_categories","summary":"List the file categories defined in a drive (name, colour, predefined flag, number of uses). Use for \"Which categories e","description":"List the file categories defined in a drive (name, colour, predefined flag, number of uses). Use for \"Which categories exist in kDrive 92170\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"}},"required":["drive_id"],"title":"list_categoriesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_trash_count":{"post":{"operationId":"get_trash_count","summary":"Count the files and directories currently in a drive's trash. Use for \"How many items are in the trash of kDrive 92170\".","description":"Count the files and directories currently in a drive's trash. Use for \"How many items are in the trash of kDrive 92170\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"drive_id":{"description":"kDrive identifier (the id of a drive from list_drives).","title":"Drive Id","type":"integer"}},"required":["drive_id"],"title":"get_trash_countArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}