Skip to main content
Glama

Generate Statutory Legal Document Suite

generate_documents
Idempotent

Synthesizes a tailored suite of legal compliance documents (Privacy Policy, Terms of Service, Cookie Policy, EULA, Acceptable Use Policy, Disclaimer, Return & Refund Policy, WCAG Accessibility Statement) directly from company metadata, jurisdictions (GDPR, CCPA, EU_AI_ACT), data practices, and sub-processor flags.

When to use vs. related tools: Use 'generate_documents' when you already have all company and technical parameters ready to synthesize policies immediately. Use 'get_questionnaire_schema' followed by 'generate_docs_questionnaire' when conducting an interactive user intake flow. Use 'generate_dpa' specifically for a GDPR Article 28 Data Processing Addendum contract between Controller and Processor. Use 'export_documents' afterward to convert saved documents into HTML or JSON.

Preconditions & side effects: Requires 'company_name', 'website_url', and 'contact_email'. If 'siteId' is omitted, operates in 'isolated_ephemeral_client' mode with a temporary ID and zero registry side effects. If 'siteId' is provided, it MUST match a registered site—on match, persists the generated documents onto that site and updates its compliance score (>= 95) and grade ('A+'); if unknown, returns an error.

Returns: JSON object with 'success', 'siteId', 'company_name', 'tenant_mode', 'documents_generated' summaries, full 'documents' Markdown array, and 'message' (or 'error').

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "company_name": "<company_name>",
      "website_url": "<website_url>",
      "contact_email": "<contact_email>"
    },
    "name": "generate_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteIdNoOptional registered site UUID (from 'list_sites' or 'add_site'). When provided and found, generated documents are persisted to that site's record and raise its compliance grade to A+. When omitted, documents are synthesized for an isolated ephemeral tenant ID without modifying registered sites.
dpo_emailNoOptional dedicated Data Protection Officer (DPO) email address referenced in the Privacy Policy user-rights section.
uses_hotjarNoWhether Hotjar session recording or heatmap telemetry is disclosed in the Privacy Policy sub-processor section.
website_urlYesCanonical HTTP or HTTPS URL of the website covered by the generated legal documents.
company_nameYesFull legal entity or registered company name inserted as the Data Controller / Contracting Party.
contact_emailYesPublic legal, support, and DSAR privacy contact email address printed inside the policies.
jurisdictionsNoRegulatory regimes to incorporate into governing law, consumer rights, and AI disclosure clauses (e.g. 'GDPR', 'CCPA', 'UK_GDPR', 'PIPEDA', 'EU_AI_ACT').
document_typesNoSubset of statutory documents to synthesize. Omit to generate the default 6-document suite (privacy_policy, terms_of_service, cookie_policy, eula, acceptable_use, disclaimer).
collects_minorsNoWhether services are directed at or knowingly collect data from minors under 13/16 (activates COPPA & GDPR Art. 8 parental consent clauses).
uses_meta_pixelNoWhether Meta (Facebook) advertising pixels are active and must be disclosed under GDPR/CCPA.
collects_cookiesNoWhether the website stores cookies, localStorage, or similar client identifiers.
physical_addressNoRegistered corporate mailing address for statutory notices and controller identification.100 Market St, San Francisco, CA 94105
has_user_accountsNoWhether end-users can create authenticated accounts or user profiles.
processes_paymentsNoWhether payments or recurring subscriptions are processed (adds billing, Stripe sub-processor, and refund sections).
refund_period_daysNoConsumer refund / withdrawal guarantee window in calendar days used in Terms of Service and Return Policy.
data_retention_monthsNoStandard personal data retention duration in months disclosed in the Privacy Policy.
uses_google_analyticsNoWhether Google Analytics 4 or Google Tag Manager is included in the sub-processor disclosures.

Output Schema

