| name | reblock-upload-sync |
| description | Plan and execute incremental local-file upload synchronization to Reblock entries. Use when users ask to sync a directory to an entry alias, upload only changed files, run dry-run plans, or verify post-sync integrity with hash/linkCount checks. |
Reblock Upload Sync
Synchronize local files to an entry alias with safe, incremental, and verifiable steps.
Use This Workflow
- Prefer the high-level tool
sync_directories_to_entries.
- Sync one or multiple directories in one request.
- Auto-create entries when missing unless explicitly disabled.
- Keep remote-only files by default (
remotePolicy=keep).
- Produce JSON and Markdown reports for each directory plus batch summary.
Standard Execution Order
- Run
sync_directories_to_entries with:
directories[]
createEntryIfMissing=true
remotePolicy=keep
reportDir=analysis_output
- Return per-directory totals:
- new files
- changed files
- unchanged files
- rejected files
- Return apply totals:
- requested uploads
- uploaded
- failed
- Return verify totals:
- missing remote
- missing sha
- duplicate names
- If any directory fails, continue others and report failed directories clearly.
Fallback (Low-Level Tools)
Use low-level tools only when high-level tool is unavailable:
build_local_manifest
plan_upload_sync
apply_upload_sync
verify_upload_sync
Verification Rules
- Compare local files against remote by
name + sha256.
- Confirm no unexpected status errors (
4xx/5xx) in upload batch.
- Track missing SHA and duplicate names in verification output.
- Recommend
logs:analyze/doctor path when data inconsistency is suspected.
Fallback Commands
Use shell/API fallback only when MCP tool is unavailable:
shasum -a 256 <file>
curl -X POST "http://127.0.0.1:4362/upload/<alias>?name=<filename>" --data-binary "@<file>"
npm run logs:analyze -- --days 1
Output Contract
Always return:
PlanSummary: totals and risk flags
ApplySummary: uploaded/skipped/failed counts
VerifySummary: passed checks and mismatches
ReportFiles: per-directory JSON/Markdown + batch JSON summary
NextAction: retry failed directories, rollback, or done
Default to safety over throughput.