Skip to main content
Glama

Refresh and scan a library

trigger_scan

Asks a service to reconcile itself with what is on disk: the "it downloaded but will not play" fix, and the usual fix for a stale scan diagnose_media reports.

Instructions

Asks a service to reconcile itself with what is on disk: the "it downloaded but will not play" fix, and the usual fix for a stale scan diagnose_media reports. No id rescans the whole library; on Prowlarr it pushes the indexer list to the apps. An id refreshes and rescans one item. On Jellyfin, Emby and Plex a scan only finds changed files; wrong metadata is fix_metadata. action: rename (files to the service's naming, needs id), bookdrop (rescan Grimmory's Bookdrop). Importing a download: import_download. Most actions queue and return; follow them in get_stack_health commands. Previews first; confirm to run. Field reference: arr://docs/trigger_scan.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "service": "<service>"
    },
    "name": "trigger_scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoOne movie, series, Lidarr artist or book id: `acquisition.id` on a get_library record. Omit with action: "scan" to scan the whole library.
actionNoscan rescans the library, or just one item when `id` is given (on Lidarr only the refresh narrows to one artist: the rescan still reads every root folder); on an *arr it refreshes metadata from the provider first. rename renames one item's files to the service's own naming scheme, and requires `id`. bookdrop rescans Grimmory's Bookdrop folder for new files.scan
confirmNoThe token from this tool's preview; pass it back to apply.
dry_runNoPreview only, no token issued: for "what if" questions, not the first step of a change.
libraryNoGrimmory only: one library, by name or by id as get_stack_health and get_library show it. Omit to rescan every library.
serviceYesprowlarr syncs its indexers to the apps.
instanceNoWhich instance (e.g. "4k") when several of this service exist. Omit it when there is one.

Output Schema