NameRequiredDescriptionDefault
errorNoValidation or lookup error message when success is false.
siteIdNoTarget registered siteId or generated ephemeral 'site_temp_*' identifier.
messageNoHuman-readable completion status.
successYesTrue if document generation succeeded; false if siteId lookup or required field validation failed.
documentsNoComplete generated documents including Markdown bodies.
tenant_modeNoIndicates whether generated documents were saved to a registered site or returned for an isolated ephemeral tenant.
company_nameNoLegal entity name used in generated clauses.
available_sitesNoRegistered sites returned when an explicit siteId does not match.
documents_generatedNoSummary list of generated documents with preview links.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed59 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / collects_cookies / description
      Previous value: -"Whether the site uses cookies or browser local storage"New value: +"Whether the website stores cookies, localStorage, or similar client identifiers."
    • addedInput schema / properties / collects_cookies / examples
      Added value: +[
      +  true
      +]
    • changedInput schema / properties / collects_minors / description
      Previous value: -"Whether services are accessible to or directed at minors under 13/16 (triggers COPPA & GDPR Art. 8 clauses)"New value: +"Whether services are directed at or knowingly collect data from minors under 13/16 (activates COPPA & GDPR Art. 8 parental consent clauses)."
    • addedInput schema / properties / collects_minors / examples
      Added value: +[
      +  false
      +]
    • changedInput schema / properties / company_name / description
      Previous value: -"Legal entity or company name"New value: +"Full legal entity or registered company name inserted as the Data Controller / Contracting Party."
    • addedInput schema / properties / company_name / examples
      Added value: +[
      +  "Acme Technologies Inc."
      +]
    • addedInput schema / properties / company_name / maxLength
      Added value: +200
    • addedInput schema / properties / company_name / minLength
      Added value: +1
    • changedInput schema / properties / contact_email / description
      Previous value: -"Official legal and privacy contact email"New value: +"Public legal, support, and DSAR privacy contact email address printed inside the policies."
    • addedInput schema / properties / contact_email / examples
      Added value: +[
      +  "privacy@acme-saas.com"
      +]
    • addedInput schema / properties / contact_email / format
      Added value: +"email"
    • addedInput schema / properties / contact_email / minLength
      Added value: +5
    • addedInput schema / properties / contact_email / pattern
      Added value: +"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
    • changedInput schema / properties / data_retention_months / description
      Previous value: -"Data retention period in months"New value: +"Standard personal data retention duration in months disclosed in the Privacy Policy."
    • addedInput schema / properties / data_retention_months / examples
      Added value: +[
      +  24
      +]
    • addedInput schema / properties / data_retention_months / maximum
      Added value: +120
    • addedInput schema / properties / data_retention_months / minimum
      Added value: +1
    • changedInput schema / properties / data_retention_months / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / document_types / default
      Added value: +[
      +  "privacy_policy",
      +  "terms_of_service",
      +  "cookie_policy",
      +  "eula",
      +  "acceptable_use",
      +  "disclaimer"
      +]
    • changedInput schema / properties / document_types / description
      Previous value: -"Documents to synthesize: ['privacy_policy', 'terms_of_service', 'cookie_policy', 'eula', 'acceptable_use', 'disclaimer', 'return_policy', 'accessibility_statement']"New value: +"Subset of statutory documents to synthesize. Omit to generate the default 6-document suite (privacy_policy, terms_of_service, cookie_policy, eula, acceptable_use, disclaimer)."
    • addedInput schema / properties / document_types / examples
      Added value: +[
      +  [
      +    "privacy_policy",
      +    "terms_of_service",
      +    "cookie_policy"
      +  ]
      +]
    • addedInput schema / properties / document_types / items / description
      Added value: +"Supported statutory document type key."
    • addedInput schema / properties / document_types / items / enum
      Added value: +[
      +  "privacy_policy",
      +  "terms_of_service",
      +  "cookie_policy",
      +  "eula",
      +  "acceptable_use",
      +  "disclaimer",
      +  "return_policy",
      +  "accessibility_statement"
      +]
    • addedInput schema / properties / document_types / minItems
      Added value: +1
    • addedInput schema / properties / document_types / uniqueItems
      Added value: +true
    • addedInput schema / properties / dpo_email
      Added value: +{
      +  "description": "Optional dedicated Data Protection Officer (DPO) email address referenced in the Privacy Policy user-rights section.",
      +  "examples": [
      +    "dpo@acme-saas.com"
      +  ],
      +  "format": "email",
      +  "minLength": 5,
      +  "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$",
      +  "type": "string"
      +}
    • changedInput schema / properties / has_user_accounts / description
      Previous value: -"Whether end-users can register accounts or log in"New value: +"Whether end-users can create authenticated accounts or user profiles."
    • addedInput schema / properties / has_user_accounts / examples
      Added value: +[
      +  true
      +]
    • changedInput schema / properties / jurisdictions / description
      Previous value: -"Target jurisdictions (e.g. ['GDPR', 'CCPA', 'EU_AI_ACT'])"New value: +"Regulatory regimes to incorporate into governing law, consumer rights, and AI disclosure clauses (e.g. 'GDPR', 'CCPA', 'UK_GDPR', 'PIPEDA', 'EU_AI_ACT')."
    • addedInput schema / properties / jurisdictions / examples
      Added value: +[
      +  [
      +    "GDPR",
      +    "CCPA",
      +    "EU_AI_ACT"
      +  ]
      +]
    • addedInput schema / properties / jurisdictions / items / description
      Added value: +"Jurisdiction or regulation identifier (e.g. 'GDPR', 'CCPA', 'UK_GDPR', 'PIPEDA', 'EU_AI_ACT')."
    • addedInput schema / properties / jurisdictions / items / examples
      Added value: +[
      +  "GDPR",
      +  "CCPA",
      +  "UK_GDPR",
      +  "PIPEDA",
      +  "EU_AI_ACT"
      +]
    • addedInput schema / properties / jurisdictions / items / minLength
      Added value: +2
    • addedInput schema / properties / jurisdictions / minItems
      Added value: +1
    • changedInput schema / properties / physical_address / description
      Previous value: -"Registered business mailing address"New value: +"Registered corporate mailing address for statutory notices and controller identification."
    • addedInput schema / properties / physical_address / examples
      Added value: +[
      +  "100 Market St, San Francisco, CA 94105"
      +]
    • addedInput schema / properties / physical_address / minLength
      Added value: +3
    • changedInput schema / properties / processes_payments / description
      Previous value: -"Whether the site processes payments via Stripe, PayPal, or merchant processors"New value: +"Whether payments or recurring subscriptions are processed (adds billing, Stripe sub-processor, and refund sections)."
    • addedInput schema / properties / processes_payments / examples
      Added value: +[
      +  true
      +]
    • changedInput schema / properties / refund_period_days / description
      Previous value: -"Refund policy guarantee window in days (e.g. 14, 30)"New value: +"Consumer refund / withdrawal guarantee window in calendar days used in Terms of Service and Return Policy."
    • addedInput schema / properties / refund_period_days / examples
      Added value: +[
      +  14,
      +  30
      +]
    • addedInput schema / properties / refund_period_days / maximum
      Added value: +365
    • addedInput schema / properties / refund_period_days / minimum
      Added value: +0
    • changedInput schema / properties / refund_period_days / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / siteId / description
      Previous value: -"Site UUID to attach generated documents to (optional, generates isolated ad-hoc tenant if omitted)"New value: +"Optional registered site UUID (from 'list_sites' or 'add_site'). When provided and found, generated documents are persisted to that site's record and raise its compliance grade to A+. When omitted, documents are synthesized for an isolated ephemeral tenant ID without modifying registered sites."
    • addedInput schema / properties / siteId / examples
      Added value: +[
      +  "site_paperloo_sandbox"
      +]
    • addedInput schema / properties / siteId / minLength
      Added value: +1
    • changedInput schema / properties / uses_google_analytics / description
      Previous value: -"Whether Google Analytics 4 or Google Tag Manager is utilized"New value: +"Whether Google Analytics 4 or Google Tag Manager is included in the sub-processor disclosures."
    • addedInput schema / properties / uses_google_analytics / examples
      Added value: +[
      +  true
      +]
    • addedInput schema / properties / uses_hotjar
      Added value: +{
      +  "default": false,
      +  "description": "Whether Hotjar session recording or heatmap telemetry is disclosed in the Privacy Policy sub-processor section.",
      +  "examples": [
      +    false
      +  ],
      +  "type": "boolean"
      +}
    • changedInput schema / properties / uses_meta_pixel / description
      Previous value: -"Whether Meta (Facebook) advertising pixels are deployed"New value: +"Whether Meta (Facebook) advertising pixels are active and must be disclosed under GDPR/CCPA."
    • addedInput schema / properties / uses_meta_pixel / examples
      Added value: +[
      +  false
      +]
    • changedInput schema / properties / website_url / description
      Previous value: -"Public website domain URL"New value: +"Canonical HTTP or HTTPS URL of the website covered by the generated legal documents."
    • addedInput schema / properties / website_url / examples
      Added value: +[
      +  "https://acme-saas.com"
      +]
    • addedInput schema / properties / website_url / format
      Added value: +"uri"
    • addedInput schema / properties / website_url / minLength
      Added value: +4
    • addedInput schema / properties / website_url / pattern
      Added value: +"^https?://[^\\s]+$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "description": "Result of synthesizing statutory legal documents, including either persisted or ephemeral tenant metadata and full Markdown documents.",
      +  "properties": {
      +    "available_sites": {
      +      "description": "Registered sites returned when an explicit siteId does not match.",
      +      "items": {
      +        "additionalProperties": false,
      +        "description": "Summary entry for a registered monitored website.",
      +        "properties": {
      +          "id": {
      +            "description": "Registered site identifier.",
      +            "type": "string"
      +          },
      +          "name": {
      +            "description": "Human-readable property name.",
      +            "type": "string"
      +          },
      +          "url": {
      +            "description": "Registered primary URL.",
      +            "format": "uri",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "name",
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "company_name": {
      +      "description": "Legal entity name used in generated clauses.",
      +      "type": "string"
      +    },
      +    "documents": {
      +      "description": "Complete generated documents including Markdown bodies.",
      +      "items": {
      +        "additionalProperties": false,
      +        "description": "Full generated legal document object.",
      +        "properties": {
      +          "markdown": {
      +            "description": "Complete policy content in Markdown format.",
      +            "type": "string"
      +          },
      +          "title": {
      +            "description": "Human-readable document title.",
      +            "type": "string"
      +          },
      +          "type": {
      +            "description": "Statutory document type key.",
      +            "enum": [
      +              "privacy_policy",
      +              "terms_of_service",
      +              "cookie_policy",
      +              "eula",
      +              "acceptable_use",
      +              "disclaimer",
      +              "return_policy",
      +              "accessibility_statement"
      +            ],
      +            "type": "string"
      +          },
      +          "updated_at": {
      +            "description": "ISO-8601 generation timestamp.",
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          "version": {
      +            "description": "Document version number.",
      +            "type": "string"
      +          },
      +          "word_count": {
      +            "description": "Total word count of the Markdown body.",
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "title",
      +          "version",
      +          "word_count",
      +          "markdown",
      +          "updated_at"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "documents_generated": {
      +      "description": "Summary list of generated documents with preview links.",
      +      "items": {
      +        "additionalProperties": false,
      +        "description": "Summary entry for one generated legal document.",
      +        "properties": {
      +          "preview_url": {
      +            "description": "Direct Paperloo viewer URL for the document.",
      +            "format": "uri",
      +            "type": "string"
      +          },
      +          "title": {
      +            "description": "Human-readable document title.",
      +            "type": "string"
      +          },
      +          "type": {
      +            "description": "Statutory document type key.",
      +            "enum": [
      +              "privacy_policy",
      +              "terms_of_service",
      +              "cookie_policy",
      +              "eula",
      +              "acceptable_use",
      +              "disclaimer",
      +              "return_policy",
      +              "accessibility_statement"
      +            ],
      +            "type": "string"
      +          },
      +          "word_count": {
      +            "description": "Total word count of the synthesized document.",
      +            "minimum": 0,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "type",
      +          "title",
      +          "word_count",
      +          "preview_url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "error": {
      +      "description": "Validation or lookup error message when success is false.",
      +      "type": "string"
      +    },
      +    "message": {
      +      "description": "Human-readable completion status.",
      +      "type": "string"
      +    },
      +    "siteId": {
      +      "description": "Target registered siteId or generated ephemeral 'site_temp_*' identifier.",
      +      "type": "string"
      +    },
      +    "success": {
      +      "description": "True if document generation succeeded; false if siteId lookup or required field validation failed.",
      +      "type": "boolean"
      +    },
      +    "tenant_mode": {
      +      "description": "Indicates whether generated documents were saved to a registered site or returned for an isolated ephemeral tenant.",
      +      "enum": [
      +        "persistent_registered_site",
      +        "isolated_ephemeral_client"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. Changed7 schema fields changed
    • changedInput schema / properties / collects_minors / description
      Previous value: -"Whether services are accessible to or directed at minors under 13/16"New value: +"Whether services are accessible to or directed at minors under 13/16 (triggers COPPA & GDPR Art. 8 clauses)"
    • changedInput schema / properties / data_retention_months / default
      Previous value: -12New value: +24
    • addedInput schema / properties / document_types
      Added value: +{
      +  "description": "Documents to synthesize: ['privacy_policy', 'terms_of_service', 'cookie_policy', 'eula', 'acceptable_use', 'disclaimer', 'return_policy', 'accessibility_statement']",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / jurisdictions / description
      Previous value: -"Target jurisdictions (e.g. ['GDPR', 'CCPA'])"New value: +"Target jurisdictions (e.g. ['GDPR', 'CCPA', 'EU_AI_ACT'])"
    • changedInput schema / properties / physical_address / default
      Previous value: -"100 Compliance Way, San Francisco, CA 94105"New value: +"100 Market St, San Francisco, CA 94105"
    • changedInput schema / properties / refund_period_days / description
      Previous value: -"Refund policy guarantee window in days (minimum 14 for EU)"New value: +"Refund policy guarantee window in days (e.g. 14, 30)"
    • changedInput schema / properties / siteId / description
      Previous value: -"Site UUID to attach generated documents to (optional)"New value: +"Site UUID to attach generated documents to (optional, generates isolated ad-hoc tenant if omitted)"
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false and idempotentHint=true, but the description goes well beyond them by disclosing the two operating modes and their side effects: omitting siteId yields an isolated ephemeral tenant with zero registry writes, while supplying a siteId persists documents onto the site and mutates its compliance score (>=95) and grade ('A+'), erroring on unknown IDs. That is exactly the state-mutation detail an agent needs before calling a non-read-only tool.

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?

Three labeled paragraphs (purpose, when-to-use, preconditions/side effects, returns) are front-loaded and scannable, with no filler prose. The Returns paragraph is somewhat redundant since an output schema exists, costing it a point.

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

Completeness5/5

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

For a 17-parameter generator, the description covers purpose, sibling routing, required inputs, the ephemeral-vs-persisted fork, and error behavior on unknown siteId; return values are already covered by the output schema. An agent has everything needed to call it correctly on the first attempt.

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?

Schema description coverage is 100%, so every parameter (including siteId persistence semantics, jurisdiction identifiers, document_types defaults) is already documented in the schema. The description restates the three required fields and siteId behavior but adds no format or constraint detail the schema lacks, so the baseline 3 applies.

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 opens with a specific verb plus resource set: synthesizes a tailored suite of named statutory documents (Privacy Policy, ToS, Cookie Policy, EULA, AUP, Disclaimer, Return Policy, Accessibility Statement) from named inputs (company metadata, jurisdictions, data practices, sub-processor flags). It is immediately distinguishable from siblings like generate_dpa (single contract) and export_documents (conversion).

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?

It gives an explicit decision table: use this tool when all parameters are ready; use get_questionnaire_schema + generate_docs_questionnaire for interactive intake; use generate_dpa for Article 28 DPAs; use export_documents afterward for HTML/JSON. Each alternative is tied to a condition that selects it, leaving nothing to inference.

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.