Skip to main content
Glama
lluvr

frame-check-mcp

by lluvr

Frame Check

PyPI Python License Tests

See what any document does not show you.

Frame Check is a deterministic structural framing analysis tool. It names which analytical perspectives a document takes, which it omits, and how it positions the reader, and it cross-checks the document's numeric claims against primary sources a language model can't reach (SEC EDGAR, FRED, World Bank, and others). It makes no LLM call of its own, so the same document always returns the same reading at no model cost.

Quickstart (MCP server)

The PyPI package frame-check-mcp is the Model Context Protocol server. It runs locally and gives any MCP-compatible AI client (Claude Desktop, Cursor, Cline, Continue.dev, etc.) deterministic structural framing analysis as a tool.

pip install frame-check-mcp

Then point your MCP client at the installed entry point. For Claude Desktop, add to claude_desktop_config.json:

{
  "mcpServers": {
    "frame-check": {
      "command": "frame-check-mcp"
    }
  }
}

Restart the client. Then in any conversation: "Can you frame-check this document?" Full install + verification details in docs/MCP_SERVER.md.

Verifying the wheel (sigstore attestation)

Every published wheel ships with a sigstore build-provenance attestation generated inside the GitHub Actions publish workflow via OIDC. Adopters who want to verify the wheel was built from this repository's CI (and not modified between the runner and PyPI) can do so with the gh CLI:

pip download frame-check-mcp --no-deps -d /tmp/fc-verify
gh attestation verify /tmp/fc-verify/frame_check_mcp-*.whl \
  --owner Clarethium

A passing verification proves the wheel artifact's hash matches the one signed by the publish workflow run for the corresponding tag, with the workflow file path and git SHA recorded in the attestation. Verification is optional; security-conscious deployments and packaging mirrors may want it as part of their install pipeline.

Related MCP server: Analysis MCP

What it does

Pass a document and Frame Check returns:

  • A structural framing profile: which of five analytical perspectives (causes, risks, stakeholders, trends, uncertainty) the document covers, which it omits, and the density of each.

  • Voice and epistemic posture: how the document positions the reader, and what share of claims are attributed to sources.

  • Temporal orientation: whether the document grounds its conclusions in historical data, present state, or projections.

  • Frame Vocabulary Standard candidate matches: named frame patterns whose rule-based signals fire on the text, each with identification cues and worked examples. Matches are candidate-level signals, not verified labels.

  • Source-network verification: numeric claims checked against SEC EDGAR, FRED, World Bank, REST Countries, Alpha Vantage, and Wolfram Alpha where those providers have coverage.

  • An optional AI narrative interpreting framing at prose level. Labelled distinctly so readers do not conflate language-model interpretation with deterministic measurement.

Approach

Structural measurement is the floor. Every framing claim the tool makes is computed from deterministic pattern matchers and always returns the same result for the same input. AI-assisted interpretation is available as enrichment where an API key is configured, but is labelled as such and never hidden behind the structural layer.

Verification is bounded. The tool only verifies numeric claims against providers with genuine coverage for the claim type, and it surfaces its own calibration results (precision, recall, F1 per provider) rather than asserting verdicts without evidence.

Named-pattern detection is a separate, beta layer from the structural profile. It surfaces candidate matches, under-detection markers, density caveats, and confidence states rather than confident labels, so you can see where the tool is unsure instead of trusting an overconfident verdict.

Calibration figures, honest limits, and the methodology behind them live in the methodology at frame.clarethium.com/corpus/methodology.

Why this and not just an LLM

An MCP-compatible AI client can already analyse a document by prompting an LLM. Frame Check earns its install footprint where the LLM falls short:

  • Determinism. The structural layer returns the same numbers for the same input across runs, deploys, and model versions. An LLM asked "what frames does this document use" gives a different answer each time and a different answer per model. Reproducible analysis needs the deterministic shape; opinions can layer on top.

  • Zero per-query cost. Frame Check's MCP server makes no LLM call server-side. The caller's agent does the prose interpretation if the user wants that. This means a frame-check on a 10,000-word document costs the user $0.00, not the $0.05 to $0.50 an LLM call would charge.

  • Explicit absence. The frame-divergence block names what the document does not address by comparing matched frames against the Frame Vocabulary Standard catalog. An LLM asked "what's missing" hallucinates plausible-sounding gaps; Frame Check enumerates catalog entries that did not fire on the text and says so.

  • Calibrated detection. The named-pattern layer is labelled beta in the API responses (engine_status: beta) and surfaces under-detection markers rather than confident labels. You get an honest "this is uncertain" instead of a confident guess.

  • Source verification. Numeric claims with provider coverage get cross-checked against SEC EDGAR / FRED / World Bank / REST Countries / Alpha Vantage / Wolfram Alpha at provider pricing tiers (zero or user-keyed). An LLM asked "is this number right" cannot fetch primary sources; Frame Check does.

