Skip to main content
Glama
CSOAI-ORG

GDPR Compliance for AI Systems MCP Server

classify_processing

Classify data processing activities to determine applicable GDPR articles, DPIA requirements, and special category processing status.

Instructions

Classify data processing activities per GDPR articles. Determines which GDPR articles apply, whether a DPIA is required, special category processing status, and automated decision-making obligations.

Args:
    processing_description: Description of the data processing activity
    data_categories: Types of personal data processed (e.g. ["name", "email", "biometric", "health"])
    data_subjects: Categories of data subjects (e.g. ["employees", "customers", "children"])
    processing_purposes: Purposes of processing (e.g. ["fraud detection", "personalization"])
    automated_decision_making: Whether processing involves automated decisions affecting individuals
    large_scale: Whether processing is conducted on a large scale
    caller: Caller identifier for rate limiting
    tier: Access tier (free/pro)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
processing_descriptionYes
data_categoriesYes
data_subjectsYes
processing_purposesYes
automated_decision_makingNo
large_scaleNo
callerNoanonymous
tierNofree
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `classify_processing` function is the main handler for the tool. It takes a processing description, data categories, data subjects, processing purposes, and flags for automated decision-making and large scale. It checks access via API key, performs rate limiting, then classifies the GDPR processing activity — determining DPIA triggers, applicable GDPR articles, risk level, and obligations (record-keeping, DPO, privacy notice, consent, human review, international transfer checks). Returns a structured classification result.
    # ---------------------------------------------------------------------------
    @mcp.tool()
    def classify_processing(
        processing_description: str,
        data_categories: list[str],
        data_subjects: list[str],
        processing_purposes: list[str],
        automated_decision_making: bool = False,
        large_scale: bool = False,
        caller: str = "anonymous",
        tier: str = "free", api_key: str = "") -> str:
        """Classify data processing activities per GDPR articles. Determines which
        GDPR articles apply, whether a DPIA is required, special category processing
        status, and automated decision-making obligations.
    
        Args:
            processing_description: Description of the data processing activity
            data_categories: Types of personal data processed (e.g. ["name", "email", "biometric", "health"])
            data_subjects: Categories of data subjects (e.g. ["employees", "customers", "children"])
            processing_purposes: Purposes of processing (e.g. ["fraud detection", "personalization"])
            automated_decision_making: Whether processing involves automated decisions affecting individuals
            large_scale: Whether processing is conducted on a large scale
            caller: Caller identifier for rate limiting
            tier: Access tier (free/pro)
        """
        allowed, msg, tier = check_access(api_key)
        if not allowed:
            return {"error": msg, "upgrade_url": "https://meok.ai/pricing"}
        if err := _check_rate_limit(caller, tier):
            return {"error": err}
    
        special_categories = {"racial or ethnic origin", "political opinions", "religious beliefs",
                             "philosophical beliefs", "trade union membership", "genetic data",
                             "biometric", "health", "sex life", "sexual orientation"}
    
        data_lower = [d.lower() for d in data_categories]
        has_special = any(any(sc in dl for sc in special_categories) for dl in data_lower)
        has_children = any("child" in ds.lower() or "minor" in ds.lower() for ds in data_subjects)
    
        # Determine DPIA requirement (Article 35)
        dpia_triggers = []
        if automated_decision_making:
            dpia_triggers.append("Systematic and extensive automated evaluation (Art.35(3)(a))")
        if has_special and large_scale:
            dpia_triggers.append("Large-scale processing of special categories (Art.35(3)(b))")
        if large_scale and any(w in processing_description.lower() for w in ["monitor", "surveillance", "tracking", "profiling"]):
            dpia_triggers.append("Systematic monitoring on a large scale (Art.35(3)(c))")
        if any(w in processing_description.lower() for w in ["ai", "machine learning", "neural", "model", "algorithm"]):
            dpia_triggers.append("New technology likely to result in high risk (EDPB guidance)")
    
        # Determine applicable articles
        applicable_articles = ["Art.5 (Processing principles)", "Art.6 (Lawful basis)"]
        if has_special:
            applicable_articles.append("Art.9 (Special categories)")
        applicable_articles.append("Art.13/14 (Transparency)")
        if automated_decision_making:
            applicable_articles.append("Art.22 (Automated decision-making)")
        applicable_articles.append("Art.25 (Data protection by design)")
        if dpia_triggers:
            applicable_articles.append("Art.35 (DPIA required)")
        if has_children:
            applicable_articles.append("Art.8 (Child's consent)")
    
        # Risk classification
        risk_factors = sum([has_special, has_children, automated_decision_making, large_scale, bool(dpia_triggers)])
        if risk_factors >= 4:
            risk_level = "VERY HIGH"
        elif risk_factors >= 3:
            risk_level = "HIGH"
        elif risk_factors >= 2:
            risk_level = "MEDIUM"
        else:
            risk_level = "LOW"
    
        result = {
            "classification_type": "GDPR Processing Activity Classification",
            "timestamp": datetime.now(timezone.utc).isoformat(),
            "processing": {
                "description": processing_description,
                "data_categories": data_categories,
                "data_subjects": data_subjects,
                "purposes": processing_purposes,
            },
            "classification": {
                "special_category_data": has_special,
                "children_data": has_children,
                "automated_decision_making": automated_decision_making,
                "large_scale": large_scale,
                "risk_level": risk_level,
            },
            "applicable_articles": applicable_articles,
            "dpia_required": len(dpia_triggers) > 0,
            "dpia_triggers": dpia_triggers,
            "obligations": {
                "record_of_processing": "Required (Art.30) — maintain records of processing activities",
                "dpo_required": has_special or large_scale,
                "privacy_notice": "Required (Art.13/14) — must inform data subjects before processing",
                "consent_mechanism": "Required if consent is the lawful basis — must be freely given, specific, informed, unambiguous",
                "human_review": automated_decision_making,
                "international_transfer_check": "Review required if data leaves EEA",
            },
        }
    
        return result
  • server.py:329-338 (registration)
    The tool is registered via the `@mcp.tool()` decorator on line 329, which registers `classify_processing` as a FastMCP tool on the `mcp` server instance.
    @mcp.tool()
    def classify_processing(
        processing_description: str,
        data_categories: list[str],
        data_subjects: list[str],
        processing_purposes: list[str],
        automated_decision_making: bool = False,
        large_scale: bool = False,
        caller: str = "anonymous",
        tier: str = "free", api_key: str = "") -> str:
  • The function signature defines the input schema: `processing_description` (str), `data_categories` (list[str]), `data_subjects` (list[str]), `processing_purposes` (list[str]), `automated_decision_making` (bool), `large_scale` (bool), and auth parameters. The docstring describes all parameters. The return type is `str` (actually returns a dict).
    def classify_processing(
        processing_description: str,
        data_categories: list[str],
        data_subjects: list[str],
        processing_purposes: list[str],
        automated_decision_making: bool = False,
        large_scale: bool = False,
        caller: str = "anonymous",
        tier: str = "free", api_key: str = "") -> str:
Behavior3/5

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

No annotations exist, so the description bears full burden. It mentions rate limiting and tier via parameters but does not disclose side effects, idempotency, or data retention. Adequate but not exhaustive.

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 moderately sized with a clear opener and parameter list. Some redundancy exists (first sentence repeats determinations listed in Args), but overall efficient.

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 9 parameters (4 required) and an output schema present, the description covers parameter roles well. It does not explain error handling or return structure but is sufficient for agent selection.

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 0%, so the description compensates with brief explanations and examples for each parameter (e.g., 'Types of personal data processed (e.g. ["name", "email", "biometric", "health"])'). Adds value beyond schema names but lacks constraints or format specifics.

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 classifies data processing activities per GDPR articles, listing specific determinations (applicable articles, DPIA, special category, automated decision-making). This distinguishes it from sibling tools like breach_notification and dpia_generator.

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 explains what the tool does but does not explicitly state when to use it versus alternatives like lawful_basis_assessment or rights_request_handler. Usage context is implied but lacks direct guidance.

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

Install Server

Other Tools

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/CSOAI-ORG/gdpr-compliance-ai-mcp'

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