Skip to main content
Glama
vmware-skills

VMware-Monitor

get_vm_backup_snapshot_history

Read-onlyIdempotent

Read vCenter task history to measure how long a VM backup kept its snapshot open, returning cycle stats, unmatched creations, and window coverage.

Instructions

[READ] How long backups held a snapshot open on one VM, from task history.

Image-level backup products (Veeam, Commvault, Rubrik, NetBackup) snapshot the VM, copy the frozen disks, then delete the snapshot. vCenter records both ends, so the backup window is recoverable without credentials for the backup server.

This is a LOWER BOUND on the job, not its duration: work the product does before the snapshot is taken and after it is removed is invisible to vCenter. The returned basis says so — quote it alongside any figure.

Returns a rollup, not the list envelope: counts, four hour statistics (backup_active / snapshot_present / total_window / snapshot_removal), latest_cycle, longest_cycle, and unmatched rows for creations with no removal (a backup that left its snapshot behind) or removals whose creation predates the window.

Read two fields before reporting all-clear. history_unavailable non-null means the history could not be read at all — that is not "no backups". coverage_note non-null means vCenter has already expired part of the requested window (task.maxAge — 30 days by default; the option is NOT called vpxd.task.maxAge, which raises vim.fault.InvalidName), so the counts describe a shorter period than days asked for. window_fully_covered is the positive form: True when retention is at least days and nothing in the window can have expired, so a VM whose oldest task is recent was simply quiet; None when retention or the history could not be read.

An unmatched creation is not a failed backup. Each one carries status: "open", age_hours, this VM's longest_completed_cycle_hours and possibly_in_progress — True while it is inside that VM's own observed envelope, False past it, None when there is no completed cycle to compare against. Do not report incomplete_cycles as failures without reading those.

The creation task itself, during the seconds it executes, is absent entirely: no completion time yet, so it forms neither a cycle nor an unmatched row. A backup whose snapshot already exists is not this case — that is the open cycle described above. So no open cycle does not prove no backup is running.

Duplicate VM names raise rather than resolve to one, because a duration attributed to the wrong same-named VM looks exactly like a correct answer. For snapshots that exist right now use list_vm_snapshots or find_aging_snapshots.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoHow far back to look, 1 to 365 (default 30).
limitNoMax cycle rows when include_cycles is set (capped at 200).
targetNovCenter/ESXi target from config (default if omitted).
vm_nameYesExact VM name; duplicates are refused, not guessed.
include_cyclesNoAlso return the individual cycles, newest kept on cap.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), but the description adds far more: it is a lower bound, not a duration; duplicate VM names raise rather than resolve; the in-flight creation task is invisible; and it flags history_unavailable / coverage_note / window_fully_covered as fields an agent must read before reporting an all-clear. This is unusually rich disclosure beyond structured fields.

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 one-line purpose before any caveats, and virtually every sentence carries a real misinterpretation hazard (unmatched rows, open cycles, duplicate names). It is still very long and dense for a single read tool, and a few clauses could be trimmed without losing guidance.

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?

There is no output schema, so the description carries the full burden of describing the return shape — and it does: rollup vs list envelope, the four hour statistics, latest/longest cycle, unmatched rows, and the three sentinel fields. Nothing an agent needs to interpret the result correctly is missing.

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 the schema does not: it explains that the returned counts can describe a shorter period than the 'days' argument asked for due to task.maxAge retention, tying the days parameter to an expiry semantic. It also ties limit to include_cycles, though that is largely already in the schema.

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, resource and unit ('how long backups held a snapshot open on one VM, from task history'), and the description later names the sibling tools it is not (list_vm_snapshots, find_aging_snapshots). An agent can distinguish it from every other VM/snapshot tool without opening a 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 gives explicit routing: 'For snapshots that exist right now use list_vm_snapshots or find_aging_snapshots,' and frames the tool's niche (recovering the backup window from vCenter task history without backup-server credentials). When-to-use is stated positively and negatively.

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