Skip to content

Add probe tools to hal0-admin MCP: gpu_target_version, npu_status, env_report, model_store_probe #237

@thinmintdev

Description

@thinmintdev

What to build

Add four read-only host-introspection tools to the hal0-admin MCP server. These centralise probing logic currently scattered (or absent) and unblock several downstream consumers: Hermes bootstrap env_probe phase, the dashboard's host panel, and future support-bundle exporters.

The tools mirror recipes already documented in docs/internal/hermes-env-probe-recipes-2026-05-23.md. They're explicitly LXC-aware: don't read /lib/firmware/amdnpu/ or modinfo amdxdna (both fail inside our LXC); use lsmod, /dev/accel/accel0, and PCI sysfs instead.

Tools:

  • gpu_target_version() → returns KFD gfx_target_version (e.g., "gfx1151" for Strix Halo).
  • npu_status(){present, device_node, driver_loaded, pci_id}.
  • env_report() → consolidated host snapshot (container type, CPU, RAM, GPU, NPU, network basics).
  • model_store_probe(path){fstype, free_mb, total_mb, writable, is_uma_aware}.

All four classify as "autonomous read" per ADR-0004's MCP gating model.

Acceptance criteria

  • Four tools added to src/hal0/mcp/admin.py and registered in the FastMCP server build.
  • Each tool has a unit test in tests/mcp/test_admin.py verifying schema + happy path.
  • env_report() returns a dataclass with all fields documented in the env-probe recipes doc.
  • LXC-correct: tools don't fail inside our hal0 LXC because of host-only kernel files.
  • gpu_target_version() returns "gfx1151" on the hal0 LXC (Strix Halo).
  • Tools surface in tools/list MCP response.

Blocked by

None — can start immediately.

References

  • docs/internal/hermes-env-probe-recipes-2026-05-23.md
  • docs/internal/hermes-bootstrap-plan-2026-05-23.md §6 (consumer context)
  • ADR-0004 (admin MCP gating model)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.3v0.3 scope

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions