Skip to main content
Glama

import_from_sidecar

Restore missing saved Spotify items from a library.json sidecar: re-add tracks, albums, shows, episodes, and audiobooks, skip items already in the library, and dry-run by default.

Instructions

Additive restore from a library.json sidecar written by export_library_json: re-adds every missing saved item across all five collections (tracks, albums, shows, episodes, audiobooks) through the unified PUT /me/library endpoint, skipping items the library already holds. Rows whose uri is not a canonical spotify::<22-char id> URI are counted as invalid and never sent. Collections the file does not carry are named in absent_keys. The exporter's own truncated / cap_reached flags are surfaced as sidecar_truncated + truncated_collections: a capped sidecar restores only the rows it holds and says so, and a file with no flag reports completeness as UNKNOWN rather than complete. The prompt and the result both state the sidecar path, the date the file itself declares (exported_at, or the named reason it declares none — never the mtime), the row count, the one use being made of it, and whether a human confirmed that use (see consent_note). dry_run=true by default. Quota: local read + contains-check + chunked writes when dry_run=false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoPreview only, making no API calls at all. Writes happen only when explicitly set to false.
input_pathNoPath to sidecar JSON (default: <portability>/library.json)
response_formatNo'concise' = human prose, 'detailed' = more fields in prose, 'json' = raw API objectconcise

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.2
    • changedInput schema / properties / dry_run / description
      Previous value: -"Preview only when true"New value: +"Preview only, making no API calls at all. Writes happen only when explicitly set to false."
  2. Changed2 schema fields changedv1.31.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  3. Addedv1.26.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only carry destructiveHint=false, so the description carries the real burden and does so thoroughly: additive semantics, skip-existing behavior, invalid-URI rows never sent, absent_keys reporting, sidecar_truncated/truncated_collections surfacing, UNKNOWN vs complete reporting, the declared-date rule, consent_note, and the quota (local read + contains-check + chunked writes only when dry_run=false). This is far beyond what the annotation provides.

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 opening sentence is strongly front-loaded and every subsequent sentence carries behavioral information. It is dense and clause-heavy (unsaved/absent_keys/truncation/consent bundled into few long sentences), which costs a little readability, but there is essentially no filler.

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

Completeness5/5

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

For a complex, no-output-schema restore tool, the description covers trigger, safety, default mode, the shape of the reported result (absent_keys, sidecar_truncated, truncated_collections, exported_at, consent_note) and its cost profile. An agent has everything needed to call it correctly and interpret the outcome.

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 three parameters are already documented, and the description largely repeats the dry_run default rather than adding new meaning. It does add the default sidecar path and the 'no API calls at all' nuance, but the schema does the heavy lifting, so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb+resource (additive restore from a library.json sidecar) and names its counterpart, export_library_json, which wrote the file. The five collections and the underlying PUT /me/library endpoint are named, so the agent can distinguish it from restore_library_snapshot and backup_first without opening the schema.

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

Usage Guidelines4/5

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

It clearly establishes the usage context: it is additive (skips items already held), it reads only sidecars written by export_library_json, and dry_run is the default preview mode. It does not explicitly contrast against siblings like restore_library_snapshot or import_profile_state, so it stops short of full when/when-not routing.

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

Deploy Server

Other Tools