Skip to content
Docs menu

Tool reference · Knowledge graph & temporal facts

kg_invalidate_fact

Marks a currently valid fact as no longer true from now on, keeping it in the history.

local stdio server writes destructive
Caution. Marked destructive: it sets valid_to on matching facts and cannot be undone through the tools. The row stays in kg_timeline, but kg_at no longer returns it as current.

When to use

  • Something stopped being true and nothing replaces it, for example a service was removed.
  • A fact was recorded by mistake and should no longer show up in kg_at.

Parameters

NameTypeDefaultDescription
subjectrequired string — —
predicaterequired string — —
objectrequired string — —
reason string "manually_invalidated" —
project string "general" —
at string — ISO 8601 time the fact stopped being true; default now

Example

Arguments

{
  "subject": "my-api",
  "predicate": "uses_cache",
  "object": "memcached",
  "reason": "cache layer removed",
  "project": "my-api"
}

Result shape

{
  "closed": 1
}

closed is the number of open assertions that matched. 0 means nothing matched in that project.

Values are illustrative; the keys follow the server's handler. MCP clients receive the result as JSON text content.

Server description

The description the server sends to your agent in tools/list, captured from the v14.7.0 source:

Close a currently-valid fact assertion. History is retained.

Found a mistake? Open an issue on GitHub.

Search