generate_fria_template
Create a structured FRIA template with all 7 mandatory Article 27 fields populated. Input deployer name, AI system name, Annex III category, and geographic scope to generate a compliance-ready framework.
Instructions
Generate a FRIA template structure with all 7 mandatory Article 27 fields populated as guidance.
Args: deployer_name: Legal name of the deployer (e.g., "Acme Hiring Ltd"). ai_system_name: Name of the AI system being deployed. annex_iii_category: Annex III category (e.g., "employment-and-workforce"). expected_users: Estimated count of natural persons whose data will be processed. geographic_scope: List of country codes (e.g., ["DE", "FR", "IE"]).
Returns: Structured FRIA template ready for completion by the deployer's compliance team.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deployer_name | Yes | ||
| ai_system_name | Yes | ||
| annex_iii_category | Yes | ||
| expected_users | No | ||
| geographic_scope | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- meok_fria_generator/server.py:187-248 (handler)The main handler function for the 'generate_fria_template' tool. It generates a structured FRIA template with all 7 mandatory Article 27 fields, metadata (deployer, AI system, etc.), charter references, review schedule, and delivery format. Decorated with @mcp.tool() to register as an MCP tool.
@mcp.tool() def generate_fria_template( deployer_name: str, ai_system_name: str, annex_iii_category: str, expected_users: int = 1000, geographic_scope: list[str] | None = None, ) -> dict[str, Any]: """Generate a FRIA template structure with all 7 mandatory Article 27 fields populated as guidance. Args: deployer_name: Legal name of the deployer (e.g., "Acme Hiring Ltd"). ai_system_name: Name of the AI system being deployed. annex_iii_category: Annex III category (e.g., "employment-and-workforce"). expected_users: Estimated count of natural persons whose data will be processed. geographic_scope: List of country codes (e.g., ["DE", "FR", "IE"]). Returns: Structured FRIA template ready for completion by the deployer's compliance team. """ geographic_scope = geographic_scope or ["EU-27"] today = datetime.now(timezone.utc).date().isoformat() sections = {} for field_id, field in ARTICLE_27_FIELDS.items(): sections[field_id] = { "label": field["label"], "guidance": field["guidance"], "deployer_response": "[TO BE COMPLETED BY DEPLOYER]", "edpb_dpia_overlap": FRIA_DPIA_CROSSWALK.get(field_id, []), } return { "fria_template_metadata": { "deployer": deployer_name, "ai_system": ai_system_name, "annex_iii_category": annex_iii_category, "expected_user_count": expected_users, "geographic_scope": geographic_scope, "drafted_on": today, "drafted_by_tool": "meok-fria-generator-mcp", "tool_version": "1.0.0", "regulatory_basis": "EU AI Act Reg (EU) 2024/1689 Article 27", }, "sections": sections, "charter_reference": CHARTER_REFERENCE, "review_schedule": { "default_review_period": "12 months", "trigger_based_review": [ "Material change to deployer processes", "Substantive complaint received via complaint mechanism (Art. 27(1)(f))", "Regulatory guidance from EU AI Office or national supervisory authority", "Significant model update (>5% performance shift on validation set)", "Geographic expansion to new Member State", ], }, "delivery_format": { "primary": "PDF + machine-readable JSON-LD", "regulator_request_format": "Per supervisory authority (typically PDF + structured annex)", "retention": "Minimum 10 years per Article 18 (post-deployment)", }, } - meok_fria_generator/server.py:30-68 (schema)Definition of ARTICLE_27_FIELDS — the 7 mandatory FRIA fields (Article 27(1)(a)-(g)) used by generate_fria_template to populate the template sections.
ARTICLE_27_FIELDS = { "a_deployer_processes": { "label": "Deployer's processes in which the system will be used", "guidance": "Describe each business process where the high-risk AI system will be deployed. " "Include process owner, throughput volume, decision-making authority of the AI vs human.", }, "b_period_frequency_use": { "label": "Period and frequency of intended use", "guidance": "Time horizon (pilot 6mo / production 3yr / etc.) and frequency " "(real-time per request / batch nightly / etc.). Note any seasonality.", }, "c_categories_persons_affected": { "label": "Categories of natural persons and groups likely affected", "guidance": "Affected populations (employees, customers, candidates, claimants, citizens, etc.). " "Include vulnerable groups protected under EU Charter (children, disabled, refugees, minorities).", }, "d_specific_risks_harm": { "label": "Specific risks of harm likely to impact the categories of persons", "guidance": "Risks across: discrimination, dignity, privacy, freedom of expression, " "access to services, due process, mental health, economic outcomes. " "Use EU Charter of Fundamental Rights as the reference framework.", }, "e_human_oversight_measures": { "label": "Measures of human oversight per Art. 14", "guidance": "How the natural persons assigned human oversight are enabled to: (a) understand " "system capacity, (b) interpret outputs, (c) decide not to use the output, (d) intervene/halt, " "(e) reverse outcomes. Specific roles, training, escalation paths.", }, "f_internal_governance_complaint_mechanisms": { "label": "Internal governance + complaint mechanisms", "guidance": "Internal governance structure (AI ethics board, escalation paths). " "Complaint mechanisms for affected persons, including timelines and accessibility.", }, "g_review_modify_obligations": { "label": "Periodic review of FRIA + obligations to update", "guidance": "Frequency of FRIA review (annual / per-deployment / per-significant-change). " "Triggers for re-review (regulatory change, incident, complaint volume).", }, } - meok_fria_generator/server.py:84-92 (helper)FRIA_DPIA_CROSSWALK — maps each Article 27 FRIA field to EDPB DPIA sections, used by generate_fria_template to add 'edpb_dpia_overlap' to each section.
FRIA_DPIA_CROSSWALK = { "a_deployer_processes": ["1. Context of processing"], "b_period_frequency_use": ["2. Necessity & proportionality"], "c_categories_persons_affected": ["1. Context of processing", "3. Risks to data subjects"], "d_specific_risks_harm": ["3. Risks to data subjects' rights and freedoms"], "e_human_oversight_measures": ["4. Measures + safeguards"], "f_internal_governance_complaint_mechanisms": ["4. Measures + safeguards", "6. Consultation"], "g_review_modify_obligations": ["7. Review schedule + version control"], } - CHARTER_REFERENCE — EU Charter of Fundamental Rights articles relevant to AI deployer FRIA, included in the template output.
CHARTER_REFERENCE = { "Art. 1": "Human dignity", "Art. 7": "Respect for private and family life", "Art. 8": "Protection of personal data", "Art. 11": "Freedom of expression and information", "Art. 14": "Right to education", "Art. 15": "Freedom to choose an occupation and right to engage in work", "Art. 21": "Non-discrimination", "Art. 23": "Equality between women and men", "Art. 24": "Rights of the child", "Art. 25": "Rights of the elderly", "Art. 26": "Integration of persons with disabilities", "Art. 31": "Fair and just working conditions", "Art. 34": "Social security and social assistance", "Art. 35": "Health care", "Art. 41": "Right to good administration", "Art. 47": "Right to an effective remedy and to a fair trial", } - meok_fria_generator/server.py:187-188 (registration)Registration of generate_fria_template as an MCP tool via @mcp.tool() decorator on the FastMCP instance 'mcp' defined at line 25.
@mcp.tool() def generate_fria_template(