Skip to main content
Glama

obj_batch_delete

Deletes matching objects across multiple scopes, types, and filters in one batch call, reducing repeated single-delete operations to one IPC round-trip.

Instructions

Delete matching objects across many scope/type/filter operations.

PREFER THIS over looping obj_delete. Each op is evaluated in one go, cleaning a mixed set of stale junctions, no-ERCs, and net labels costs one IPC round-trip instead of N.

Args: operations: List of delete dicts, each with: - scope: "active_doc" (default), "project", or "doc:<absolute_path>". - object_type: Altium type name (e.g. "eJunction", "eNoERC", "eWire", or a PCB type such as "eTrackObject", which deletes from the active board and takes only scope "active_doc"). - filter: pipe-separated PropName=Value filter conditions (AND logic), same format as obj_delete. An EMPTY filter deletes every object of that type in that scope. confirm_delete_all: required when any operation has an empty filter. Same guard obj_delete applies to the single call, so routing a sweep through the bulk tool does not get around it.

Example, purge all no-ERCs on a specific sheet and every junction on the project. Both filters are empty, so the confirmation is required: obj_batch_delete(confirm_delete_all=True, operations=[ {"scope": "doc:C:\proj\Power.SchDoc", "object_type": "eNoERC", "filter": ""}, {"scope": "project", "object_type": "eJunction", "filter": ""}, ])

Returns: Dict with operations_processed, total, total_deleted and results: one row per operation with its deleted count and a note saying why it deleted nothing (unknown_object_type, scope_not_supported, no_objects_matched, or failed: CODE). Or an error with operations_processed 0 when a sweep is unconfirmed, in which case nothing is sent.

Input Schema

NameRequiredDescriptionDefault
operationsYes
confirm_delete_allNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are present, so the description carries the full load — and it does disclose the critical traits: empty filter deletes every object of that type, confirmation is mandatory for sweeps, an unconfirmed sweep sends nothing and returns `operations_processed` 0, and PCB types are limited to scope 'active_doc'. However, opening sentence says 'cleaning a mixed set of stale junctions' which is fine, but there is nothing about permissions/preconditions, atomicity/partial-failure semantics beyond per-op notes, or whether deletion is undoable. Adding a sentence on partial failure vs. all-or-nothing would bring this up. Score 3 because the key destructive safeguards are stated but operation-level transaction behavior is not.

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 purpose and sibling routing are front-loaded, and the args/example/returns sections are dense rather than padded. The Returns block partially duplicates the output schema, which is the one place that does not fully earn its space.

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 bulk tool with zero annotations and a 0%-covered schema, everything an agent needs is present: the scope vocabulary, type names, filter syntax, the destructive empty-filter case, the confirmation requirement, the example, and the failure responses including the reason codes in `results[].note`. Nothing material is missing for a correct call.

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 0% and the schema itself is nearly opaque (an array of string-valued objects with no declared keys), so the description does the real specification work: it enumerates `scope` values, gives concrete `object_type` names including a PCB-type restriction, explains the pipe-separated AND filter format, the empty-filter semantics, and the `confirm_delete_all` trigger condition. It also includes a worked example. The residual gap is the complete absence of schema-level typing or validation hints, so an agent still relies entirely on prose for shape correctness. Score 3 reflects strong prose compensation but continuing dependence on unstructured text for a fully undocumented parameter tree.

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 opening line states a specific verb and resource ('Delete matching objects') plus the dimensions it operates across (scope/type/filter). It immediately distinguishes itself from the sibling `obj_delete` by positioning itself as the bulk counterpart, so an agent can route correctly 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 Guidelines5/5

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

It explicitly names the alternative ('PREFER THIS over looping `obj_delete`') and gives the selection condition: mixed multi-object sets cost one IPC round-trip instead of N. It also notes the `confirm_delete_all` guard is the same one the single-call tool applies, so the bulk route is not a bypass — a genuine when-to-use/when-not signal.

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