Skip to main content
Glama

sync

Destructive

Copy AnkiWeb API data into a local SQLite database for offline search and analysis, with incremental refreshes and selectable resources.

Instructions

Sync API data to local SQLite for offline search and analysis

Input Schema

NameRequiredDescriptionDefault
csvNoOutput as CSV (table and array responses) (default: false)
yesNoSkip confirmation prompts (explicit confirmation for scripts) (default: false)
fullNoFull resync (ignore previous checkpoint) (default: false)
jsonNoOutput as JSON (default: false)
agentNoSet agent-friendly output defaults (--json --compact --no-input --no-color) (default: false)
paramNoExtra query param to inject into flat-list sync requests (repeatable, key=value). Skipped on path-scoped dependent requests so a top-level scope like workspace=<id> does not double up on /parents/<id>/children calls. Use --global-param to inject everywhere. Avoid pagination keys (limit/since/cursor) — overriding them corrupts resume state.
plainNoOutput as plain tab-separated text (default: false)
quietNoBare output, one value per line (default: false)
sinceNoIncremental sync duration (e.g. 7d, 24h, 1w, 30m)
selectNoComma-separated fields to include in output (e.g. --select id,notetype_id,deck_id)
strictNoExit non-zero on any per-resource failure (default: only critical failures or all-resource failure exit non-zero). (default: false)
compactNoReturn only key fields (id, name, status, timestamps) for minimal token usage (default: false)
dry-runNoShow request without sending (default: false)
max-ageNoMaximum acceptable age of local-store data before a stderr hint suggests sync; 0 disables (default: 30m0s)
receiptNoWrite an atomic private run receipt (default: false)
timeoutNoRequest timeout (default: 1m0s)
no-cacheNoBypass response cache (default: false)
no-colorNoDisable colored output (default: false)
no-inputNoDisable all interactive prompts (for CI/agents) (default: false)
no-learnNoDisable the teach/recall learning loop for this invocation (default: false)
no-pruneNoDisable deletion reconciliation on --full (by default a full sync prunes local rows the API no longer returns after a complete walk) (default: false)
max-pagesNoMaximum pages to fetch per resource (0 = unlimited; cap-hit emits a sync_warning event) (default: 0)
resourcesNoComma-separated resource types to sync. Naming a parent also runs its parent-keyed dependents (see Long help for scoping).
idempotentNoTreat already-existing create results as a successful no-op (default: false)
rate-limitNoMax requests per second (0 to disable; default auto — pace to server rate-limit headers) (default: auto)
concurrencyNoNumber of parallel sync workers (default: 4)
data-sourceNoData source for read commands: auto (live with local fallback), live (API only), local (synced data only) (default: auto)
latest-onlyNoRefresh head of each resource only; clears resume cursor and caps pages at 1. Mutually exclusive with --since (--since wins). (default: false)
global-paramNoExtra query param to inject into every sync request including dependent path-scoped calls (repeatable, key=value). Use when an API requires a scope on every call regardless of path nesting.
client-profileNoSelect the tenant-gated client profile (env: ANKIWEB_CLIENT_PROFILE)
human-friendlyNoEnable colored output and rich formatting (default: false)
resource-paramNoPer-resource extra query param (repeatable, resource:key=value). Wins over --param and --global-param when keys conflict.
allow-partial-failureNoDowngrade response-body partial-failure (e.g. partialFailureError) to a warning instead of a non-zero exit (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, openWorldHint=true, and idempotentHint=false, so the agent knows this is a risky, mutable operation. The description adds only the destination store and offline purpose; it does not disclose behaviors like checkpoint-based resume, full-resync pruning, confirmation prompts, rate limiting, or partial-failure handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is front-loaded and wastes no words. It is efficiently sized for the core purpose, though its brevity contributes to under-specification elsewhere.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 33-parameter sync tool with destructive and open-world annotations, one sentence is far too thin. It omits how incremental sync works, what full resync prunes, how resources are scoped, and when to use this versus live-query siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all 33 parameters are already documented in the schema. The description adds no parameter-specific guidance beyond what the schema provides, which is the baseline expectation at full coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (Sync), source (API data), destination (local SQLite), and intended use (offline search and analysis). It distinguishes the tool from live-query siblings by naming the local-store/offline purpose, though it does not explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It implies a use case ('offline search and analysis') but gives no explicit when-to-use guidance, no prerequisites, and no comparison to live-search siblings such as search or sql. An agent must infer whether to run sync versus query live data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.