Skip to main content
Glama

list_drift_events

Retrieve change events from the latest snapshot to identify drift from compliance baselines in VMware vSphere.

Instructions

[READ] Latest snapshot's change events.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual tool implementation: queries the latest snapshot's change events from the Twin store and returns a list of drift events (node_id, field, old_value, new_value, detected_at).
    @vmware_tool(risk_level="low")
    def list_drift_events(limit: int = 50) -> list[dict]:
        """[READ] Latest snapshot's change events."""
        from vmware_harden.store.twin import Twin
    
        twin = Twin(_resolve_db())
        try:
            latest = twin.conn.execute(
                "SELECT id FROM snapshots ORDER BY scan_started_at DESC LIMIT 1"
            ).fetchone()
            if not latest:
                return []
            rows = twin.conn.execute(
                "SELECT node_id, field, old_value, new_value, detected_at "
                "FROM change_event WHERE snapshot_id = ? "
                "ORDER BY node_id, field LIMIT ?",
                [latest[0], limit],
            ).fetchall()
            return [
                {
                    "node_id": r[0],
                    "field": r[1],
                    "old_value": r[2],
                    "new_value": r[3],
                    "detected_at": str(r[4]) if r[4] else None,
                }
                for r in rows
            ]
        finally:
            twin.close()
  • Registers the tool as 'list_drift_events' on the FastMCP server, wiring it to the implementation via server.tool() decorator.
    @server.tool(name="list_drift_events")
    def _list_drift_events_impl(limit: int = 50) -> list[dict]:
        """[READ] Latest snapshot's change events."""
        return t.list_drift_events(limit)
  • Helper function _resolve_db() used by the handler to locate the DuckDB database path.
    def _resolve_db() -> Path:
        """Return the configured DB path, defaulting to user dir."""
        return _DB_PATH or Path(os.path.expanduser("~/.vmware-harden/twin.duckdb"))
Behavior2/5

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

Tags itself as [READ], indicating safe operation, but lacks details on behavior like ordering, pagination, or whether it returns all events or a subset. Annotations absent, so description carries burden but only provides minimal info.

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?

Single sentence, very concise. Front-loaded with key information, but could benefit from slightly more detail without losing efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lacks details on output, pagination, or scoping beyond 'latest snapshot'. Even with output schema present, description does not provide enough context for an agent to use it effectively without assumptions.

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

Parameters1/5

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

Only parameter 'limit' has no description in schema, and the tool description does not explain its purpose or effect. Schema coverage is 0%, and description adds no value.

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 it lists change events from the latest snapshot, distinguishing it from siblings like list_baselines and list_violations. Verb 'list' is implied by name and resource is specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. No exclusions or context provided beyond the description.

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/zw008/VMware-Harden'

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