Skip to main content
Glama

get_datastore_vm_usage

Read-onlyIdempotent

Identify which VMs consume space on a datastore, ranked largest first, to determine if it is filling up and who is using the space.

Instructions

[READ] Which VMs take the space on one datastore, largest first.

Use this for "is this datastore filling up, and who is using it?". datastore_name comes from list_all_datastores. Reads vCenter's own per-VM accounting (storage.perDatastoreUsage), so it is space on disk, not the provisioned VMDK sizes browse_datastore shows.

Returns {datastore: {name, type, total_gb, used_gb, free_gb, usage_pct}, items, returned, total, truncated, attributed_gb, unattributed_gb, unmeasured_vms, note}. Each item: name, vm_id, template, committed_gb (on disk), uncommitted_gb (thin headroom it may still grow into), unshared_gb, measured_at. unattributed_gb is used space no VM accounts for: unregistered VMs, orphaned disks, ISOs; find those files with browse_datastore. unmeasured_vms list the datastore but have no usage row, so their space is unknown, not zero.

Input Schema

NameRequiredDescriptionDefault
top_nNoHow many VMs to return, largest committed first (default 10).
targetNoOptional vCenter/ESXi target name from config.
datastore_nameYesDatastore name exactly as shown in vCenter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.5.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, but the description adds substantial behavioral context: it reads vCenter's storage.perDatastoreUsage, reports on-disk space rather than provisioned size, and explains unattributed_gb and unmeasured_vms. This is exactly the kind of semantic detail an agent needs to interpret results correctly.

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?

The description is front-loaded with the core question and then structured into usage, data-source distinction, return shape, and caveats. Despite its length, every section adds operational value for a tool with a rich return payload and no output schema.

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, but the description fully documents the return object, item fields, truncation behavior, and the meaning of unattributed_gb and unmeasured_vms. Combined with annotations covering safety, an agent has everything needed to call and interpret this tool.

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 schema already documents all three parameters. The description adds useful provenance for datastore_name by pointing to list_all_datastores, and its 'largest first' wording reinforces top_n behavior, though it does not add much beyond the schema for target or top_n.

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 description states a specific query: which VMs consume space on one datastore, ordered largest first. It explicitly distinguishes this from browse_datastore by noting that it reads vCenter per-VM accounting rather than provisioned VMDK sizes, so an agent can select it confidently.

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 a clear use case ('is this datastore filling up, and who is using it?') and names the alternative browse_datastore for provisioned VMDK sizes. It also tells the agent where datastore_name comes from (list_all_datastores), removing ambiguity about the required parameter.

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