Skip to main content
Glama
Epistemic Envelope

Epistemic Envelope

by dnanatihor

Epistemic Envelope — Keep certified, observed, and inferred claims apart

License

demo

Why

Data tools mix a rule that passed, a measurement from last year, and a model's guess in one paragraph. Agents then repeat the guess as if someone certified it. This library keeps those three kinds of claim in separate layers, for catalog teams that expose data through MCP tools.

Related MCP server: MetaGraph-MCP

Quickstart

uv run python -m examples.catalog_server

That starts the reference catalog server on stdio and waits for an MCP client. EPIENV_INFERENCE=off withholds AI inferences.

How it works

flowchart LR
  Tool[MCP tool] --> Shape[Shape into layers]
  Shape --> Policy[Inference policy]
  Policy --> Text[Deterministic text]

A tool returns catalog facts. The decorator places approved rule results in certified findings, profiler metrics in observations, and model text in AI inferences. Policy can drop the inferences. The rendered text names the layer of every line.

Results / example output

describe_asset for fixture column col_email, from the reference server:

## Certified findings (authoritative)
- [cf-1] Email format rule passed — rule DQ-17, pass, certified by steward_a on 2026-09-20
## Profiling observations (measured; may be stale)
- [po-1] null_pct = 0.02 (observed 2026-09-20, run pr_9)
## AI inferences (unverified; do not present as fact)
- [ai-1] Likely contains personal email addresses — model static/canned, based on [po-1], review: unreviewed
Governance notice: AI-generated content is unverified and not certified.

Design decisions

Roadmap

  • A recorded demo GIF (the image above is a placeholder)

  • An MCP Governance Auditor report for this server

  • A decision on whether the curated layer ships

  • Name and IP clearance

Licence

Code is Apache-2.0. The specification text is CC BY 4.0.

Available Tools

4 tools
describe_assetdescribe_assetB
Read-only

Return quality results, profile, and inferences for one asset.

Inputs: asset_id (required). Returns: Level 2 epistemic envelope, version 0.1. Normative companion to spec/SPEC-ENVEL…

get_asset_profileget_asset_profileC
Read-only

Return profiling observations, and inferences when policy allows them.

Inputs: asset_id (required). Returns: Level 2 epistemic envelope, version 0.1. Normative companion to spec/SPEC-ENVEL…

get_qualityget_qualityB
Read-only

Return certified data-quality findings for one asset.

Inputs: asset_id (required). Returns: Level 2 epistemic envelope, version 0.1. Normative companion to spec/SPEC-ENVEL…

list_assetslist_assetsA
Read-only

List tables and columns in the seed catalog.

Inputs: no named parameters. Returns: Level 2 epistemic envelope, version 0.1. Normative companion to spec/SPEC-ENVEL…

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 4 tools

    Disambiguation2/5

    list_assets is distinct, but get_asset_profile, describe_asset, and get_quality overlap: describe_asset returns profile, quality, and inferences, making the narrower tools seem redundant and boundaries unclear. An agent could reasonably choose describe_asset for most per-asset queries.

    Naming Consistency5/5

    All names use a snake_case verb_noun format: list_assets, get_asset_profile, describe_asset, get_quality. Verb choices vary naturally by action, with no mixed conventions.

    Tool Count4/5

    Four tools is a reasonable, focused count for a read-oriented catalog/quality server. It is slightly thin and includes some redundant coverage, but not too many or too few.

    Completeness3/5

    Core per-asset inspection is covered (list, profile, description, quality), but there is no catalog-level quality listing, search, or lineage/update operation. For a read-only epistemic catalog this is a notable gap, though not a severe failure.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Serves an automatically inferred semantic layer from your warehouse over MCP, enabling AI agents to query with correct business context, joins, and filters.
      224 PyPI
      3
      Functional Source , Version 1.1, ALv2 Future
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables enterprise AI agents to query governed data lineage, PII-aware schema documentation, and semantic metadata from SQL logs via MCP, with role-based access and vector search.
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to query databases correctly by serving governed context over MCP, including canonical metric definitions, relationships, business meaning, and guardrails, so answers come back with resolved definitions, fired filters, freshness, and a trust score instead of guesses.
      3
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to invoke declared API capabilities through a governed MCP surface where each call is risk-tiered — low-risk calls execute immediately, medium-risk writes queue for human approval, and high-risk actions are withheld from the tool list entirely. Every call, decision and denial is recorded in an audit trail, and responses carrying third-party text are scanned for prompt-injection signals before an agent can read them.
      2
      MIT