Deterministic, source-grounded measurement is not work an LLM is suited to do. Frame Check provides that layer so the LLM can lean on it instead of being asked to do that work in-band.

Worked example

Same prompt, four frontier LLMs, four materially different framing signatures. data/worked_examples/four-llms-on-bitcoin-retirement-2026.md runs Claude Haiku 4.5, GPT-5, Grok 4.1 Fast Reasoning, and Gemini 2.5 Flash against an investment question and surfaces the per-model structural shape: voice, coverage, frame matches, sourcing rate. The point in plain form: your AI is one framing choice among several, not the framing.

Five more published examples live alongside it: framings of an LLM response to a life-decision prompt, an AI-company founder essay, an FOMC monetary-policy statement, and a Source-Network verification pass on an LLM-summarised earnings release, plus a divergence walk-through on Claude's Bitcoin retirement recommendation. See data/worked_examples/ for the full set.

Documentation

Browse docs/README.md for reading paths organised by intent (install + use, understand frame divergence, read the worked examples). The full inventory:

  • docs/MCP_SERVER.md: MCP server reference (tools, resources, prompts)

  • docs/COOKBOOK.md: five recipes for common adopter tasks (frame-check before agent commit, divergence at decision points, source-grounded verification, two-LLM comparison, custom FVS rule)

  • docs/FRAME_DIVERGENCE_CONTRACT_v1.md: interface contract for the Frame Divergence emission shape (c1.0)

  • data/frame_library/: 20-entry Frame Vocabulary Standard catalog

  • data/worked_examples/: published worked examples with multi-LLM comparisons + per-document Frame Check analysis (6 entries)

  • The methodology behind the Frame Vocabulary Standard is documented at frame.clarethium.com/corpus/methodology

  • Frame Check introduction (blog): the four analysis layers, with examples of the output

Running tests

pip install -e .[test]
python3 run_tests.py

Or directly via pytest:

python3 -m pytest -q

26 test files under tests/, ~30 seconds end-to-end. Includes 40 adversarial dispatcher test functions in tests/test_mcp_adversarial.py (parametrized into 63 tests at collection time), a per-module 80% coverage gate on the seven wheel-surface modules (scripts/check_per_module_coverage.py), the cookbook-recipe contract suite (tests/test_cookbook_recipes.py), and the genre-classifier + frame-divergence coverage.

License

Apache-2.0 for code; CC-BY-4.0 for the FVS library and worked examples (see NOTICE for the per-directory enumeration).

Citation

If Frame Check is useful in your work, see .github/CITATION.cff for the citable form. Frame Check is authored by Lovro Lucic.

Contributing

Sign-off-by-DCO required per .github/CONTRIBUTING.md. Governance per .github/GOVERNANCE.md (BDFL model with named forcing functions for canon-promotion decisions).

Issues

https://github.com/lluvr/frame-check/issues

Available Tools

2 tools
frame_checkA

Deterministic structural framing analysis. Returns analysis (measurements) + agent_guidance (composition discipline, scope-regime guidance, faithfulness rules) + provenance (versions, license, citation). When source_text is provided, also runs Layer 4 source_fidelity and Layer 11 grounding_decomposition with a Monte-Carlo-verified scope regime. When include_divergence=true (default at 0.8.0), the response carries a top-level divergence block sorted by signal_strength. The agent's role is to compose ONE insight grounded in the cited measurements (a reading the user could not see by reading their own document), not to walk the measurements one by one. The measurements are Frame Check's; the reading is the agent's. Cite measurements as Frame Check's; frame the reading as a reading ('the pattern reads as X'), never as a verdict ('the document is X'). Repeated calls with identical inputs return identical measurements; the agent's insight is a composition over them.

