Skip to main content
Glama

bulk_edit_documents

Destructive

Apply bulk operations to multiple Paperless-ngx documents at once, including tagging, correspondents, storage paths, permissions, rotation, merging, splitting, reprocessing, and deletion.

Instructions

Perform bulk operations on multiple documents. Note: 'remove_tag' removes a tag from specific documents (tag remains in system), while 'delete_tag' permanently deletes a tag from the entire system. ⚠️ WARNING: 'delete' moves documents to the trash on Paperless-ngx 2.10+ (temporarily restorable; retention depends on server policy and documents may be permanently removed automatically or manually); older versions permanently delete them. Confirmation is required in all versions.

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": {
      "documents": "<documents>",
      "method": "<method>"
    },
    "name": "bulk_edit_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNo
mergeNoFor set_permissions: true adds to existing permissions and keeps the current owner; false (default) replaces the listed users/groups
ownerNoFor set_permissions: new owner user ID, or null to remove the owner. Unless merge is true, omitting owner also clears the current owner.
pagesNo
methodYes
confirmNoMust be true when method is 'delete' to confirm destructive operation
degreesNo
add_tagsNo
documentsYes
remove_tagsNo
storage_pathNo
correspondentNo
document_typeNo
set_permissionsNoFor set_permissions: view/change permissions to apply. Omitted actions (view/change) and omitted users/groups lists are left untouched; an empty list [] removes all (unless merge is true). Omit entirely for owner-only changes.
delete_originalsNo
add_custom_fieldsNo
metadata_document_idNo
remove_custom_fieldsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv2.2.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / add_custom_fields
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "field": {
      +        "type": "number"
      +      },
      +      "value": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "items": {
      +              "type": "number"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The value for the custom field. For monetary fields, use currency code prefix format (e.g., USD10.00, GBP123.45, EUR9.99) — NOT trailing symbol format (e.g., 10.00$). For documentlink fields, use a single document ID (e.g., 123) or an array of document IDs (e.g., [123, 456]). For select fields, pass the option's label (the display text from get_custom_field / list_custom_fields); the server translates it to the encoding Paperless expects."
      +      }
      +    },
      +    "required": [
      +      "field",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Must be true when method is 'delete' to confirm destructive operation",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / merge
      Added value: +{
      +  "description": "For set_permissions: true adds to existing permissions and keeps the current owner; false (default) replaces the listed users/groups",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / method / enum
      Previous value: -[
      -  "set_correspondent",
      -  "set_document_type",
      -  "set_storage_path",
      -  "add_tag",
      -  "remove_tag",
      -  "modify_tags",
      -  "delete",
      -  "reprocess",
      -  "set_permissions",
      -  "merge",
      -  "split",
      -  "rotate",
      -  "delete_pages"
      -]New value: +[
      +  "set_correspondent",
      +  "set_document_type",
      +  "set_storage_path",
      +  "add_tag",
      +  "remove_tag",
      +  "modify_tags",
      +  "modify_custom_fields",
      +  "delete",
      +  "reprocess",
      +  "set_permissions",
      +  "merge",
      +  "split",
      +  "rotate",
      +  "delete_pages"
      +]
    • addedInput schema / properties / owner
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "For set_permissions: new owner user ID, or null to remove the owner. Unless merge is true, omitting owner also clears the current owner."
      +}
    • removedInput schema / properties / permissions
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "merge": {
      -      "type": "boolean"
      -    },
      -    "owner": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "set_permissions": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "change": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "groups": {
      -              "items": {
      -                "type": "number"
      -              },
      -              "type": "array"
      -            },
      -            "users": {
      -              "items": {
      -                "type": "number"
      -              },
      -              "type": "array"
      -            }
      -          },
      -          "required": [
      -            "users",
      -            "groups"
      -          ],
      -          "type": "object"
      -        },
      -        "view": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "groups": {
      -              "items": {
      -                "type": "number"
      -              },
      -              "type": "array"
      -            },
      -            "users": {
      -              "items": {
      -                "type": "number"
      -              },
      -              "type": "array"
      -            }
      -          },
      -          "required": [
      -            "users",
      -            "groups"
      -          ],
      -          "type": "object"
      -        }
      -      },
      -      "required": [
      -        "view",
      -        "change"
      -      ],
      -      "type": "object"
      -    }
      -  },
      -  "type": "object"
      -}
    • addedInput schema / properties / remove_custom_fields
      Added value: +{
      +  "items": {
      +    "type": "number"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / set_permissions
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "For set_permissions: view/change permissions to apply. Omitted actions (view/change) and omitted users/groups lists are left untouched; an empty list [] removes all (unless merge is true). Omit entirely for owner-only changes.",
      +  "properties": {
      +    "change": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "groups": {
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        },
      +        "users": {
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "view": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "groups": {
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        },
      +        "users": {
      +          "items": {
      +            "type": "number"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent, but the description goes further by explaining version-dependent behavior for 'delete' — trash with retention-policy-dependent permanent removal on Paperless-ngx 2.10+, outright permanent deletion on older versions — plus the confirmation requirement. That is materially useful risk context the annotations cannot express. It does not disclose behavior for other mutating methods (merge, split, reprocess, set_permissions) or permission prerequisites, keeping it below a 5.

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?

Two sentences plus a prominently placed warning, with the destructive disclosure front-loaded rather than buried. The parenthetical about retention policy is dense but each clause conveys distinct risk information. No filler or repetition of the title.

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 an 18-parameter, multi-method dispatcher with nested objects and no output schema, the description covers only the delete and tag-lifetime paths. An agent choosing 'set_permissions' or 'split' gets no narrative support beyond the sparse schema, and the relationship between method and its required companion parameters (tag, correspondent, add_tags, etc.) is never stated.

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

Parameters2/5

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

Schema coverage is only 22% across 18 parameters and a 14-value method enum with no per-value documentation, so the description carries the burden. It clarifies only 'delete', 'remove_tag', and 'delete_tag' plus the confirm flag; the other methods and their associated parameters (correspondent, document_type, storage_path, pages, degrees, merge/split behavior, delete_originals) receive no explanation in the description or schema.

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?

Opens with a specific verb and resource: "Perform bulk operations on multiple documents." It also clarifies the semantics of the 'remove_tag' vs 'delete_tag' methods, so an agent can tell that this tool also owns tag-removal semantics that overlap with delete_tag/bulk_edit_tags. It stops short of naming which siblings to prefer (bulk_edit_tags, bulk_edit_correspondents), so it is clear but not fully differentiated.

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

Usage Guidelines3/5

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

It gives real usage conditions for the destructive and tag-mutating methods: remove_tag keeps the tag in the system, delete_tag purges it globally, and delete requires confirmation in all versions. However, there is no guidance on when to use this dispatcher versus the narrower siblings (bulk_edit_tags, bulk_edit_correspondents, bulk_edit_document_types), which is the main routing decision an agent faces. Guidance is implied for the remaining ten-plus methods.

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