NameRequiredDescriptionDefault
noopYes
tierYes
toolYes
targetYes
appliedYes
dry_runYes
effectsYes
serviceYes
summaryYes
operationYes
permissionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.0
    • changedInput schema / properties / service / enum
      Previous value: -[
      -  "radarr",
      -  "sonarr",
      -  "whisparr",
      -  "lidarr",
      -  "prowlarr",
      -  "jellyfin",
      -  "plex",
      -  "grimmory"
      -]New value: +[
      +  "radarr",
      +  "sonarr",
      +  "whisparr",
      +  "lidarr",
      +  "prowlarr",
      +  "jellyfin",
      +  "emby",
      +  "plex",
      +  "grimmory"
      +]
  2. Changed11 schema fields changedv2.2.0
    • changedInput schema / properties / confirm / description
      Previous value: -"The token from this tool's preview, passed back verbatim to apply it. Single-use and bound to the previewed arguments."New value: +"The token from this tool's preview; pass it back to apply."
    • changedInput schema / properties / dry_run / description
      Previous value: -"Preview without a confirm token, for \"what would happen if\" questions; not the first step of a real change."New value: +"Preview only, no token issued: for \"what if\" questions, not the first step of a change."
    • removedOutput schema / properties / audit_id
      Removed value: -{
      -  "type": "number"
      -}
    • removedOutput schema / properties / confirm_error
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / confirm_token
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / next_steps
      Removed value: -{
      -  "items": {
      -    "additionalProperties": {},
      -    "properties": {
      -      "arguments": {
      -        "additionalProperties": {},
      -        "properties": {},
      -        "type": "object"
      -      },
      -      "tool": {
      -        "type": "string"
      -      },
      -      "why": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "tool",
      -      "arguments",
      -      "why"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / permission / properties / reason
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / permission / properties / remedy
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / result
      Removed value: -{}
    • removedOutput schema / properties / unchecked
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / warnings
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
  3. Changed9 schema fields changedv1.84.0
    • changedInput schema / properties / action / description
      Previous value: -"scan rescans the library, or just one item when `id` is given (on Lidarr only the refresh narrows to one artist: the rescan still reads every root folder); on Radarr, Sonarr, Whisparr and Lidarr it refreshes metadata from the provider first. rename renames one item's files to the service's own naming scheme, and requires `id`. import takes a finished download the service never picked up, and requires `download_id`; add `mapping` when the service cannot tell what a file is. remap reassigns already-imported Sonarr files to the episodes a person has confirmed they are, and requires `id` and `reassignments`. postprocess reruns NZBGet's post-processing on a finished download, and requires `download_id`. bookdrop rescans Grimmory's Bookdrop folder for new files, or with `id` imports that one file."New value: +"scan rescans the library, or just one item when `id` is given (on Lidarr only the refresh narrows to one artist: the rescan still reads every root folder); on an *arr it refreshes metadata from the provider first. rename renames one item's files to the service's own naming scheme, and requires `id`. bookdrop rescans Grimmory's Bookdrop folder for new files."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "scan",
      -  "rename",
      -  "import",
      -  "remap",
      -  "postprocess",
      -  "bookdrop"
      -]New value: +[
      +  "scan",
      +  "rename",
      +  "bookdrop"
      +]
    • removedInput schema / properties / download_id
      Removed value: -{
      -  "description": "The download client's own id, as `downloadId` on a get_queue row (or, for nzbget, on a get_history row). Required for action: \"import\" and action: \"postprocess\", ignored otherwise.",
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / properties / id / description
      Previous value: -"One movie, series or Lidarr artist id — `acquisition.id` on a get_library record. Omit with action: \"scan\" to scan the whole library. With action: \"bookdrop\", a Grimmory Bookdrop file id from get_queue: imports that file."New value: +"One movie, series, Lidarr artist or book id: `acquisition.id` on a get_library record. Omit with action: \"scan\" to scan the whole library."
    • changedInput schema / properties / library / description
      Previous value: -"Grimmory only: one library, by name or by id as stack_health and get_library show it. Omit to rescan every library."New value: +"Grimmory only: one library, by name or by id as get_stack_health and get_library show it. Omit to rescan every library."
    • removedInput schema / properties / mapping
      Removed value: -{
      -  "description": "For action: \"import\", ignored otherwise. What each named file really is, for a download the service matched wrongly or not at all. The service judges each mapped file again with that answer and imports it only if it then accepts it; files left out keep the service's own match.",
      -  "items": {
      -    "properties": {
      -      "episodes": {
      -        "description": "Sonarr: the episode numbers in this file, more than one for a multi-episode file.",
      -        "items": {
      -          "minimum": 1,
      -          "type": "integer"
      -        },
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "movie_id": {
      -        "description": "Radarr: the movie this file is, `acquisition.id` on get_library.",
      -        "pattern": "^[1-9]\\d*$",
      -        "type": "string"
      -      },
      -      "path": {
      -        "description": "A file in the download, as the import preview names it, or absolute.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "season": {
      -        "description": "Sonarr: the season the episodes are in.",
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "series_id": {
      -        "description": "Sonarr: the series, `acquisition.id` on get_library.",
      -        "pattern": "^[1-9]\\d*$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "path"
      -    ],
      -    "type": "object"
      -  },
      -  "minItems": 1,
      -  "type": "array"
      -}
    • removedInput schema / properties / reassignments
      Removed value: -{
      -  "description": "Required for action: \"remap\", ignored otherwise. Include every file the change touches: a file moved onto an episode that already has one must say where that one goes too, or the call is refused.",
      -  "items": {
      -    "properties": {
      -      "episode": {
      -        "description": "The episode this file really is.",
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "path": {
      -        "description": "The file, relative to the series folder as Sonarr names it (\"Season 01/Show - S01E01 - Pilot.mkv\"), or absolute.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "season": {
      -        "minimum": 0,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "path",
      -      "season",
      -      "episode"
      -    ],
      -    "type": "object"
      -  },
      -  "minItems": 1,
      -  "type": "array"
      -}
    • changedInput schema / properties / service / description
      Previous value: -"prowlarr syncs its indexers to the apps; nzbget only with action: \"postprocess\"."New value: +"prowlarr syncs its indexers to the apps."
    • changedInput schema / properties / service / enum
      Previous value: -[
      -  "radarr",
      -  "sonarr",
      -  "whisparr",
      -  "lidarr",
      -  "prowlarr",
      -  "jellyfin",
      -  "nzbget",
      -  "plex",
      -  "grimmory"
      -]New value: +[
      +  "radarr",
      +  "sonarr",
      +  "whisparr",
      +  "lidarr",
      +  "prowlarr",
      +  "jellyfin",
      +  "plex",
      +  "grimmory"
      +]
  4. Changed4 schema fields changedv1.74.1
    • changedInput schema / properties / action / description
      Previous value: -"scan rescans the library, or just one item when `id` is given (on Lidarr only the refresh narrows to one artist: the rescan still reads every root folder); on Radarr, Sonarr, Whisparr and Lidarr it refreshes metadata from the provider first. rename renames one item's files to the service's own naming scheme, and requires `id`. import takes a finished download the service never picked up, and requires `download_id`; add `mapping` when the service cannot tell what a file is. remap reassigns already-imported Sonarr files to the episodes a person has confirmed they are, and requires `id` and `reassignments`. postprocess reruns NZBGet's post-processing on a finished download, and requires `download_id`. bookdrop rescans Grimmory's Bookdrop folder for new files."New value: +"scan rescans the library, or just one item when `id` is given (on Lidarr only the refresh narrows to one artist: the rescan still reads every root folder); on Radarr, Sonarr, Whisparr and Lidarr it refreshes metadata from the provider first. rename renames one item's files to the service's own naming scheme, and requires `id`. import takes a finished download the service never picked up, and requires `download_id`; add `mapping` when the service cannot tell what a file is. remap reassigns already-imported Sonarr files to the episodes a person has confirmed they are, and requires `id` and `reassignments`. postprocess reruns NZBGet's post-processing on a finished download, and requires `download_id`. bookdrop rescans Grimmory's Bookdrop folder for new files, or with `id` imports that one file."
    • changedInput schema / properties / id / description
      Previous value: -"One movie, series or Lidarr artist id — `acquisition.id` on a get_library record. Omit with action: \"scan\" to scan the whole library."New value: +"One movie, series or Lidarr artist id — `acquisition.id` on a get_library record. Omit with action: \"scan\" to scan the whole library. With action: \"bookdrop\", a Grimmory Bookdrop file id from get_queue: imports that file."
    • changedInput schema / properties / mapping / items / properties / movie_id / pattern
      Previous value: -"^\\d+$"New value: +"^[1-9]\\d*$"
    • changedInput schema / properties / mapping / items / properties / series_id / pattern
      Previous value: -"^\\d+$"New value: +"^[1-9]\\d*$"
  5. Changed24 schema fields changedv1.74.0
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / confirm / description
      Previous value: -"The confirmation token from this same tool's preview of this same operation. Omit it to get a preview and a token; pass the token back verbatim to apply the change. Tokens are single-use, expire, and are bound to the exact operation and arguments previewed."New value: +"The token from this tool's preview, passed back verbatim to apply it. Single-use and bound to the previewed arguments."
    • changedInput schema / properties / dry_run / description
      Previous value: -"Preview only: resolve the target and describe exactly what would happen, then stop. Never mutates anything and never returns a confirmation token. Use this to answer \"what would happen if…\" — not as the first step of actually doing it."New value: +"Preview without a confirm token, for \"what would happen if\" questions; not the first step of a real change."
    • changedInput schema / properties / instance / description
      Previous value: -"Which instance, when several of this service are configured — for example \"4k\" or \"hd\". Omit it when there is only one. If several are configured and you omit it, the call is refused and the names are listed."New value: +"Which instance (e.g. \"4k\") when several of this service exist. Omit it when there is one."
    • removedInput schema / properties / mapping / items / properties / episodes / items / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / mapping / items / properties / season / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / reassignments / items / properties / episode / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / reassignments / items / properties / season / maximum
      Removed value: -9007199254740991
    • changedInput schema / properties / service / description
      Previous value: -"radarr, sonarr, whisparr, lidarr, jellyfin, plex or grimmory — or prowlarr, to sync its indexers to the apps, or nzbget for action: \"postprocess\"."New value: +"prowlarr syncs its indexers to the apps; nzbget only with action: \"postprocess\"."
    • changedInput schema / properties / service / enum
      Previous value: -[
      -  "radarr",
      -  "sonarr",
      -  "whisparr",
      -  "lidarr",
      -  "prowlarr",
      -  "bazarr",
      -  "jellyfin",
      -  "seerr",
      -  "sabnzbd",
      -  "nzbget",
      -  "transmission",
      -  "qbittorrent",
      -  "plex",
      -  "profilarr",
      -  "cleanuparr",
      -  "reclaimerr",
      -  "dispatcharr",
      -  "shelfmark",
      -  "grimmory"
      -]New value: +[
      +  "radarr",
      +  "sonarr",
      +  "whisparr",
      +  "lidarr",
      +  "prowlarr",
      +  "jellyfin",
      +  "nzbget",
      +  "plex",
      +  "grimmory"
      +]
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / properties / applied / description
      Removed value: -"Whether the change actually happened. False on every preview, refusal and no-op."
    • removedOutput schema / properties / audit_id / description
      Removed value: -"The audit row this call wrote. Every branch writes one, including previews and refusals."
    • removedOutput schema / properties / confirm_error / description
      Removed value: -"Why a presented token was rejected. Present only when one was presented."
    • removedOutput schema / properties / confirm_token / description
      Removed value: -"Present when a preview is awaiting confirmation. Single-use, expiring, bound to this exact operation and arguments."
    • removedOutput schema / properties / dry_run / description
      Removed value: -"Whether this was an explicit preview."
    • removedOutput schema / properties / effects / description
      Removed value: -"Itemised consequences, most severe first. Empty is legitimate for a no-op."
    • removedOutput schema / properties / next_steps / description
      Removed value: -"Present on an applied write when another call is worth offering. Offer it to the person; do not run it."
    • removedOutput schema / properties / noop / description
      Removed value: -"True when the request resolved but there was nothing to do — already monitored, already approved."
    • removedOutput schema / properties / result / description
      Removed value: -"Whatever the service returned, on a write that landed."
    • removedOutput schema / properties / summary / description
      Removed value: -"One sentence, safe to show a human."
    • removedOutput schema / properties / target / description
      Removed value: -"The resolved id the write acts on — what the confirmation token is bound to."
    • removedOutput schema / properties / unchecked / description
      Removed value: -"Present when a service could not be asked, so its absence from `warnings` means nothing."
    • removedOutput schema / properties / warnings / description
      Removed value: -"Present on a preview when another service has something to say about this change. Tell the user before confirming."
  6. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say non-read-only and non-destructive; the description goes much further — most actions queue asynchronously and are tracked in get_stack_health `commands`, a preview token must be passed back via `confirm`, Jellyfin/Emby/Plex only find changed files, Prowlarr pushes its indexer list to apps, and Lidarr's refresh narrows but the rescan still walks every root folder.

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?

Front-loaded with the purpose and symptom, then per-service behavior, then action semantics, then alternatives, then the doc pointer. Dense backtick-heavy phrasing is efficient but borders on telegraphic in places.

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 nine-service, seven-parameter tool with an output schema, it covers the async command flow, preview/confirm, per-service quirks, and sibling routing — everything an agent needs before calling, leaving return values to the output schema.

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 coverage is 100% and each parameter already documents itself in detail (including the id/action interaction and the dry_run-vs-confirm distinction). The description largely restates that guidance, so it adds nuance rather than new meaning; 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 concrete verb and resource — reconcile a service with what is on disk — and immediately binds it to recognizable symptoms ('downloaded but will not play', stale scans from diagnose_media). It is clearly separable from fix_metadata and import_download, which are named.

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

Usage Guidelines5/5

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

Gives explicit routing: no `id` means whole library, `id` means one item, wrong metadata goes to fix_metadata, importing a download goes to import_download. It also covers action-level selection (rename needs `id`, bookdrop for the Bookdrop folder) and the preview-then-confirm workflow.

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