Skip to main content
Glama

bulk_operations

Destructive

Applies many writes to one collection in a single call by combining creates, updates and deletes in order. Use it instead of repeated single-item calls when row counts are high, with optional schema validation.

Instructions

Applies many writes to one collection in a single call: creates, updates and deletes together. Prefer it to repeated create_item or update_item calls when the row count is high; use import_data for a CSV or JSON file and delete_items when deleting by query rather than by id. Not a transaction: the phases run in order (create, update, delete) and a failure partway leaves earlier writes committed, so the result reports what succeeded per phase. validate: true checks the payload against the collection schema before anything is written. This tool writes data and has nothing to do with analyze_relationships, which only inspects the data model.

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": {
      "collection": "<collection>",
      "operations": "<operations>"
    },
    "name": "bulk_operations"
  }
}

Input Schema

NameRequiredDescriptionDefault
validateNoValidate operations before execution
collectionYesCollection name
operationsYesThe writes to apply, grouped by phase. Phases run in order: create, then update, then delete. Omit a phase to skip it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv12.6.1
    • addedInput schema / properties / operations / description
      Added value: +"The writes to apply, grouped by phase. Phases run in order: create, then update, then delete. Omit a phase to skip it."
  2. First observedv12.3.3

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description adds what they cannot: this is not a transaction, phases run create-then-update-then-delete, and a mid-way failure leaves earlier writes committed with per-phase reporting. The validate:true pre-check semantics are also disclosed, which is real operational context.

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

Conciseness5/5

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

Four sentences, front-loaded with purpose, then alternatives, then the critical non-transactional caveat, then validate semantics. The final disambiguation sentence against analyze_relationships is slightly defensive but still earns its place by preventing a plausible mis-route.

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 destructive, nested-object write tool with no output schema, the description covers the things an agent must know: partial-failure behavior, phase order, and what the result reports. Nothing material is missing given the schema's full parameter documentation.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning: validate:true 'checks the payload against the collection schema before anything is written' tells the agent when and why to set it, beyond the schema's terse 'Validate operations before execution'. The phase-ordering and 'omit a phase to skip it' behavior is reinforced in the description rather than newly introduced.

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?

The first sentence states a specific verb and scope: 'Applies many writes to one collection in a single call: creates, updates and deletes together.' It explicitly separates the tool from create_item, update_item, import_data, and delete_items, so an agent can route correctly without opening any schema.

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?

It names each alternative and the condition that selects it: use this over repeated create_item/update_item when row count is high, use import_data for CSV/JSON files, use delete_items for query-based deletes. It also explicitly excludes analyze_relationships as unrelated, leaving no inference to the agent.

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