From 1d0197da69cc92a9a9028d49e130aea3dc2b1a38 Mon Sep 17 00:00:00 2001 From: dtoro Date: Wed, 5 Aug 2026 16:07:59 +0200 Subject: [PATCH] =?UTF-8?q?0.25.1=20=E2=80=94=20get=5Fhealth=5Fsummary=20d?= =?UTF-8?q?estroyed=20filter=20+=20create=5Fentity=20footgun=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - get_health_summary: filter out state=destroyed entities (was noise from 20+ destroyed test LXCs, deprecated services, etc.) - create_entity: document the monitoring footgun in the tool description (creating a type=check entity does NOT wire a check_def; the correct path is update_entity_attributes with monitoring + url attributes) --- VERSION | 2 +- internal/mcp/tools.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 94a5fe4..5d60147 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.25.0 \ No newline at end of file +0.25.1 \ No newline at end of file diff --git a/internal/mcp/tools.go b/internal/mcp/tools.go index 2ac0ae6..486938d 100644 --- a/internal/mcp/tools.go +++ b/internal/mcp/tools.go @@ -113,7 +113,7 @@ func allTools(pool *db.Pool, agentID uuid.UUID) []toolReg { query := ` SELECT e.slug, e.type, st.health, st.last_check_at FROM entity_status st JOIN entities e ON e.id = st.entity_id - WHERE e.type <> 'check'` + WHERE e.type <> 'check' AND e.state <> 'destroyed'` if healthStr != "" { query += ` AND st.health = ANY(string_to_array($1, ','))` return queryRows(ctx, pool, query, healthStr), nil @@ -205,7 +205,7 @@ func allTools(pool *db.Pool, agentID uuid.UUID) []toolReg { return upsertKnowledge(ctx, pool, args) }}, - {tool: &mcp.Tool{Name: "create_entity", Description: "Create a new entity in the knowledge graph — the creation half alongside update_entity_attributes (which only updates EXISTING entities). Use it when a task needs an entity that does not exist yet: a new check (check:::), an ingress (ingress:), a cert (cert:), a service, a host/LXC/VM, etc. After inserting, it derives default checks from the entity type's monitoring spec (same as a seed ingest), so creating a checkable entity wires its monitoring in one call. Does NOT require approval (this updates the knowledge graph, not the live infrastructure). If the slug already exists it returns 'already exists' — then use update_entity_attributes to change it.", + {tool: &mcp.Tool{Name: "create_entity", Description: "Create a new entity in the knowledge graph. Use it when a task needs an entity that does not exist yet: a service, a host/LXC/VM, an ingress, a cert, etc. After inserting, it derives default checks from the entity type's monitoring spec, so creating a checkable entity wires its monitoring in one call. Does NOT require approval. If the slug already exists it returns 'already exists' — then use update_entity_attributes to change it. FOOTGUN: creating a type=check entity creates a bare entity row but does NOT wire a check_def — the scheduler will never probe it. To add monitoring, set `monitoring: [\"http\"]` + `url` on the target via update_entity_attributes.", InputSchema: objSchema( prop{"type", "string", "Entity type — must already exist in the ontology and not be abstract (e.g. service, lxc, host, vm, check, ingress, cert, dns)."}, prop{"name", "string", "Human-readable name (e.g. 'HAOS http service check')."},