# Context Integrity Prover MCP

> The Context Integrity Prover is a validation gatekeeper for multi-step AI reasoning. It forces your agent to prove it hasn't drifted from the original goal, catching scope creep and hallucinated constraints before they break your logic. Run this tool early in any complex workflow when you need absolute confidence that the final output matches the user's initial intent.

## Overview
- **Category:** automation
- **Price:** Free
- **Tags:** word-count, character-count, text-analysis, length-validation

## Description

When building agents that perform multiple steps—say, reading data, running analysis, then drafting a report—the AI often loses track of what it started with. It gets distracted and starts doing related but unrequested tasks. That's context drift. This MCP solves that. It’s a structured check that forces your agent to pause and validate its entire plan against the original prompt. Instead of just trusting the output, you force the AI to prove it maintained boundaries, reject tangential ideas, and confirm every assumption made along the way. By integrating this into your pipeline via Vinkius, you ensure that even complex, multi-stage processes stay laser-focused on solving the problem you actually care about. It's a necessary guardrail for reliable automation.

## Tools

### text
Use this strictly to measure character limits or string lengths without assuming any specific platform constraints.

Measures the exact character length of a text string, with or without spaces

## Prompt Examples

**Prompt:** 
```
Can you help me write an essay on climate change? It needs to be exactly between 400 and 500 words.
```

**Response:** 
```
Here is your essay on climate change. I have verified its length: it is exactly 450 words, comfortably within your 400-500 word limit.
```

**Prompt:** 
```
I need to post this update on Twitter/X, but I'm not sure if it fits. Can you check?
```

**Response:** 
```
Your text contains 250 characters (including spaces). This is within the 280-character limit, so you are good to post it on Twitter/X!
```

**Prompt:** 
```
Write an introductory paragraph for my new blog. It must be exactly 3 sentences long.
```

**Response:** 
```
Here is your introduction. I've structured it to be concise and impactful, and verified that it contains exactly 3 sentences as requested.
```

**Prompt:** 
```
How long would it take the average person to read my 8-page newsletter draft?
```

**Response:** 
```
Based on an average reading speed of 200 words per minute, your newsletter draft of 3,150 words will take approximately 15 minutes and 45 seconds to read.
```

## Capabilities

### Enforce original requirements
The system forces the agent to restate and prove adherence to the exact constraints given in the initial prompt.

### Identify scope boundaries
It requires the agent to explicitly list things it will ignore or not build, keeping the focus tight.

### Reject tangential tasks
The agent must identify and reject ideas that are related but fall outside the defined scope ('while we're at it').

### Detect process drift
It checks if the current steps still logically serve the original problem, or if the goal has subtly changed.

### Validate assumptions made
The tool makes the agent list every assumption it's making that wasn't stated by the user, preventing hallucinated constraints.

## Use Cases

### Drafting a Quarterly Report
A marketing manager asks an agent to analyze Q3 sales figures for the Northeast region. The agent successfully analyzes the data but then, realizing it can't access West Coast data, starts adding analysis about global market trends. Using `validate_context_integrity` catches this immediately as scope creep, forcing the agent back to just the Northeast.

### Debugging Code Changes
A developer asks an agent to fix a specific bug in one function. The agent successfully fixes the bug but then suggests refactoring three other unrelated files and updating documentation sections. Running `validate_context_integrity` rejects these suggested changes as out of scope.

### Complex Data Extraction
You need an agent to extract only names and dates from a document. The agent extracts the data but also includes summary paragraphs about the document's history. This is caught by `validate_context_integrity` as intent mismatch, ensuring you get clean, raw JSON.

### Automated Research Summaries
You task an agent with summarizing research on solar panel efficiency. The agent adds details about geothermal energy because it 'knows' it’s related. `validate_context_integrity` identifies this as a hallucinated constraint, keeping the summary focused solely on solar power.

## Benefits

- Prevents scope creep. You don't have to manually check if the agent started adding extra features or analyzing tangential data points.
- Stops context drift. It catches progressive deviation, meaning even if every step looks fine individually, you know when the cumulative direction is wrong.
- Exposes hidden assumptions. The tool makes your agent list every single assumption it's making that wasn't in the prompt, letting you validate constraints instead of guessing.
- Enforces strict boundaries. You tell the system exactly what to do and, equally important, what *not* to do for a reliable output.
- Improves reliability. By forcing this structured reflection before execution, your multi-step pipelines are far more predictable and less prone to failure.

## How It Works

The bottom line is it transforms abstract 'trust' into concrete, auditable proof of focus for complex AI tasks.

1. Call `validate_context_integrity` at the start of your multi-step plan. This establishes a formal record of all initial constraints and boundaries.
2. Allow the agent to execute its steps, but insert calls to this MCP periodically (e.g., after data retrieval or analysis) to check for drift.
3. The tool returns a structured verdict that tells you if the context is sound, if scope creep occurred, or what assumptions were made, letting your code decide whether to proceed.

## Frequently Asked Questions

**How does validate_context_integrity fix context drift?**
It forces the agent to compare every new step against your original request, checking if the current direction still serves that initial goal. This prevents subtle, cumulative deviation.

**Do I need to call validate_context_integrity every time?**
You should use it at the beginning of any multi-step process and then again when you suspect the agent's focus might have wandered. It’s a checkpoint, not a one-time switch.

**What is scope creep in this context?**
Scope creep means the agent adds features or analysis that were never requested or mentioned in your initial prompt. The tool forces it to reject these additions explicitly.

**Does validate_context_integrity check for data type errors?**
No, this MCP is designed for logical integrity and scope adherence. For structural checks, you'll need a schema validation tool, but `validate_context_integrity` handles the 'why' behind the data.

**What specific information must I provide when calling validate_context_integrity?**
You must supply inputs for all six validation pivots. This includes quoting the original user constraints, listing what is explicitly out of scope, and detailing any assumptions you make about the task.

**Does running validate_context_integrity impact my overall workflow speed?**
Yes, because it forces a rigorous six-point audit, there will be an inherent overhead. However, this delay prevents costly context drift and scope creep errors later in your process.

**What happens if validate_context_integrity detects a failure or violation?**
The tool returns a specific verdict code (e.g., SCOPE_CREEP_DETECTED). The output provides detailed reasoning explaining precisely which boundary was crossed and why.

**Is the context data I send to validate_context_integrity handled securely?**
Yes, Vinkius handles all MCP data using industry-standard encryption protocols. Your input context remains private and is used solely for validation against your defined constraints.

**Why force rejection of scope?**
LLMs are sycophants. They always say yes to new suggestions. Forcing them to explicitly state what they are rejecting proves they understand where the boundaries are.

**What is a hallucinated constraint?**
When an AI invents a rule (like 'we must use TypeScript') that the user never actually asked for. It adds artificial complexity and delays execution.

**How do you prove intent matches?**
By doing a parity check between the user's initial prompt and the final deliverable, ensuring no features were skipped and no extra work was injected.

**Can it count characters with and without spaces?**
Yes, the character counting tool provides an `includeSpaces` boolean option to include or exclude spaces.

**How does limit validation work for agents?**
Agents pass an optional 'max' parameter. The server checks the count against the limit and returns a 'pass' true/false status, along with the percentage filled and characters/words remaining.

**Can it calculate the reading time of an article?**
Yes, the estimate_reading_time tool calculates the duration based on a configurable words-per-minute baseline.