Skip to main content
Glama
washyu
by washyu

purge_devices

DestructiveIdempotent

Filter and bulk-remove inventory devices by hostname, status, IP range, or inactivity duration. Preview with dry-run before actual deletion.

Instructions

Bulk-delete sitemap rows by filter. Single mutually-exclusive filter per call selected by filter_type. Supported filter_types: 'hostname' (exact-match string, no glob/LIKE), 'last_seen_older_than_days' (integer N — rows where last_seen < now - N days, exclusive boundary; N=0 matches all rows older than this instant), 'status' (exact match string like 'error' or 'success'), 'ip_range' (CIDR string like '192.168.1.0/24' or '2001:db8::/32' — rows whose connection_ip is not a valid IP are silently skipped). Composite/ANDed filters are NOT supported (use two calls). Pass dry_run=true to preview the candidate set without deleting. Zero-match returns success with purged_count=0, never an error. Note: filter_type='status', value='error' covers ONLY status='error' rows; use purge_failed_discoveries for the broader failed-discovery filter (includes zombie hostnames). Use remove_device for inventory-only deletion of one row; use purge_devices for bulk filter-based inventory deletion; use decommission_device when host-side cleanup (stop services, remove from clusters) is required before deletion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filter_typeYesFilter to apply (exactly one per call). See tool description for per-filter value-shape examples.
valueYesFilter value. Shape varies by filter_type: hostname/status -> string, last_seen_older_than_days -> integer, ip_range -> CIDR string.
dry_runNoIf true, return candidates without deleting (default: false).
Behavior5/5

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

Annotations already indicate destructive and non-read-only behavior. Description adds critical details: dry_run preview, zero-match behavior returning success with purged_count=0, and silent skipping of invalid IPs for ip_range. No contradictions with annotations.

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?

Description is well-structured, starting with purpose and then detailing filter constraints, edge cases, and sibling comparisons. While slightly verbose, every sentence contributes meaningful information. Could be marginally tighter but earns a 4 for clarity and use of white 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?

Given no output schema, the description explains return behavior (dry_run preview, zero-match success). It covers all parameters, filter shapes, boundary conditions, and alternative tools. For a complex multi-filter delete tool, it is comprehensively complete.

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

Parameters5/5

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

Schema coverage is 100%, but description adds significant value beyond schema: explains exact-match requirements for hostname, exclusive boundary for last_seen_older_than_days, CIDR format for ip_range, and the effect of dry_run. Provides concrete examples, making the meaning of each filter_type clear.

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?

Description clearly states 'Bulk-delete sitemap rows by filter' with specific verb and resource. It distinguishes itself from siblings like remove_device, decommission_device, and purge_failed_discoveries by explicitly contrasting their use cases.

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?

Provides explicit guidance on when to use this tool versus alternatives, including direct references to remove_device, decommission_device, and purge_failed_discoveries. Also clarifies that composite filters are not supported and suggests making two separate calls.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/washyu/homelab_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server