ParametersJSON Schema
NameRequiredDescriptionDefault
document_textYesThe document to analyse. English. 300-10,000 words. Markdown accepted. This is the text whose framing you want named.
source_textNoOptional. The source material the document is supposed to ground in (research report, filing, primary source). Unlocks Layer 4 source_fidelity (digit-level match) and Layer 11 grounding_decomposition (sentence-level G/F/P) with a scope regime telling you which layer to trust on number-dense sources. Without this, only structural framing analysis runs.
prefer_contract_versionNoOptional. Coverage contract version the client prefers. 1 (default): emit both v1 coverage and v2 coverage_v2 (Phase 1 compatibility window). 2: emit only coverage_v2 and omit v1 (for clients that have migrated and want to avoid payload duplication). See MCP_CONTRACT_V2_PROPOSAL.md and MCP_SERVER.md 'Contract versions' section. When Phase 3 activates, v1 will stop emitting regardless of this parameter.
include_divergenceNoOptional. Frame divergence output per FRAME_DIVERGENCE_CONTRACT_v1 Part 2. When true (default at 0.8.0; was opt-in at 0.7.x), the response carries a top-level `divergence` block (absent_frames array sorted by signal_strength tier, FaithfulnessEnvelope with divergence_summary prose) and two `agent_guidance` additions (how_to_render_divergence, absence_is_not_prescription). MCP surface does not invoke any LLM for divergence; the caller's agent model completes the composition using the guidance + library resources. Set explicitly to false to receive the v0.7.x-shape response with no divergence block. Default: true.
domain_hintNoOptional. Hint about the document's domain used to filter absent frames for domain relevance. Only meaningful when include_divergence=true. If omitted, the envelope reports domain_inferred='unfiltered' and all absent frames are returned. Domain-metadata-based filtering is a future contract minor version; the current implementation echoes the hint to the envelope without field-level filtering (documented in envelope.limitations).
divergence_renderingNoOptional. How the caller wants absent-frame records decorated. Only affects AbsentFrameRecord decoration (teaching_question field present in 'teaching_questions' mode); all other modes return the same data. The caller's agent model renders per this preference with faithfulness guarantees from agent_guidance.how_to_render_divergence. Default: 'list'.
catalog_version_pinNoOptional. Pin the FVS catalog version used for absent-frame set difference. If omitted, the latest stable catalog version is used (currently library_v3 per commit 9abeb3d). Unsupported pins are coerced to library_v3 with a limitation note in envelope.limitations.
user_contextNoOptional. The user's situation, role, or decision context in plain prose (e.g., 'I'm a startup founder making a hire decision in healthcare AI', 'reviewing a research paper on language model alignment', 'drafting a Substack post on agent safety'). When provided, agent_guidance.how_to_render_divergence is extended to instruct the caller's model to filter divergence relevance for this context. The MCP does NOT echo the value back into the response (privacy posture); the caller's agent has it from the call args. Discipline: the context personalizes RELEVANCE FILTERING; never PRESCRIPTION. The absence_is_not_prescription guarantee extends to contextual surfacing. Default: omitted (no contextual filtering). Maximum length 2000 chars.
include_frame_opportunitiesNoOptional. Opt-in flag for LLM-augmented frame-opportunity composition (Item 12 of the substrate-side composition roadmap). When true, divergence.frame_opportunities carries up to 3 document-specific questions composed by the LLM from absent-frame teaching questions plus the document's content. Each opportunity carries model_provenance with model name, cost_usd, and is_deterministic=false. The deterministic substrate (clusters, patterns, absences) is unchanged. Cost is bounded at ~0.001 USD per invocation (3 Gemini Flash calls max). Falls back to empty opportunities list with available=false if GEMINI_API_KEY is not set or the google.genai library is unavailable. Default: false (deterministic substrate only).
user_goalNoOptional. The user's stated goal for invoking Frame Check. One of 'decide', 'brainstorm', 'persuade', 'learn', 'audit'. When provided, absent_frames carry a goal_relevance dict for frames load-bearing for the chosen goal, and the absent_frames sort promotes goal-relevant entries within their signal_strength tier (goal precedes genre in the within-tier ranking). 'audit' is the default-equivalent posture: no goal-specific override is applied; the existing catalog/coverage/genre ranking stands. When omitted, behavior matches 'audit'. Substrate-side composition Item 11.
compose_budgetNoOptional. Bound the substrate's output volume so an agent in a tight working-memory budget can request a compact reading without losing structural shape. 'minimal' = top-3 absent_frames, top-1 absence_cluster, top-1 frame_pattern. 'standard' = top-5 absent_frames, all clusters, all patterns. 'full' (default) = unfiltered. The envelope.tier_counts always reflects PRE-slice counts so the agent sees the truncation honestly; divergence.compose_budget_applied carries per-layer returned/total counts. Substrate-side composition L5 interface UX. Backwards-compatible: omit to preserve current behavior.

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries full burden and excels: it declares determinism, output structure, agent's role, and limitations (e.g., 'The measurements are Frame Check's; the reading is the agent's'). No contradictions.

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

