# Knackly MCP

> Knackly helps you generate legal and business documents from smart templates. It uses conditional logic to adapt content based on specific data inputs, making sure every document is accurate for its unique situation.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** document-automation, template-assembly, legal-tech, conditional-logic, contract-generation

## Description

This MCP lets your agent automate complex document creation using sophisticated templates. You connect it once through Vinkius to access a library of pre-built apps and structures designed for different industries. Instead of manually filling out forms or copying data from spreadsheets, you tell the system what kind of document you need—say, an employment contract for California—and it handles the rest.

It reads your template structure, pulls required details (like names, dates, governing laws), and builds a polished PDF ready to use. Because it supports conditional logic, if the agreement is international, it automatically includes specific clauses; otherwise, it leaves them out. This capability makes it essential for legal teams or operations departments that deal with variable documentation on a regular basis.

## Tools

### create_data_record
Adds a new, structured record to the system's data repository.

### get_record_details
Fetches all specific information and metadata for one identified record.

### list_catalogs
Shows a list of all available data catalogs within the connected workspace.

### list_generated_documents
Retrieves metadata about all previously automated document generations.

### list_data_models
Provides a structured list of data models contained inside a selected catalog.

### list_data_records
Lists the records that exist for a specific data model blueprint.

### list_webhooks
Lists the webhooks that are currently configured for data flow and triggers.

### list_workspaces
Shows a list of distinct workspaces accessible through the Knackly account.

## Prompt Examples

**Prompt:** 
```
Show all apps and templates available for document generation.
```

**Response:** 
```
Apps: 4. Legal (5 templates), Sales (3), HR (4), Finance (2). Legal templates: 'NDA — Mutual' (8 fields), 'Service Agreement' (12 fields), 'Employment Contract' (15 fields), 'Lease Agreement' (10 fields), 'IP Assignment' (6 fields). Most used: 'NDA — Mutual' (234 generations). Would you like to generate a document?
```

**Prompt:** 
```
Generate an NDA for Acme Corp and show the required fields.
```

**Response:** 
```
NDA — Mutual fields: 8. Party A Name (text, required): 'Our Company'. Party B Name: 'Acme Corp'. Effective Date: Apr 26, 2025. Duration (dropdown): 2 years. Governing Law: Delaware. Party A Signatory: 'CEO, Jane Smith'. Party B Signatory: 'CTO, John Doe'. Scope (textarea): 'Software development collaboration'. Document generated! ✅ NDA_AcmeCorp_20250426.pdf (3 pages). Download available.
```

**Prompt:** 
```
Show document generation history for this month.
```

**Response:** 
```
This month: 45 documents generated. By template: NDA (18), Service Agreement (12), Employment Contract (8), Lease Agreement (4), Other (3). By user: Sarah (15), Mike (12), Lisa (10), Others (8). Average generation time: 2.3 seconds. Success rate: 100%.
```

## Capabilities

### Create new data records
Adds structured data points into the system's repository.

### Review specific record details
Retrieves all metadata and content associated with a single, identified record.

### Inventory available catalogs
Lists all data catalogs present within a workspace.

### Examine data models
Shows the specific structural blueprints (models) contained inside a catalog.

### List existing records for a model
Retrieves a list of all stored records belonging to a specified data model.

### Track generated documents and history
Lists past automated document generations, including metadata about the outputs.

### Manage system webhooks
Displays all configured webhooks that connect this MCP to other services.

## Use Cases

### Drafting a multi-jurisdictional agreement
A corporate counsel needs an NDA. Instead of drafting separate versions for every state, they ask their agent to 'Generate an NDA between Company A and Company B in Texas.' The MCP uses conditional logic to ensure the Governing Law section is correct, then outputs the finalized document.

### Onboarding a new client
An operations analyst needs a Statement of Work (SOW). They instruct their agent: 'Generate an SOW for Acme Corp.' The system pulls basic company data via `get_record_details`, populates the template, and outputs a ready-to-send PDF.

### Auditing document templates
A manager wants to see what documentation is available. They ask the agent to 'Show all apps and templates.' The MCP responds with an inventory, helping them determine which legal template they need next.

### Syncing data changes after signing
After a contract is signed and generated, the system needs to update CRM records. The user configures a webhook using `list_webhooks`, ensuring that the document generation automatically triggers the necessary data sync.

## Benefits

- Eliminate manual data entry. Instead of finding and copying data across multiple systems, the agent pulls required fields directly from existing records when you call `get_record_details` or `create_data_record`.
- Maintain governance structure. You can inventory your entire knowledge base by using `list_catalogs` to see all available data sources before drafting a document.
- Track compliance automatically. The MCP tracks every output, allowing you to use `list_generated_documents` to review history and verify versioning for audit purposes.
- Build complex logic without code. Use smart templates with conditional rules, meaning the resulting contract changes structure based on simple inputs (e.g., jurisdiction or term length).
- Connect data flows easily. You can use `list_webhooks` to ensure that when a document is generated, it automatically triggers an update in another system.
- Manage your data architecture. Use `list_data_models` and `list_data_records` to audit which pieces of information are available for inclusion in the final output.

## How It Works

The bottom line is that you get production-ready documents without manually assembling the content piece by piece.

1. Subscribe to the Knackly MCP and provide your API key.
2. Your agent interacts with the system, specifying which type of document is needed (e.g., 'Generate a Service Agreement').
3. The MCP pulls necessary data from configured templates, executes conditional logic based on inputs, and returns the finalized, structured document.

## Frequently Asked Questions

**How do I see what templates are available in Knackly?**
You can use the agent to view an inventory by asking it to list apps and templates. This gives you a clear breakdown of all document types, like 'NDA — Mutual' or 'Service Agreement'.

**What is the difference between `list_catalogs` and `list_data_models`?**
`list_catalogs` shows high-level groupings (like 'Legal Data'). You then use `list_data_models` to see the specific blueprints—the actual structure of data records—within that catalog.

**Can I track how many documents were generated last month using Knackly?**
Yes. The MCP tracks this history for you. Use `list_generated_documents` to retrieve a comprehensive list and metrics about all past document outputs.

**Does Knackly handle data that comes from outside the system?**
Yes. You can manage external connections by using tools like `list_webhooks`, which allows you to confirm that an event in one application successfully triggers a document update here.

**When should I use the `list_workspaces` tool?**
You run this when you need to see all available Knackly containers or environments. It tells your agent which overall workspaces are accessible before you try to list catalogs within them.

**If I want to verify a record exists, should I use `get_record_details` before running `create_data_record`?**
Yes. Always run `get_record_details` first using the specific ID. This confirms the data structure and that the record hasn't been deleted or modified since you last checked.

**How can I check which external triggers are set up by using `list_webhooks`?**
The `list_webhooks` tool shows all configured webhooks for the workspace. This lets your agent see what events, like document generation completion, will trigger outside systems.

**How do I find out which data models are available inside a specific catalog using `list_data_models`?**
You use `list_data_models` after you know the catalog name. This command lists all the blueprints or model types within that catalog, helping your agent narrow down where the specific record lives.

**Can I generate documents from templates through the AI agent?**
Yes. Browse available templates, inspect their required fields, and generate documents by providing field values. Output documents are created automatically.

**Can I browse available apps and templates?**
Yes. List all Knackly apps and their associated templates with field configurations, data types, and validation rules.

**What API endpoint does Knackly use?**
Knackly uses Bearer authentication against `api.knackly.io/v1`.