You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(dropbox): align integration with Dropbox API docs, add revision/sharing tools (#5468)
* fix(dropbox): align integration with Dropbox API docs, add revision/sharing tools
- fix search root-path bug: Dropbox requires "" not "/" for root, same fix already applied to list_folder
- fix create_shared_link to return the existing link's metadata (url) when Dropbox reports shared_link_already_exists with matching settings, instead of just erroring
- fix upload route autorename default (was true, Dropbox's documented default is false)
- trim() all path/fromPath/toPath/rev params to guard against copy-pasted whitespace
- mark nullable output fields (id, size, path_display, etc.) optional: true so folder/deleted items don't imply always-present file fields
- widen path_display/path_lower types to optional, matching the real API
- add dropbox_list_shared_links, dropbox_list_revisions, dropbox_restore tools + block wiring, filling gaps flagged during the audit (revision history/version recovery, and a companion to create_shared_link for looking up existing links)
* style(dropbox): use ?? instead of || for boolean defaults in list_shared_links
Consistency nit from Greptile review - matches the ?? pattern already used
by every other transformResponse in this PR.
* fix(dropbox): mark path_display/path_lower optional everywhere for consistency
Greptile flagged that path_display was left required in list_folder.ts and
list_revisions.ts despite being widened to optional in types.ts and most
other output schemas in this PR. Fixed those two plus create_folder.ts,
restore.ts, upload.ts, and list_shared_links.ts, which had the same gap.
* fix(dropbox): list_shared_links path omission + list_revisions pagination
Cursor Bugbot flagged two real gaps:
- list_shared_links sent path: "" for root/all, but Dropbox only returns
every link account-wide when path is omitted entirely; "" scopes to the
root folder specifically. Now omits the field for root/empty/"/" input.
- list_revisions exposed hasMore but no way to actually fetch more pages
(Dropbox's before_rev cursor). Added a beforeRev param + advanced-mode
block field.
A third flagged issue (create_shared_link's error.shared_link_already_exists.metadata
path) was verified against the official sharing.stone spec and confirmed correct
as-is - replied on the PR thread with the citation, no change needed.
* fix(dropbox): correct shared_link_already_exists JSON path
The prior fix read data.error.shared_link_already_exists.metadata, which
is wrong per Stone's own JSON serialization rules: a union member whose
payload is a struct (SharedLinkMetadata) flattens that struct's fields
alongside ".tag" rather than nesting under a wrapper key. The real shape
is data.error.shared_link_already_exists directly (with an extra ".tag"
field mixed in) - there is no nested .metadata key, so the existing-link
fast path never fired before this fix.
Also marks list_shared_links' expires output optional, matching every
other optional field in this PR and the SharedLinkMetadata spec.
* fix(dropbox): wire cursor pagination for List Shared Links in the block
The dropbox_list_shared_links tool already accepted a cursor param, but the
block never exposed it, so a workflow couldn't page past the first batch
when hasMore was true. Adds an advanced-mode cursor subBlock + input entry,
mirroring List Revisions' beforeRev field added in the same PR.
'# Share Dropbox Link\n\nGenerate a shareable link for an existing Dropbox item with the right access controls.\n\n## Steps\n1. Confirm the exact path of the file or folder. Use Get Metadata to verify it exists.\n2. Call Create Shared Link with the path and the requested visibility — public for anyone, team-only for internal sharing, or password-protected with a supplied password.\n3. Set an expiration date if the link should not be permanent.\n\n## Output\nReturn the shared link URL, its visibility setting, and the expiration date if one was applied.',
503
594
},
595
+
{
596
+
name: 'recover-dropbox-file-version',
597
+
description:
598
+
'Recover an earlier version of a Dropbox file after an unwanted overwrite or edit.',
599
+
content:
600
+
'# Recover Dropbox File Version\n\nRoll a file back to an earlier saved revision.\n\n## Steps\n1. Call List Revisions on the file path to see prior versions, each with a revision identifier and modification time.\n2. Identify the revision to recover based on its timestamp or size.\n3. Call Restore File with the file path and the chosen revision identifier. This saves that revision as the new current version — it does not delete history.\n\n## Output\nReturn the restored file metadata, including its path and the revision that was restored.',
0 commit comments