Implementation Corrections
Executive Summary
This document identifies and corrects inconsistencies between the IETF vCon specification (draft-ietf-vcon-vcon-core-02, v0.4.0) and the MCP Server implementation specification. These corrections are critical for ensuring compliance with the vCon standard and interoperability with other vCon implementations.
Critical Inconsistencies Found
1. Analysis Object Schema Field Naming
Issue: Field name mismatch between spec and implementation
IETF Specification (Section 4.5.7):
schema: "String" (optional)Current Implementation:
Database schema uses:
schema_version TEXTTool definitions use:
schema_versionType definitions use:
schema_version
Impact:
Non-compliant vCons will be created
Interoperability failures with other vCon systems
Database queries will fail to find analysis by schema
Correction Required:
2. Analysis Vendor Field Requirement
Issue: Vendor field optionality differs from specification
IETF Specification (Section 4.5.5):
Current Implementation:
Database schema:
vendor TEXT(nullable)Tool definitions mark vendor as optional
Impact:
vCons may be created without required vendor information
Non-compliant with IETF specification
Correction Required:
3. Analysis Body Field Data Type
Issue: Body field storage type incompatible with specification
IETF Specification (Section 4.5.8):
The body should be able to store ANY string content, including non-JSON formats.
Current Implementation:
Impact:
Cannot store non-JSON analysis bodies (CSV, plain text, XML, etc.)
Forces all analysis to be JSON format
Data loss when storing non-JSON analysis results
Correction Required:
Migration Strategy:
4. Encoding Field Default Values
Issue: Inconsistent default values for encoding across objects
IETF Specification (Section 2.3.2):
Current Implementation:
Analysis table:
encoding TEXT DEFAULT 'json'Dialog table:
encoding TEXT DEFAULT 'none'Attachments table:
encoding TEXT DEFAULT 'none'
Impact:
Inconsistent behavior across different object types
Default assumptions may not match actual content
Correction Required:
5. Missing Dialog Type Values
Issue: Database doesn't enforce valid dialog types
IETF Specification (Section 4.3.1):
Current Implementation:
Correction Required:
6. Party UUID vs Data Subject ID
Issue: Mixing of party identification fields
IETF Specification (Section 4.2.12):
Current Implementation:
parties table has:
data_subject_id TEXTMissing:
uuidfield from Party Object
Impact:
Non-compliant party identification
Cannot properly track parties across vCons per spec
Correction Required:
7. Analysis Dialog Reference
Issue: Missing proper dialog reference in analysis table
IETF Specification (Section 4.5.2):
Current Implementation:
No dedicated dialog reference field in analysis table
Correction Required:
Additional Recommendations
1. Standardize Parameter Names
The implementation uses both snake_case and camelCase inconsistently. The IETF spec uses snake_case throughout.
Recommendation: Use snake_case for all parameter names to match IETF specification.
2. Add Type System Validation
Recommendation: Implement TypeScript types that exactly match IETF specification:
3. Separate Extension Fields from Core Fields
The implementation mixes vCon extension fields (like data_subject_id, consent tracking) with core vCon fields. These should be clearly separated.
Recommendation:
Keep core vCon fields in main tables
Create separate extension tables for privacy/consent tracking
Document which fields are extensions vs. core spec
4. Tag Storage and Search
Per vcon-dev/vcon-lib, tags are represented as a dedicated attachment rather than a top-level column:
Attachment with
type="tags",encoding="json"bodyis an array of strings like"key:value"
Search should derive tag filters by parsing this attachment (e.g., in SQL using jsonb_array_elements_text), or via a vcon_tags_mv materialized view with a GIN index on the aggregated JSONB object for performance.
Implementation Priority
High Priority (Breaking Changes)
Fix
schema_version→schemafield nameMake
vendorfield required in analysisChange
bodyfrom JSONB to TEXT in analysis tableAdd proper
uuidfield to parties table
Medium Priority (Data Quality)
Remove default values from encoding fields
Add dialog type constraints
Add dialog reference to analysis table
Low Priority (Best Practices)
Standardize naming conventions
Add type system validation
Separate extension fields
Migration Script
Testing Checklist
After applying corrections:
Documentation Updates Required
Update all tool definitions to use corrected field names
Update database schema documentation
Update API documentation
Create vCon compliance checklist
Add migration guide for existing deployments
References
IETF vCon Specification: draft-ietf-vcon-vcon-core-02.txt (v0.4.0)
Original Implementation: MCP Server for IETF vCon with Supabase - Complete Implementation Specification.md
Related: vcon_adapter_guide.md
Questions for Resolution
Should we support both
schemaandschema_versionfor backwards compatibility?How should we handle existing vCons with non-compliant field names?
Should the migration be applied automatically or require manual intervention?
What is the deprecation timeline for non-compliant fields?
Document Version: 1.0 Date: 2025-10-07 Status: Draft for Review
Last updated