tavant-docs-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/assets/bg-agenda-data.jpeg +0 -0
- package/assets/bg-breaker-brain.jpeg +0 -0
- package/assets/bg-breaker-cloud.jpeg +0 -0
- package/assets/bg-breaker-lines.jpeg +0 -0
- package/assets/bg-thankyou.jpeg +0 -0
- package/assets/bg-title-tech.jpeg +0 -0
- package/assets/cr-image1.png +0 -0
- package/assets/decor-cubes.png +0 -0
- package/assets/footer-bar.png +0 -0
- package/assets/tavant-logo-orange.png +0 -0
- package/assets/tavant-logo-small.png +0 -0
- package/assets/tavant-logo-white-sm.png +0 -0
- package/assets/tavant-logo-white.png +0 -0
- package/assets/tavant-template.potx +0 -0
- package/brand.js +21 -0
- package/index.js +172 -0
- package/knowledge/tavant-company.md +181 -0
- package/knowledge/tavant-template.md +61 -0
- package/package.json +32 -0
- package/templates/contract/builders.js +317 -0
- package/templates/contract/register.js +213 -0
- package/templates/contract/sections.js +73 -0
- package/templates/cr/builders.js +286 -0
- package/templates/cr/register.js +189 -0
- package/templates/cr/sections.js +55 -0
- package/templates/msa/builders.js +480 -0
- package/templates/msa/register.js +185 -0
- package/templates/msa/sections.js +86 -0
- package/templates/nda/builders.js +277 -0
- package/templates/nda/register.js +185 -0
- package/templates/nda/sections.js +73 -0
- package/templates/pptx/builders.js +712 -0
- package/templates/pptx/layouts.js +168 -0
- package/templates/pptx/register.js +363 -0
- package/templates/sow/builders.js +294 -0
- package/templates/sow/register.js +183 -0
- package/templates/sow/sections.js +76 -0
- package/test-custom-slide.js +79 -0
- package/test-e2e.js +190 -0
- package/test-msa.js +48 -0
- package/test-nda-cr.js +88 -0
- package/test-pptx.js +93 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
const { Document, Packer, Header, Footer, Paragraph, TextRun, AlignmentType } = require("docx");
|
|
2
|
+
const { z } = require("zod");
|
|
3
|
+
const { v4: uuidv4 } = require("uuid");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
const SECTIONS = require("./sections");
|
|
7
|
+
const sectionBuilders = require("./builders");
|
|
8
|
+
const BRAND = require("../../brand");
|
|
9
|
+
|
|
10
|
+
const ndas = new Map();
|
|
11
|
+
|
|
12
|
+
function register(server) {
|
|
13
|
+
server.tool(
|
|
14
|
+
"nda_list_sections",
|
|
15
|
+
"List all available sections for Tavant Mutual NDA with their descriptions and fields",
|
|
16
|
+
{},
|
|
17
|
+
async () => ({
|
|
18
|
+
content: [{
|
|
19
|
+
type: "text",
|
|
20
|
+
text: JSON.stringify(Object.values(SECTIONS).map((s) => ({
|
|
21
|
+
id: s.id, name: s.name, description: s.description, fields: s.fields,
|
|
22
|
+
})), null, 2),
|
|
23
|
+
}],
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
server.tool(
|
|
28
|
+
"nda_create",
|
|
29
|
+
"Create a new Tavant Mutual NDA document. Returns an nda_id. Use nda_add_section to build it, then nda_export to save as .docx",
|
|
30
|
+
{
|
|
31
|
+
company_name: z.string().optional().describe("The other party's company name"),
|
|
32
|
+
effective_date: z.string().optional().describe("NDA effective date"),
|
|
33
|
+
},
|
|
34
|
+
async ({ company_name, effective_date }) => {
|
|
35
|
+
const id = uuidv4();
|
|
36
|
+
ndas.set(id, {
|
|
37
|
+
company_name: company_name || "[Company Name]",
|
|
38
|
+
effective_date: effective_date || "[Date]",
|
|
39
|
+
sections: [],
|
|
40
|
+
});
|
|
41
|
+
return {
|
|
42
|
+
content: [{
|
|
43
|
+
type: "text",
|
|
44
|
+
text: JSON.stringify({
|
|
45
|
+
nda_id: id,
|
|
46
|
+
company_name: ndas.get(id).company_name,
|
|
47
|
+
message: "NDA created. Use nda_add_section to add sections, then nda_export to save.",
|
|
48
|
+
}),
|
|
49
|
+
}],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
server.tool(
|
|
55
|
+
"nda_add_section",
|
|
56
|
+
"Add a section to an NDA document",
|
|
57
|
+
{
|
|
58
|
+
nda_id: z.string().describe("The NDA ID from nda_create"),
|
|
59
|
+
section: z.string().describe(
|
|
60
|
+
"Section ID: cover_page, preamble, proprietary_information, protection, exclusions, rights, legends, general_terms, term, entire_agreement, signatures"
|
|
61
|
+
),
|
|
62
|
+
data: z.record(z.any()).optional().describe(
|
|
63
|
+
"Section content data. Use nda_list_sections to see fields per section. Many sections have no required fields (standard legal text)."
|
|
64
|
+
),
|
|
65
|
+
},
|
|
66
|
+
async ({ nda_id, section, data }) => {
|
|
67
|
+
const nda = ndas.get(nda_id);
|
|
68
|
+
if (!nda) return { content: [{ type: "text", text: "Error: NDA not found." }], isError: true };
|
|
69
|
+
const builder = sectionBuilders[section];
|
|
70
|
+
if (!builder) {
|
|
71
|
+
return {
|
|
72
|
+
content: [{ type: "text", text: `Error: Unknown section "${section}". Available: ${Object.keys(SECTIONS).join(", ")}` }],
|
|
73
|
+
isError: true,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
nda.sections.push({ section, data: data || {} });
|
|
77
|
+
return {
|
|
78
|
+
content: [{
|
|
79
|
+
type: "text",
|
|
80
|
+
text: JSON.stringify({ message: `Section added: ${section}`, total_sections: nda.sections.length }),
|
|
81
|
+
}],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
server.tool(
|
|
87
|
+
"nda_export",
|
|
88
|
+
"Export NDA as a .docx Word document",
|
|
89
|
+
{
|
|
90
|
+
nda_id: z.string().describe("The NDA ID"),
|
|
91
|
+
output_path: z.string().optional().describe("Output file path. Defaults to ./output/NDA_<company>.docx"),
|
|
92
|
+
},
|
|
93
|
+
async ({ nda_id, output_path }) => {
|
|
94
|
+
const nda = ndas.get(nda_id);
|
|
95
|
+
if (!nda) return { content: [{ type: "text", text: "Error: NDA not found." }], isError: true };
|
|
96
|
+
|
|
97
|
+
const children = [];
|
|
98
|
+
for (const { section, data } of nda.sections) {
|
|
99
|
+
const builder = sectionBuilders[section];
|
|
100
|
+
if (builder) {
|
|
101
|
+
const paragraphs = builder({
|
|
102
|
+
...data,
|
|
103
|
+
company_name: data.company_name || nda.company_name,
|
|
104
|
+
effective_date: data.effective_date || nda.effective_date,
|
|
105
|
+
});
|
|
106
|
+
children.push(...paragraphs);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const doc = new Document({
|
|
111
|
+
creator: "Tavant",
|
|
112
|
+
title: `Mutual NDA - ${nda.company_name}`,
|
|
113
|
+
description: `Mutual Non-Disclosure Agreement between Tavant and ${nda.company_name}`,
|
|
114
|
+
styles: {
|
|
115
|
+
default: {
|
|
116
|
+
document: {
|
|
117
|
+
run: { font: BRAND.font, size: 22, color: "333333" },
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
sections: [{
|
|
122
|
+
properties: {
|
|
123
|
+
page: { margin: { top: 1440, right: 1440, bottom: 1440, left: 1440 } },
|
|
124
|
+
},
|
|
125
|
+
headers: {
|
|
126
|
+
default: new Header({
|
|
127
|
+
children: [
|
|
128
|
+
new Paragraph({
|
|
129
|
+
alignment: AlignmentType.RIGHT,
|
|
130
|
+
children: [
|
|
131
|
+
new TextRun({ text: BRAND.footer, font: BRAND.font, size: 16, color: "999999", italics: true }),
|
|
132
|
+
],
|
|
133
|
+
}),
|
|
134
|
+
],
|
|
135
|
+
}),
|
|
136
|
+
},
|
|
137
|
+
footers: {
|
|
138
|
+
default: new Footer({
|
|
139
|
+
children: [
|
|
140
|
+
new Paragraph({
|
|
141
|
+
alignment: AlignmentType.CENTER,
|
|
142
|
+
children: [
|
|
143
|
+
new TextRun({
|
|
144
|
+
text: `Mutual NDA | ${nda.company_name} | ${BRAND.company}`,
|
|
145
|
+
font: BRAND.font, size: 16, color: "999999",
|
|
146
|
+
}),
|
|
147
|
+
],
|
|
148
|
+
}),
|
|
149
|
+
],
|
|
150
|
+
}),
|
|
151
|
+
},
|
|
152
|
+
children,
|
|
153
|
+
}],
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
const buffer = await Packer.toBuffer(doc);
|
|
157
|
+
const sanitized = (nda.company_name || "NDA").replace(/[^a-zA-Z0-9_-]/g, "_").substring(0, 50);
|
|
158
|
+
const defaultDir = path.join(process.cwd(), "output");
|
|
159
|
+
if (!fs.existsSync(defaultDir)) fs.mkdirSync(defaultDir, { recursive: true });
|
|
160
|
+
const filePath = output_path || path.join(defaultDir, `NDA_${sanitized}.docx`);
|
|
161
|
+
const dir = path.dirname(filePath);
|
|
162
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
163
|
+
fs.writeFileSync(filePath, buffer);
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
content: [{
|
|
167
|
+
type: "text",
|
|
168
|
+
text: JSON.stringify({ message: "NDA exported", file_path: filePath, total_sections: nda.sections.length }),
|
|
169
|
+
}],
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
server.tool(
|
|
175
|
+
"nda_delete",
|
|
176
|
+
"Delete an NDA from memory",
|
|
177
|
+
{ nda_id: z.string().describe("The NDA ID") },
|
|
178
|
+
async ({ nda_id }) => {
|
|
179
|
+
if (ndas.delete(nda_id)) return { content: [{ type: "text", text: "NDA deleted." }] };
|
|
180
|
+
return { content: [{ type: "text", text: "Not found." }], isError: true };
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
module.exports = { register };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// NDA template section definitions — extracted from Tavant Mutual NDA Template
|
|
2
|
+
// 11 sections matching the real corporate NDA structure
|
|
3
|
+
|
|
4
|
+
const SECTIONS = {
|
|
5
|
+
cover_page: {
|
|
6
|
+
id: "cover_page",
|
|
7
|
+
name: "Cover Page",
|
|
8
|
+
description: "NDA title, parties summary, effective date, and Tavant branding",
|
|
9
|
+
fields: ["nda_title", "company_name", "effective_date"],
|
|
10
|
+
},
|
|
11
|
+
preamble: {
|
|
12
|
+
id: "preamble",
|
|
13
|
+
name: "Preamble",
|
|
14
|
+
description: "Introduction clause identifying parties, addresses, and purpose of the NDA (Business Transactions discussion)",
|
|
15
|
+
fields: ["company_name", "company_address", "effective_date"],
|
|
16
|
+
},
|
|
17
|
+
proprietary_information: {
|
|
18
|
+
id: "proprietary_information",
|
|
19
|
+
name: "1. Proprietary Information",
|
|
20
|
+
description: "Definition of Proprietary Information — product strategy, pricing, financial data, trade secrets, software, customer info, etc. Covers oral, written, and reasonably-identifiable disclosures.",
|
|
21
|
+
fields: ["additional_categories"],
|
|
22
|
+
},
|
|
23
|
+
protection: {
|
|
24
|
+
id: "protection",
|
|
25
|
+
name: "2. Protection",
|
|
26
|
+
description: "Recipient obligations: maintain confidentiality, limit disclosure to need-to-know, use only for Business Transactions evaluation, notify of breaches",
|
|
27
|
+
fields: [],
|
|
28
|
+
},
|
|
29
|
+
exclusions: {
|
|
30
|
+
id: "exclusions",
|
|
31
|
+
name: "3. Exclusions",
|
|
32
|
+
description: "Carve-outs: publicly available info, prior knowledge, third-party disclosure, independent development, legally compelled disclosure (with 10-day notice)",
|
|
33
|
+
fields: [],
|
|
34
|
+
},
|
|
35
|
+
rights: {
|
|
36
|
+
id: "rights",
|
|
37
|
+
name: "4. Rights",
|
|
38
|
+
description: "Proprietary Information remains Discloser's property. Return/destroy obligations within 5 business days. No license granted. Trade secret obligations survive.",
|
|
39
|
+
fields: [],
|
|
40
|
+
},
|
|
41
|
+
legends: {
|
|
42
|
+
id: "legends",
|
|
43
|
+
name: "5. Legends",
|
|
44
|
+
description: "Obligation to preserve restrictive legends, proprietary notices, trademarks, and copyright symbols on all materials",
|
|
45
|
+
fields: [],
|
|
46
|
+
},
|
|
47
|
+
general_terms: {
|
|
48
|
+
id: "general_terms",
|
|
49
|
+
name: "6. General Terms",
|
|
50
|
+
description: "Independent development rights, AS-IS warranty disclaimer, limited obligations, public statement restrictions, name/mark usage prohibition, non-assignment, governing law (California), severability, no-solicitation (12 months), notices",
|
|
51
|
+
fields: ["governing_law"],
|
|
52
|
+
},
|
|
53
|
+
term: {
|
|
54
|
+
id: "term",
|
|
55
|
+
name: "7. Term",
|
|
56
|
+
description: "5-year term from Effective Date, terminable on 30 days notice. Confidentiality obligations survive indefinitely.",
|
|
57
|
+
fields: ["term_years", "notice_days"],
|
|
58
|
+
},
|
|
59
|
+
entire_agreement: {
|
|
60
|
+
id: "entire_agreement",
|
|
61
|
+
name: "8. Entire Agreement",
|
|
62
|
+
description: "Entire agreement clause, counterparts, facsimile signatures, written amendments only",
|
|
63
|
+
fields: [],
|
|
64
|
+
},
|
|
65
|
+
signatures: {
|
|
66
|
+
id: "signatures",
|
|
67
|
+
name: "Signatures",
|
|
68
|
+
description: "Signature blocks for Tavant Technologies Inc. and the Company with name, title, address fields",
|
|
69
|
+
fields: ["company_name", "company_signatory", "company_title", "company_address", "tavant_signatory", "tavant_title"],
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
module.exports = SECTIONS;
|