Skip to main content
Glama
ComplianceCow

ComplianceCow MCP Server

generate_design_notes_preview

Generate Jupyter notebook previews with 7 standardized sections for compliance rule design notes, enabling review of evidence details and schemas before creation.

Instructions

Generate design notes preview for user confirmation before actual creation.

DESIGN NOTES PREVIEW GENERATION

This tool generates a complete Jupyter notebook structure as a dictionary for user review. The MCP will create the full notebook content with 7 standardized sections based on rule context and metadata, then return it for user confirmation.

DESIGN NOTES TEMPLATE STRUCTURE REQUIREMENTS

The MCP should generate a Jupyter notebook (.ipynb format) with exactly 7 sections:

SECTION 1: Evidence Details

DESCRIPTION: System identification and rule purpose documentation

CONTENT REQUIREMENTS:

  • Table with columns: System | Source of data | Frameworks | Purpose

  • System: {TARGET_SYSTEM_NAME} (all lowercase")

  • Source: Always 'compliancecow'

  • Frameworks: Always '-'

  • Purpose: Use rule's purpose from metadata

  • RecommendedEvidenceName: {RULE_OUTPUT_NAME} (use rule's primary compliance output, exclude LogFile)

  • Description: Use rule description from metadata

  • Reference: Include actual API documentation links that the rule uses (extract from task specifications, no placeholder values)

FORMAT: Markdown cell with table and code blocks only

SECTION 2: Define the System Specific Data (Extended Data Schema)

DESCRIPTION: System-specific raw data structure definition with detailed breakdown

CONTENT REQUIREMENTS:

Step 2a: Inputs

  • Generate numbered list from rule's spec.inputs

  • Format: "{NUMBER}. {INPUT_NAME}({INPUT_DATA_TYPE}) - {INPUT_DESCRIPTION}"

  • Include all inputs with their types and purposes

Step 2b: API & Flow

  • Generate numbered list of API endpoints based on target system

  • Format: "{NUMBER}. {HTTP_METHOD} {URL} - {BRIEF_DESCRIPTION}"

  • Include only actual API endpoints that this specific rule uses for data collection

  • Extract from task specifications, not generic templates

Step 2c: Define the Extended Schema

  • Generate large JSON code block with actual API response structure

  • Use system-specific field names and realistic data values

  • Include all fields that will be processed by the rule

FORMAT: Markdown headers with detailed lists + large JSON code block

SECTION 3: Define the Standard Schema

DESCRIPTION: Standardized compliance data format documentation

CONTENT REQUIREMENTS:

  • Header explaining standard schema purpose

  • JSON code block with complete standardized structure containing:

  • System: based on target system (lowercase)

  • Source: Always 'compliancecow'

  • Resource info: ResourceID, ResourceName, ResourceType, ResourceLocation, ResourceTags, ResourceURL

  • System-specific data fields based on actual rule output columns, if unavailable then generate based on rule details

  • Compliance fields: ValidationStatusCode, ValidationStatusNotes, ComplianceStatus, ComplianceStatusReason

  • Evaluation and action fields: EvaluatedTime, UserAction, ActionStatus, ActionResponseURL (UserAction, ActionStatus, ActionResponseURL are empty by default)

Step 3a: Sample Data

  • Generate markdown table with ALL standard schema columns in same order - include all columns even if empty

  • Include three complete example rows with realistic, system-specific data

  • Use proper data formatting and realistic identifiers

FORMAT: JSON code block + comprehensive markdown table

SECTION 4: Describe the Compliance Taxonomy

DESCRIPTION: Status codes and compliance definitions

CONTENT REQUIREMENTS:

  • Table with columns: ValidationStatusCode | ValidationStatusNotes | ComplianceStatus | ComplianceStatusReason

  • ValidationStatusCode: CRITICAL FORMAT REQUIREMENT - Rule-specific codes must strictly follow this exact format:

    • Each word must be exactly 3-4 characters long

    • Words must be separated by underscores (_)

    • Use ALL UPPERCASE letters

    • Create codes that directly relate to the rule's compliance purpose

    • Examples: CODE_OWN_HAS_PR_REV (code ownership has pull request review), REPO_SEC_SCAN_PASS (repository security scan passed), AUTH_MFA_ENBL (authentication multi-factor enabled)

    • DO NOT use generic codes like "PASS" or "FAIL"

    • DO NOT exceed 4 characters per word

    • DO NOT use special characters other than underscores

    • Generate 4-6 different status codes covering various compliance scenarios

  • Detailed compliance reasons specific to the rule's purpose

  • Both COMPLIANT and NON_COMPLIANT scenarios

FORMAT: Markdown cell with table

SECTION 5: Calculation for Compliance Percentage and Status

DESCRIPTION: Percentage calculations and status logic

CONTENT REQUIREMENTS:

  • Header explaining compliance calculation methodology

  • Code cell with calculation logic:

  • TotalCount = Count of 'COMPLIANT' and 'NON_COMPLIANT' records

  • CompliantCount = Count of 'COMPLIANT' records

  • CompliancePCT = (CompliantCount / TotalCount) * 100

  • Status determination rules:

    • COMPLIANT: 100%

    • NON_COMPLIANT: 0% to less than 100%

    • NOT_DETERMINED: If no records are found

FORMAT: Markdown header cell + Code cell with calculation logic

SECTION 6: Describe (in words) the Remediation Steps for Non-Compliance

DESCRIPTION: Non-compliance remediation procedures

CONTENT REQUIREMENTS:

  • Can be "N/A" if no specific remediation steps apply

  • When applicable, provide:

  • Immediate Actions required

  • Short-term remediation steps

  • Long-term monitoring approaches

  • Responsible parties and timeframes

  • System-agnostic guidance that can be customized

FORMAT: Markdown cell with detailed remediation procedures

SECTION 7: Control Setup Details

DESCRIPTION: Rule configuration and implementation details

CONTENT REQUIREMENTS:

  • Table with two columns: Control Details | (Values)

  • Required fields (only these):

  • RuleName: Use actual rule name

  • PreRequisiteRuleNames: Default to 'N/A' or list dependencies

  • ExtendedSchemaRuleNames: Default to 'N/A' or list related rules

  • ApplicationClassName: Fetch all appType values from spec.tasks array, combine them, remove duplicates, and format as comma-separated values

  • PostSynthesizerName: Default to 'N/A' or specify if used

FORMAT: Markdown table with control configuration details

JUPYTER NOTEBOOK METADATA REQUIREMENTS

  • Include proper notebook metadata (colab, kernelspec, language_info)

  • Set nbformat: 4, nbformat_minor: 0

  • Use appropriate cell metadata with unique IDs for each section

  • Ensure proper markdown and code cell formatting

MCP CONTENT POPULATION INSTRUCTIONS

The MCP should extract the following information from the rule context:

  • Rule name, purpose, description from rule metadata

  • System name from appType (clean by removing connector suffixes like "-connector")

  • Task details from spec.tasks array

  • Input specifications from spec.inputs and spec.inputsMeta__

  • Output specifications from spec.outputsMeta__

  • Application connector information for control setup

  • API endpoints from task specifications (not generic placeholders)

CONTENT GENERATION GUIDELINES

  • Use realistic, system-specific examples that can be customized later

  • Include comments in code sections indicating customization points

  • Provide system-agnostic content that applies broadly

  • Use consistent naming conventions throughout all sections

  • Extract actual API documentation links from task specifications

  • Generate ValidationStatusCodes that are specific to the rule's compliance purpose

  • Ensure all sample data reflects the actual system being monitored

WORKFLOW

  1. MCP retrieves rule context from stored rule information

  2. MCP generates complete Jupyter notebook using template structure above

  3. MCP populates template with extracted rule metadata and calculated values

  4. MCP returns complete notebook structure as dictionary for user review

  5. User reviews and confirms the structure

  6. If approved, call create_design_notes() to actually save the notebook

ARGS

  • rule_name: Name of the rule for which to generate design notes preview

RETURNS

Dict containing complete notebook structure for user review and confirmation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Explains it returns a dictionary for review without saving, and details what content gets populated (7 sections), though lacks info on error states or constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely verbose; the extensive template specifications (7 detailed sections with formatting requirements) bury the essential usage guidance and exceed what an agent needs for tool selection.

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?

While complete regarding the workflow and output, the inclusion of exhaustive implementation details (SECTION 1-7 specifications) makes it difficult to parse; output schema exists so detailed return explanation isn't necessary.

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?

Compensates for 0% schema description coverage by explicitly defining 'rule_name' as 'Name of the rule for which to generate design notes preview' in ARGS section.

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?

Clear specific verb ('generate') + resource ('design notes preview') and explicitly distinguishes from sibling 'create_design_notes' in WORKFLOW section ('If approved, call create_design_notes() to actually save').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use vs alternative: 'for user confirmation before actual creation' and WORKFLOW clearly delineates this preview step from the final create_design_notes() call.

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/ComplianceCow/cow-mcp'

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