Skip to main content
Glama

Context Sanitizer: verify repository scope

context_sanitizer_verify_scope
Read-onlyIdempotent

ContextSanitizer (DocTruth) pre-commit semantic contradiction validator. Pre-validates proposed code and documentation edits against repository knowledge graph before files are written, detecting semantic contradictions, zombie routes, and drift.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesMap of relative file paths to content strings (e.g. { 'server.ts': '...', 'docs/api.md': '...' }).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is clear. The description adds behavioral specifics: it consults a repository knowledge graph and detects semantic contradictions, zombie routes, and drift. This supplements the annotations without contradicting them.

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 a single compact sentence that conveys the tool's role and inputs. There is minor redundancy between 'pre-commit semantic contradiction validator' and 'detecting semantic contradictions', but overall it is well-sized and front-loaded for an agent to parse.

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

Completeness3/5

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

The input side is complete: the agent knows to pass a map of relative file paths to content strings. However, there is no output schema and the description does not explain what the tool returns or how to interpret the validation result, which is a meaningful gap for a validator tool.

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?

The schema fully describes the single 'files' parameter with an example, so schema_description_coverage is 100%. The tool description adds no additional parameter-level meaning, so it remains at the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action: it pre-validates proposed code and documentation edits against a repository knowledge graph before files are written, detecting semantic contradictions, zombie routes, and drift. This clearly identifies the tool's purpose and resource. However, it does not explicitly differentiate itself from the sibling tool context_sanitizer_get_dsi, so it stops short of a 5.

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 gives clear usage context through 'pre-commit' and 'before files are written', telling the agent this is a pre-write validation step. It does not mention when not to use it or compare it to alternatives, but the timing guidance is concrete and actionable.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources