Skip to main content
Glama
LiLara-AI

ShadowGraph

Official

shadowgraph_record_fact

Record an observed fact under a project and key with claimed provenance and optional expiry; supersedes the prior active fact as history while verification remains outside caller control.

Instructions

Record one observed fact as a project and key, with a claimed provenance class and optional validity window. Use for the fact keys reopenWhen rules name; shadowgraph_remember stores durable memory that is not an observation. Supersedes the previous active fact, keeping it as history. No input can make a fact verified. Each call commits a revision.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesFact name, unique per project among active facts. Required and non-empty. Use the same key that a decision’s reopenWhen rules refer to.
actorNoWho performed this write, such as an agent or person name. Stored for audit; never used to grant trust.
valueNoAny lossless JSON value: string, finite number, boolean, null, array, or object.
clientNoWhich client software performed this write, such as the host application name.
sourceNoLegacy alias for sourceClass. An unknown label downgrades to agent_claimed with the raw label kept in sourceRaw.
projectNoProject namespace. Defaults to "default"; an empty string is rejected.
expiresAtNoISO 8601 instant after which shadowgraph_maintain expires this fact. Combined with validTo, the earlier boundary wins.
sessionIdNoCaller-owned identifier that groups related writes in the audit trail.
confidenceNoHow much the caller trusts this observation, 0-1. Defaults to 0.5. It does not verify anything.
sourceClassNoClaimed origin, never proof: agent_claimed (the default), tool_observed, human_confirmed, or production_verified. It weights confidence only. An unrecognised label downgrades to agent_claimed, kept verbatim in sourceRaw.
idempotencyKeyNoRetry key scoped by project and operation: reuse it so a retry returns the first result instead of writing a duplicate. Without it every call creates a new entity.
verificationStatusNoOnly "contradicted" may be set by a caller, because it lowers trust. "verified" and "expired" are rejected: verification is not self-assertable and expiry is owned by shadowgraph_maintain.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoStable entity identifier.
keyYesFact name, unique per project among active facts.
kindNoEntity kind: decision, attempt, memory, fact, relation, review, or alternative.
actorNoWho performed the write.
valueNoThe observed value, any lossless JSON value.
clientNoWhich client performed the write.
sourceNoLegacy alias of sourceClass, retained for compatibility.
statusNoactive, superseded, or expired.
projectNoProject namespace; records imported from a schema that predates projects may carry null.
temporalNoBi-temporal window: validFrom, validTo, recordedAt, invalidatedAt.
createdAtNoISO 8601 creation time.
expiresAtNoCaller-declared expiry instant, or null.
sessionIdNoSession identifier recorded with the write.
sourceRawNoThe original origin label when it differed from sourceClass. Audit only; never evidence.
updatedAtNoISO 8601 time of the last change.
confidenceNoCaller-declared confidence in the observation, 0-1.
observedAtNoISO 8601 time the fact was observed.
sourceClassNoClaimed origin class recorded with the write. A claim, never proof.
verificationNoPresent only on a signed verification: the attestation this build checked.
schemaVersionNoStorage schema version this entity was written under. A value above the build’s own version is preserved rather than downgraded.
validityPolicyNoDeclared expiry inputs and the effective expiration boundary derived from them.
verificationStatusNounverified, contradicted, expired, or verified. Only the separately configured signed-evidence verifier can produce verified.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed12 schema fields changedv0.40.1
    • changedInput schema / properties / actor / description
      Previous value: -"Who performed this write, e.g. an agent name."New value: +"Who performed this write, such as an agent or person name. Stored for audit; never used to grant trust."
    • changedInput schema / properties / client / description
      Previous value: -"Which client performed this write."New value: +"Which client software performed this write, such as the host application name."
    • addedInput schema / properties / confidence / description
      Added value: +"How much the caller trusts this observation, 0-1. Defaults to 0.5. It does not verify anything."
    • addedInput schema / properties / expiresAt / description
      Added value: +"ISO 8601 instant after which shadowgraph_maintain expires this fact. Combined with validTo, the earlier boundary wins."
    • changedInput schema / properties / idempotencyKey / description
      Previous value: -"Retry key scoped by project and operation; reuse only for the same logical write."New value: +"Retry key scoped by project and operation: reuse it so a retry returns the first result instead of writing a duplicate. Without it every call creates a new entity."
    • addedInput schema / properties / key / description
      Added value: +"Fact name, unique per project among active facts. Required and non-empty. Use the same key that a decision’s reopenWhen rules refer to."
    • addedInput schema / properties / project / description
      Added value: +"Project namespace. Defaults to \"default\"; an empty string is rejected."
    • changedInput schema / properties / sessionId / description
      Previous value: -"Session identifier for this write."New value: +"Caller-owned identifier that groups related writes in the audit trail."
    • changedInput schema / properties / source / description
      Previous value: -"Legacy alias for sourceClass. Unknown labels downgrade to agent_claimed with the raw label kept in sourceRaw."New value: +"Legacy alias for sourceClass. An unknown label downgrades to agent_claimed with the raw label kept in sourceRaw."
    • changedInput schema / properties / sourceClass / description
      Previous value: -"Claimed origin class. A claim, not proof: no value here can make a fact verified."New value: +"Claimed origin, never proof: agent_claimed (the default), tool_observed, human_confirmed, or production_verified. It weights confidence only. An unrecognised label downgrades to agent_claimed, kept verbatim in sourceRaw."
    • changedInput schema / properties / verificationStatus / description
      Previous value: -"Only `contradicted` may be set by a caller; `verified` and `expired` are rejected."New value: +"Only \"contradicted\" may be set by a caller, because it lowers trust. \"verified\" and \"expired\" are rejected: verification is not self-assertable and expiry is owned by shadowgraph_maintain."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "A stored fact with its provenance claim and validity window.",
      +  "properties": {
      +    "actor": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Who performed the write."
      +    },
      +    "client": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Which client performed the write."
      +    },
      +    "confidence": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Caller-declared confidence in the observation, 0-1."
      +    },
      +    "createdAt": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "ISO 8601 creation time."
      +    },
      +    "expiresAt": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Caller-declared expiry instant, or null."
      +    },
      +    "id": {
      +      "description": "Stable entity identifier.",
      +      "type": "string"
      +    },
      +    "key": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Fact name, unique per project among active facts."
      +    },
      +    "kind": {
      +      "description": "Entity kind: decision, attempt, memory, fact, relation, review, or alternative.",
      +      "type": "string"
      +    },
      +    "observedAt": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "ISO 8601 time the fact was observed."
      +    },
      +    "project": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Project namespace; records imported from a schema that predates projects may carry null."
      +    },
      +    "schemaVersion": {
      +      "description": "Storage schema version this entity was written under. A value above the build’s own version is preserved rather than downgraded.",
      +      "type": "integer"
      +    },
      +    "sessionId": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Session identifier recorded with the write."
      +    },
      +    "source": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Legacy alias of sourceClass, retained for compatibility."
      +    },
      +    "sourceClass": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Claimed origin class recorded with the write. A claim, never proof."
      +    },
      +    "sourceRaw": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "The original origin label when it differed from sourceClass. Audit only; never evidence."
      +    },
      +    "status": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "active, superseded, or expired."
      +    },
      +    "temporal": {
      +      "description": "Bi-temporal window: validFrom, validTo, recordedAt, invalidatedAt.",
      +      "type": "object"
      +    },
      +    "updatedAt": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "ISO 8601 time of the last change."
      +    },
      +    "validityPolicy": {
      +      "description": "Declared expiry inputs and the effective expiration boundary derived from them.",
      +      "type": "object"
      +    },
      +    "value": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        },
      +        {
      +          "type": "array"
      +        },
      +        {
      +          "type": "object"
      +        }
      +      ],
      +      "description": "The observed value, any lossless JSON value."
      +    },
      +    "verification": {
      +      "description": "Present only on a signed verification: the attestation this build checked.",
      +      "type": "object"
      +    },
      +    "verificationStatus": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "unverified, contradicted, expired, or verified. Only the separately configured signed-evidence verifier can produce verified."
      +    }
      +  },
      +  "required": [
      +    "key"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.40.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that a call supersedes the previous active fact while retaining history, that verification cannot be self-asserted, and that each call commits a revision. These are meaningful behavioral traits needed for safe invocation and are not redundant with readOnlyHint/idempotentHint/destructiveHint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, each earning its place: the core operation is front-loaded, followed by usage routing and key behavioral caveats. There is no filler or duplicated schema content.

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?

Given the rich 100%-covered input schema and existing output schema, the description covers what an agent needs for selection and invocation: what a fact is, when to use it, how it replaces prior facts, and the verification limitation. Remaining details live in the schema where they belong.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents all 12 parameters. The description adds high-level framing ('claimed provenance class', 'optional validity window') but no detail beyond what the schema's sourceClass and expiresAt descriptions already provide, so the baseline applies.

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 states a specific action ('Record one observed fact') with resource scope ('as a project and key') and distinguishes itself from shadowgraph_remember by defining the fact-key use case that triggers reopenWhen rules. This lets an agent select it correctly among the many record_* siblings.

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?

It explicitly says when to use the tool ('Use for the fact keys reopenWhen rules name') and points to the alternative for non-observations ('shadowgraph_remember stores durable memory that is not an observation'). This is direct when/when-not guidance rather than leaving selection to inference.

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

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/LiLara-AI/shadowgraph'

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