Conciseness3/5

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

The description is front-loaded with purpose but becomes verbose with detailed instructions and repeated guidance. While well-structured, it could be trimmed by ~30% without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (11 params, no output schema), the description covers response components and behavioral nuances well. Missing explicit field-level structure of divergence block, but agent_guidance hints at rendering instructions.

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

Parameters4/5

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

Schema description coverage is 100%, so baseline is 3. The description adds value by explaining defaults, version behavior, and interaction between parameters (e.g., domain_hint only meaningful when include_divergence=true). This exceeds the schema alone.

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?

The description clearly states 'Deterministic structural framing analysis' and lists output components (measurements, agent_guidance, provenance). It explicitly distinguishes from sibling 'frame_compare' by focusing on single-document analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides guidance on when to use source_text (for layers 4 & 11), when include_divergence is default, and agent role. However, it does not explicitly exclude use cases or contrast with frame_compare, so it lacks explicit when-not advice.

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

frame_compareA

Deterministic structural comparison of two documents on the same subject. Returns analysis (per-document summaries plus the cross-document comparison: shared blind spots, unique coverage gaps, voice / temporal / epistemic deltas, and a structured framing-differences narrative with per-dimension reader implications) + agent_guidance (what comparison tells and does not tell you, how to cite without implying a ranking) + provenance. Repeated calls with identical inputs return identical results. No LLM is invoked.

ParametersJSON Schema
NameRequiredDescriptionDefault
document_a_textYesThe first document to compare. English. 300-10,000 words.
document_b_textYesThe second document to compare. English. 300-10,000 words. Should be on the same subject as document_a_text for the comparison to be meaningful.
document_a_labelNoOptional short label for document A (e.g. 'Industry view' or 'Gemini response'). Used in the comparison narrative. Defaults to 'Document A'.
document_b_labelNoOptional short label for document B. Defaults to 'Document B'.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool is deterministic, returns identical results for identical inputs, and does not invoke an LLM. It also explains what the output includes (analysis, agent_guidance, provenance), providing transparency beyond basic behavior.

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

Conciseness4/5

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

The description is well-structured, starting with the core purpose, then listing outputs, and finally additional traits (deterministic, no LLM). It is slightly long but each sentence adds value, and it front-loads the most important information.

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 no output schema, the description thoroughly explains what the tool returns (analysis, agent_guidance, provenance). It covers parameter constraints (word count, language, same subject) and behavioral traits. The context is complete for an agent to understand when and how to use the tool.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds meaningful context: documents must be English, 300-10000 words, and on the same subject. It also clarifies that labels are optional and used in the narrative, which goes beyond the schema descriptions.

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?

The description clearly states the tool does 'deterministic structural comparison of two documents on the same subject' and lists specific outputs (per-document summaries, cross-document comparison, etc.). It uses a specific verb ('compare') and resource ('two documents'), distinguishing it from the sibling tool 'frame_check'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use (documents on same subject, deterministic comparison) but does not explicitly state when not to use or compare with alternatives. It notes that repeated calls return identical results and that no LLM is invoked, but lacks direct guidance on choosing this over the sibling tool.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observedframe_check
    • First observedframe_compare

TDQS

A4.3/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: one analyzes a single document, the other compares two documents. There is no ambiguity.

Naming Consistency5/5

Both tools follow the consistent 'frame_<verb>' pattern (frame_check, frame_compare). The naming is predictable and uniform.

Tool Count3/5

With only two tools, the server feels minimal. While the tools are well-scoped, a server for structural analysis might benefit from additional tools for tasks like batch comparison or result export.

Completeness4/5

The server covers the two core operations (single analysis and pairwise comparison). Minor gaps exist, such as lacking a tool for multi-document analysis or aggregation, but the main use cases are addressed.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides cognitive tools for critical thinking and multi-perspective analysis of current affairs through structured prompts, including claim deconstruction, perspective comparison, and analysis through 9 analytical lenses (historical, economic, geopolitical, etc.).
    1
    -
  • A
    license
    B
    quality
    D
    maintenance
    Enables working with large documents of any size by intelligently segmenting them and using TF-IDF search to retrieve only relevant fragments, preventing context window saturation. Provides 31 domain-agnostic tools for document ingestion, semantic analysis, epistemological validation, and extraction verification across formats like PDF, EPUB, and HTML.
    31
    MIT

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/lluvr/frame-check'

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