Skip to main content
Glama
vmware-skills

VMware-Monitor

scan_host_logs

Read-onlyIdempotent

Scan ESXi hostd, vmkernel, and vpxa logs for error, fail, and critical patterns. Read recent syslog lines when vCenter events show a host issue but not its cause.

Instructions

[READ] Scan recent ESXi host syslog lines for error/warning patterns.

Reads the last lines entries of the hostd/vmkernel/vpxa logs via the diagnostic system and returns only the lines matching known trouble patterns (error, fail, critical, panic, lost access, timeout, …). Severity follows the level ESXi wrote on the line (Cr/Er/Wa/In…, raw token in log_level); a critical keyword still wins. By default findings are grouped by pattern — each item has count, hosts, first_seen/last_seen (log time), severity, source (host_log:<key>), pattern and one sample; lines_matched is the ungrouped count. group=false returns one row per line (severity, source, message, time, entity, log_level, log_time). Returns the list envelope {items, returned, limit, total, truncated, hint}. total is null on purpose — this is "errors within the scanned window", not all errors ever. logs_unavailable lists every host/log that could NOT be read, with the reason (e.g. the account lacks Global.Diagnostics); empty items means nothing matched only when logs_unavailable is empty too.

Use this when get_events or investigate_host show a host in trouble but not why: vCenter events and ESXi syslog are different sources. Filter with host_name to keep the scan fast on large clusters; a name that matches no host returns an error (get the exact name from list_esxi_hosts), not an empty result. Every call reads the last lines lines afresh.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNoGroup repeated lines by pattern (default true). One call on a lab returned 353 lines, 195 of them one statistics-provider message.
linesNoHow many recent lines per log to scan (default 500, at least 1).
targetNovCenter/ESXi target from config (default if omitted).
host_nameNoFilter to a single host by exact name (None = all hosts).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnly/idempotent/non-destructive), and the description adds substantial context beyond them: grouping behavior and what each mode returns, that total is null by design, that logs_unavailable enumerates unreadable hosts (with the Global.Diagnostics permission example), that empty items is only meaningful when logs_unavailable is empty, and that every call re-reads the last lines afresh. Missing only explicit rate-limit or cost expectations for large lines values.

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?

Effectively front-loaded, with the purpose in sentence one and usage guidance placed after the return-shape detail. It is on the long side with several dense parentheticals (severity tokens, envelope fields), but with no output schema almost all of that text is load-bearing rather than filler.

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?

Absent an output schema, the description fully specifies the return envelope ({items, returned, limit, total, truncated, hint}), the per-mode item shapes, the null-total caveat, and the logs_unavailable contract. Four optional parameters plus a mutation-free read operation are covered adequately; nothing an agent needs to call this 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 baseline is 3, but the description adds real meaning on top: it explains the differing row shapes produced by group=true vs group=false, the default grouping rationale, and the exact-match failure semantics of host_name. It is more than a restatement of the schema descriptions.

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?

Opens with a specific verb+resource+scope ('[READ] Scan recent ESXi host syslog lines for error/warning patterns') and immediately distinguishes itself from siblings by naming get_events and investigate_host as a different data source ('vCenter events and ESXi syslog are different sources'). An agent can route between this and the event tools without opening any 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?

States the trigger condition explicitly ('Use this when get_events or investigate_host show a host in trouble but not why') and names the alternatives. It also gives operational guidance — filter with host_name for speed on large clusters, get exact names from list_esxi_hosts, and warns that a non-matching name errors rather than returning empty.

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