@bitsbound/mcp-server 1.0.14 → 1.2.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/README.md +16 -1
- package/dist/orchestration/backautocrat/Bitsbound_Kings_McpServer_Backend_Orchestration_Backautocrat.d.ts.map +1 -1
- package/dist/orchestration/backautocrat/Bitsbound_Kings_McpServer_Backend_Orchestration_Backautocrat.js +7 -3
- package/dist/orchestration/backautocrat/Bitsbound_Kings_McpServer_Backend_Orchestration_Backautocrat.js.map +1 -1
- package/dist/server/Bitsbound_Kings_McpServer_Backend_Server.js +13 -28
- package/dist/server/Bitsbound_Kings_McpServer_Backend_Server.js.map +1 -1
- package/dist/types/Bitsbound_Kings_McpServer_Backend_Types.d.ts +109 -296
- package/dist/types/Bitsbound_Kings_McpServer_Backend_Types.d.ts.map +1 -1
- package/dist/types/Bitsbound_Kings_McpServer_Backend_Types.js +250 -412
- package/dist/types/Bitsbound_Kings_McpServer_Backend_Types.js.map +1 -1
- package/orchestration/backautocrat/Bitsbound_Kings_McpServer_Backend_Orchestration_Backautocrat.ts +7 -3
- package/package.json +1 -1
- package/server/Bitsbound_Kings_McpServer_Backend_Server.ts +14 -51
- package/types/Bitsbound_Kings_McpServer_Backend_Types.ts +294 -424
|
@@ -2,14 +2,34 @@ export interface McpServerConfig {
|
|
|
2
2
|
readonly BITSBOUND_API_URL: string;
|
|
3
3
|
readonly BITSBOUND_API_KEY: string;
|
|
4
4
|
}
|
|
5
|
-
export declare const DEFAULT_API_URL = "https://bitsbound-
|
|
5
|
+
export declare const DEFAULT_API_URL = "https://bitsbound-contract-backend.onrender.com";
|
|
6
|
+
/**
|
|
7
|
+
* ContractVertical - The type of contract being analyzed
|
|
8
|
+
* D: Each vertical has its own analyzer set and representing party options
|
|
9
|
+
*
|
|
10
|
+
* Verticals and their Representing Party options:
|
|
11
|
+
* - saas: Customer (Buyer) | Vendor (Seller)
|
|
12
|
+
* - ma: Buyer | Seller
|
|
13
|
+
* - vc: Investor | Founder/Company
|
|
14
|
+
* - employment: Employer | Employee
|
|
15
|
+
* - nda: Disclosing Party | Receiving Party
|
|
16
|
+
* - equipment-lease: Lessee | Lessor
|
|
17
|
+
* - equipment-financing: Debtor | Secured Party
|
|
18
|
+
* - security-agreement: Debtor | Secured Party
|
|
19
|
+
* - loan: Borrower | Lender
|
|
20
|
+
* - commercial-lease: Tenant | Landlord
|
|
21
|
+
* - professional-services: Client | Service Provider
|
|
22
|
+
* - miscellaneous: Party A | Party B (let AI decide best classification)
|
|
23
|
+
*/
|
|
24
|
+
export type ContractVertical = 'saas' | 'ma' | 'vc' | 'employment' | 'nda' | 'equipment-lease' | 'equipment-financing' | 'security-agreement' | 'loan' | 'commercial-lease' | 'professional-services' | 'miscellaneous';
|
|
6
25
|
export interface AnalyzeContractInput {
|
|
7
26
|
readonly filePath?: string;
|
|
8
27
|
readonly docxBase64?: string;
|
|
9
28
|
readonly fileName?: string;
|
|
10
29
|
readonly analysisDepth?: 'quick' | 'standard' | 'deep';
|
|
11
30
|
readonly perspective?: 'customer' | 'vendor' | 'neutral';
|
|
12
|
-
readonly
|
|
31
|
+
readonly contractVertical?: ContractVertical;
|
|
32
|
+
readonly representingParty?: string;
|
|
13
33
|
readonly dealValue?: number;
|
|
14
34
|
readonly dealValueCurrency?: 'USD' | 'EUR' | 'GBP' | 'CAD' | 'AUD';
|
|
15
35
|
readonly industry?: string;
|
|
@@ -317,103 +337,76 @@ export interface SectionAnalysis {
|
|
|
317
337
|
readonly suggestedChanges: string[];
|
|
318
338
|
}
|
|
319
339
|
export declare const TOOL_DEFINITIONS: {
|
|
320
|
-
readonly
|
|
321
|
-
readonly name: "
|
|
322
|
-
readonly description: "
|
|
340
|
+
readonly redline_swarm: {
|
|
341
|
+
readonly name: "redline_swarm";
|
|
342
|
+
readonly description: "**REDLINE MODE** - Attack counterparty's contract with parallel AI agents.\n\nUpload a DOCX contract and BitsBound's Instant Swarm™ deploys parallel SAC (Supreme AI Co-Counsel) agents to analyze and redline every section simultaneously. Returns partner-level redlined DOCX with real OOXML Track Changes (w:ins/w:del), negotiation email, and risk analysis.\n\n**REQUIRED INPUTS (ask the user):**\n1. File path to the counterparty's DOCX contract\n2. Contract type: saas, ma, vc, employment, nda, equipment, commercial-lease, professional-services, or miscellaneous\n3. Who you represent: customer/vendor (saas), buyer/seller (ma), investor/founder (vc), etc.\n4. Aggressiveness level: 1-10 (1=conciliatory, 5=balanced, 10=aggressive)\n\n**OPTIONAL:** dealValue, additionalContext, emailRecipient info\n\n**DELIVERABLES:**\n• Redlined DOCX with real Track Changes (not markup - actual w:ins/w:del)\n• Negotiation email explaining each requested change\n• Favorability score and risk analysis\n\nAnalysis takes ~25-35 minutes. Response includes 'checkBackTime' for when to check status.";
|
|
323
343
|
readonly inputSchema: {
|
|
324
344
|
readonly type: "object";
|
|
325
345
|
readonly properties: {
|
|
326
346
|
readonly filePath: {
|
|
327
347
|
readonly type: "string";
|
|
328
|
-
readonly description: "RECOMMENDED: Absolute path to
|
|
348
|
+
readonly description: "RECOMMENDED: Absolute path to DOCX file (e.g., \"/Users/john/Documents/contract.docx\"). Server reads file directly.";
|
|
329
349
|
};
|
|
330
350
|
readonly docxBase64: {
|
|
331
351
|
readonly type: "string";
|
|
332
|
-
readonly description: "Alternative:
|
|
352
|
+
readonly description: "Alternative: Base64-encoded DOCX content. Use filePath instead when possible.";
|
|
333
353
|
};
|
|
334
354
|
readonly fileName: {
|
|
335
355
|
readonly type: "string";
|
|
336
|
-
readonly description: "Original filename
|
|
356
|
+
readonly description: "Original filename. Auto-extracted if using filePath.";
|
|
357
|
+
};
|
|
358
|
+
readonly contractVertical: {
|
|
359
|
+
readonly type: "string";
|
|
360
|
+
readonly enum: readonly ["saas", "ma", "vc", "employment", "nda", "equipment-lease", "equipment-financing", "security-agreement", "loan", "commercial-lease", "professional-services", "miscellaneous"];
|
|
361
|
+
readonly description: "Contract type. Determines analyzers and party options.";
|
|
337
362
|
};
|
|
338
363
|
readonly representingParty: {
|
|
339
364
|
readonly type: "string";
|
|
340
|
-
readonly
|
|
341
|
-
|
|
365
|
+
readonly description: "Who you represent: saas(customer/vendor), ma(buyer/seller), vc(investor/founder), employment(employer/employee), nda(disclosing-party/receiving-party), equipment-lease(lessee/lessor), equipment-financing(debtor/secured-party), security-agreement(debtor/secured-party), commercial-lease(tenant/landlord), professional-services(client/service-provider), loan(borrower/lender)";
|
|
366
|
+
};
|
|
367
|
+
readonly aggressivenessLevel: {
|
|
368
|
+
readonly type: "number";
|
|
369
|
+
readonly minimum: 1;
|
|
370
|
+
readonly maximum: 10;
|
|
371
|
+
readonly description: "Redline aggressiveness 1-10. Default: 5";
|
|
342
372
|
};
|
|
343
373
|
readonly dealValue: {
|
|
344
374
|
readonly type: "number";
|
|
345
|
-
readonly description: "
|
|
375
|
+
readonly description: "Optional: Deal value for risk calibration";
|
|
346
376
|
};
|
|
347
377
|
readonly dealValueCurrency: {
|
|
348
378
|
readonly type: "string";
|
|
349
379
|
readonly enum: readonly ["USD", "EUR", "GBP", "CAD", "AUD"];
|
|
350
|
-
readonly description: "Currency
|
|
351
|
-
};
|
|
352
|
-
readonly industry: {
|
|
353
|
-
readonly type: "string";
|
|
354
|
-
readonly enum: readonly ["technology", "healthcare", "financial", "retail", "manufacturing", "professional", "media", "education", "government", "other"];
|
|
355
|
-
readonly description: "Industry context for analysis. Affects regulatory considerations and benchmarks.";
|
|
380
|
+
readonly description: "Currency. Default: USD";
|
|
356
381
|
};
|
|
357
382
|
readonly additionalContext: {
|
|
358
383
|
readonly type: "string";
|
|
359
|
-
readonly description: "
|
|
384
|
+
readonly description: "Optional: Deal context, priorities, relationship notes";
|
|
360
385
|
};
|
|
361
386
|
readonly paperOwnership: {
|
|
362
387
|
readonly type: "string";
|
|
363
388
|
readonly enum: readonly ["their-paper", "our-paper"];
|
|
364
|
-
readonly description: "Who drafted
|
|
365
|
-
};
|
|
366
|
-
readonly aggressivenessLevel: {
|
|
367
|
-
readonly type: "number";
|
|
368
|
-
readonly minimum: 1;
|
|
369
|
-
readonly maximum: 10;
|
|
370
|
-
readonly description: "IMPORTANT: Redline aggressiveness 1-10. 1=very conciliatory (accept most terms), 5=balanced (default), 10=very aggressive (push hard on everything)";
|
|
371
|
-
};
|
|
372
|
-
readonly enableAutoSwarm: {
|
|
373
|
-
readonly type: "boolean";
|
|
374
|
-
readonly description: "Enable parallel 17-section SAC analysis for comprehensive redlines. Default: true";
|
|
375
|
-
};
|
|
376
|
-
readonly analysisDepth: {
|
|
377
|
-
readonly type: "string";
|
|
378
|
-
readonly enum: readonly ["quick", "standard", "deep"];
|
|
379
|
-
readonly description: "Analysis depth: quick (~10 min), standard (~30 min), deep (~45 min). Default: standard";
|
|
389
|
+
readonly description: "Who drafted? their-paper=counterparty (default), our-paper=we drafted";
|
|
380
390
|
};
|
|
381
391
|
readonly enableEmailGenerator: {
|
|
382
392
|
readonly type: "boolean";
|
|
383
|
-
readonly description: "Generate
|
|
384
|
-
};
|
|
385
|
-
readonly emailRecipient: {
|
|
386
|
-
readonly type: "string";
|
|
387
|
-
readonly enum: readonly ["client", "counterparty", "none"];
|
|
388
|
-
readonly description: "Who should the email be addressed to? counterparty=send to other side, client=internal summary, none=skip email";
|
|
393
|
+
readonly description: "Generate negotiation email? Default: true";
|
|
389
394
|
};
|
|
390
395
|
readonly emailContext: {
|
|
391
396
|
readonly type: "object";
|
|
392
|
-
readonly description: "
|
|
397
|
+
readonly description: "Email context";
|
|
393
398
|
readonly properties: {
|
|
394
399
|
readonly recipientName: {
|
|
395
400
|
readonly type: "string";
|
|
396
|
-
readonly description: "Name of email recipient (e.g., \"John Smith\")";
|
|
397
|
-
};
|
|
398
|
-
readonly recipientEmail: {
|
|
399
|
-
readonly type: "string";
|
|
400
|
-
readonly description: "Email address of recipient";
|
|
401
401
|
};
|
|
402
402
|
readonly senderName: {
|
|
403
403
|
readonly type: "string";
|
|
404
|
-
readonly description: "Your name (the sender)";
|
|
405
404
|
};
|
|
406
405
|
readonly additionalContext: {
|
|
407
406
|
readonly type: "string";
|
|
408
|
-
readonly description: "Tone/relationship notes for the email (e.g., \"We have a good relationship with this vendor\")";
|
|
409
407
|
};
|
|
410
408
|
};
|
|
411
409
|
};
|
|
412
|
-
readonly perspective: {
|
|
413
|
-
readonly type: "string";
|
|
414
|
-
readonly enum: readonly ["customer", "vendor", "neutral"];
|
|
415
|
-
readonly description: "DEPRECATED: Use representingParty instead";
|
|
416
|
-
};
|
|
417
410
|
};
|
|
418
411
|
readonly required: readonly [];
|
|
419
412
|
};
|
|
@@ -422,256 +415,86 @@ export declare const TOOL_DEFINITIONS: {
|
|
|
422
415
|
readonly destructiveHint: false;
|
|
423
416
|
};
|
|
424
417
|
};
|
|
425
|
-
readonly
|
|
426
|
-
readonly name: "
|
|
427
|
-
readonly description: "
|
|
428
|
-
readonly inputSchema: {
|
|
429
|
-
readonly type: "object";
|
|
430
|
-
readonly properties: {
|
|
431
|
-
readonly analysisId: {
|
|
432
|
-
readonly type: "string";
|
|
433
|
-
readonly description: "The processing ID returned from process_contract";
|
|
434
|
-
};
|
|
435
|
-
};
|
|
436
|
-
readonly required: readonly ["analysisId"];
|
|
437
|
-
};
|
|
438
|
-
readonly annotations: {
|
|
439
|
-
readonly readOnlyHint: true;
|
|
440
|
-
};
|
|
441
|
-
};
|
|
442
|
-
readonly ask_sac: {
|
|
443
|
-
readonly name: "ask_sac";
|
|
444
|
-
readonly description: "Ask the Supreme AI Co-Counsel (SAC) questions about an analyzed contract. SAC has full context of the contract and all analysis results. Great for clarifying risks, understanding clauses, or getting negotiation advice.";
|
|
418
|
+
readonly power_draft: {
|
|
419
|
+
readonly name: "power_draft";
|
|
420
|
+
readonly description: "**DRAFT MODE** - Generate a complete contract from scratch.\n\nNO FILE UPLOAD NEEDED. Provide deal context and BitsBound generates a partner-level contract using a multi-pass architecture:\n1. Opus 4.5 generates initial draft based on your requirements\n2. 16+ parallel analyzers critique the draft\n3. Sonnet 4.5 synthesizes analyzer feedback\n4. Opus 4.5 generates refined second draft\n5. Final QB Enhancer pass for consistency\n\n**REQUIRED INPUTS (ask the user):**\n1. Contract type: saas, ma, vc, employment, nda, equipment-lease, commercial-lease, professional-services\n2. Who you represent: customer/vendor (saas), buyer/seller (ma), investor/founder (vc), etc.\n3. Terms Favorability: 1-10 (1=minimal protections/fast close, 5=balanced, 10=maximum protections/bulletproof)\n\n**RECOMMENDED:** Additional context describing the deal (value, term, key requirements, counterparty info)\n\n**DELIVERABLES:**\n• Clean DOCX ready for negotiation (no Track Changes needed - it's your paper)\n• Cover email introducing the draft (optional)\n• Risk analysis of your own positions\n\nDraft generation takes ~30-40 minutes. Response includes 'checkBackTime' for when to check status.";
|
|
445
421
|
readonly inputSchema: {
|
|
446
422
|
readonly type: "object";
|
|
447
423
|
readonly properties: {
|
|
448
|
-
readonly
|
|
424
|
+
readonly contractVertical: {
|
|
449
425
|
readonly type: "string";
|
|
450
|
-
readonly
|
|
426
|
+
readonly enum: readonly ["saas", "ma", "vc", "employment", "nda", "equipment-lease", "equipment-financing", "security-agreement", "loan", "commercial-lease", "professional-services"];
|
|
427
|
+
readonly description: "Contract type to generate. REQUIRED.";
|
|
451
428
|
};
|
|
452
|
-
readonly
|
|
453
|
-
readonly type: "string";
|
|
454
|
-
readonly description: "Your question about the contract";
|
|
455
|
-
};
|
|
456
|
-
readonly includeClauseCitations: {
|
|
457
|
-
readonly type: "boolean";
|
|
458
|
-
readonly description: "Include specific clause citations in the response. Default: true";
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
|
-
readonly required: readonly ["analysisId", "question"];
|
|
462
|
-
};
|
|
463
|
-
readonly annotations: {
|
|
464
|
-
readonly readOnlyHint: true;
|
|
465
|
-
};
|
|
466
|
-
};
|
|
467
|
-
readonly generate_redline: {
|
|
468
|
-
readonly name: "generate_redline";
|
|
469
|
-
readonly description: "Generate a redlined Word document with real OOXML Track Changes (w:ins, w:del) applied directly to the original document. Returns the redlined DOCX as base64.";
|
|
470
|
-
readonly inputSchema: {
|
|
471
|
-
readonly type: "object";
|
|
472
|
-
readonly properties: {
|
|
473
|
-
readonly analysisId: {
|
|
429
|
+
readonly representingParty: {
|
|
474
430
|
readonly type: "string";
|
|
475
|
-
readonly description: "
|
|
431
|
+
readonly description: "Who you represent (sets protective posture). REQUIRED. Options by vertical: saas(customer/vendor), ma(buyer/seller), vc(investor/founder), employment(employer/employee), nda(disclosing-party/receiving-party), equipment-lease(lessee/lessor), commercial-lease(tenant/landlord), professional-services(client/service-provider)";
|
|
476
432
|
};
|
|
477
|
-
readonly
|
|
433
|
+
readonly aggressivenessLevel: {
|
|
478
434
|
readonly type: "number";
|
|
479
|
-
readonly
|
|
480
|
-
readonly
|
|
481
|
-
|
|
482
|
-
readonly includeComments: {
|
|
483
|
-
readonly type: "boolean";
|
|
484
|
-
readonly description: "Include rationale comments in Word margins. Default: true";
|
|
485
|
-
};
|
|
486
|
-
};
|
|
487
|
-
readonly required: readonly ["analysisId"];
|
|
488
|
-
};
|
|
489
|
-
readonly annotations: {
|
|
490
|
-
readonly readOnlyHint: false;
|
|
491
|
-
readonly destructiveHint: false;
|
|
492
|
-
};
|
|
493
|
-
};
|
|
494
|
-
readonly generate_negotiation_email: {
|
|
495
|
-
readonly name: "generate_negotiation_email";
|
|
496
|
-
readonly description: "Generate a professional negotiation email to send to the counterparty, explaining requested changes and their rationale.";
|
|
497
|
-
readonly inputSchema: {
|
|
498
|
-
readonly type: "object";
|
|
499
|
-
readonly properties: {
|
|
500
|
-
readonly analysisId: {
|
|
501
|
-
readonly type: "string";
|
|
502
|
-
readonly description: "The analysis ID of a completed analysis";
|
|
503
|
-
};
|
|
504
|
-
readonly tone: {
|
|
505
|
-
readonly type: "string";
|
|
506
|
-
readonly enum: readonly ["collaborative", "firm", "aggressive"];
|
|
507
|
-
readonly description: "Tone of the email. Default: collaborative";
|
|
508
|
-
};
|
|
509
|
-
readonly recipientRole: {
|
|
510
|
-
readonly type: "string";
|
|
511
|
-
readonly description: "Role of the recipient (e.g., \"General Counsel\", \"Sales Rep\", \"Procurement\"). Helps tailor the message.";
|
|
435
|
+
readonly minimum: 1;
|
|
436
|
+
readonly maximum: 10;
|
|
437
|
+
readonly description: "Terms Favorability 1-10: How protective for YOUR party. 1=minimal protections (fast close), 5=balanced (default), 10=maximum protections (bulletproof). REQUIRED.";
|
|
512
438
|
};
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
readonly annotations: {
|
|
517
|
-
readonly readOnlyHint: false;
|
|
518
|
-
readonly destructiveHint: false;
|
|
519
|
-
};
|
|
520
|
-
};
|
|
521
|
-
readonly extract_clause: {
|
|
522
|
-
readonly name: "extract_clause";
|
|
523
|
-
readonly description: "Extract and analyze a specific clause type from an analyzed contract. Returns the clause text, risk analysis, and suggested improvements.";
|
|
524
|
-
readonly inputSchema: {
|
|
525
|
-
readonly type: "object";
|
|
526
|
-
readonly properties: {
|
|
527
|
-
readonly analysisId: {
|
|
528
|
-
readonly type: "string";
|
|
529
|
-
readonly description: "The analysis ID of a completed analysis";
|
|
439
|
+
readonly dealValue: {
|
|
440
|
+
readonly type: "number";
|
|
441
|
+
readonly description: "Annual Contract Value for risk calibration. Optional but recommended.";
|
|
530
442
|
};
|
|
531
|
-
readonly
|
|
443
|
+
readonly dealValueCurrency: {
|
|
532
444
|
readonly type: "string";
|
|
533
|
-
readonly enum: readonly ["
|
|
534
|
-
readonly description: "
|
|
445
|
+
readonly enum: readonly ["USD", "EUR", "GBP", "CAD", "AUD"];
|
|
446
|
+
readonly description: "Currency for deal value. Default: USD";
|
|
535
447
|
};
|
|
536
|
-
|
|
537
|
-
readonly required: readonly ["analysisId", "clauseType"];
|
|
538
|
-
};
|
|
539
|
-
readonly annotations: {
|
|
540
|
-
readonly readOnlyHint: true;
|
|
541
|
-
};
|
|
542
|
-
};
|
|
543
|
-
readonly compare_playbook: {
|
|
544
|
-
readonly name: "compare_playbook";
|
|
545
|
-
readonly description: "Compare an analyzed contract against a company playbook to identify deviations from pre-approved positions and required approvals.";
|
|
546
|
-
readonly inputSchema: {
|
|
547
|
-
readonly type: "object";
|
|
548
|
-
readonly properties: {
|
|
549
|
-
readonly analysisId: {
|
|
448
|
+
readonly additionalContext: {
|
|
550
449
|
readonly type: "string";
|
|
551
|
-
readonly description: "
|
|
450
|
+
readonly description: "HIGHLY RECOMMENDED: Deal context for better AI drafting. Include: party names, deal value, term length, key requirements, counterparty info, risk factors, special provisions needed. Example: \"Deal value: $500K/year, 3-year term. We need strong IP protections. Counterparty is a startup, so we want robust termination rights. Key contact: John Smith, CEO...\"";
|
|
552
451
|
};
|
|
553
452
|
readonly playbookId: {
|
|
554
453
|
readonly type: "string";
|
|
555
|
-
readonly description: "
|
|
556
|
-
};
|
|
557
|
-
};
|
|
558
|
-
readonly required: readonly ["analysisId", "playbookId"];
|
|
559
|
-
};
|
|
560
|
-
readonly annotations: {
|
|
561
|
-
readonly readOnlyHint: true;
|
|
562
|
-
};
|
|
563
|
-
};
|
|
564
|
-
readonly instant_swarm: {
|
|
565
|
-
readonly name: "instant_swarm";
|
|
566
|
-
readonly description: "PARALLEL REDLINING of entire contract. Spawns N independent SAC agents for N sections simultaneously - maximum parallelization with no lock contention. Each agent (IP, Liability, Indemnification, Payment, Term, etc.) independently analyzes and redlines its section, then all branches merge into a single DOCX with real Track Changes. Returns merged document + per-section results. Requires a completed analysis (use process_contract first). This is the flagship feature - full attorney-quality redlines across the entire contract in parallel.";
|
|
567
|
-
readonly inputSchema: {
|
|
568
|
-
readonly type: "object";
|
|
569
|
-
readonly properties: {
|
|
570
|
-
readonly analysisId: {
|
|
571
|
-
readonly type: "string";
|
|
572
|
-
readonly description: "The analysis ID from a completed process_contract call. The analysis provides contract context for each section.";
|
|
573
|
-
};
|
|
574
|
-
readonly aggressivenessLevel: {
|
|
575
|
-
readonly type: "number";
|
|
576
|
-
readonly enum: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
577
|
-
readonly description: "How aggressive the redlines should be (1=conservative, 10=very aggressive). Recommended: 5-7 for balanced approach.";
|
|
578
|
-
};
|
|
579
|
-
readonly partyPosition: {
|
|
580
|
-
readonly type: "string";
|
|
581
|
-
readonly enum: readonly ["customer", "vendor"];
|
|
582
|
-
readonly description: "Which side are you on? \"customer\" = you are buying/receiving services. \"vendor\" = you are selling/providing services.";
|
|
583
|
-
};
|
|
584
|
-
readonly ourPartyName: {
|
|
585
|
-
readonly type: "string";
|
|
586
|
-
readonly description: "Your company name as it should appear in redlines (e.g., \"Acme Corp\").";
|
|
454
|
+
readonly description: "Playbook ID for firm-specific rules. Optional - uses BitsBound Foundational (117 rules) by default.";
|
|
587
455
|
};
|
|
588
|
-
readonly
|
|
589
|
-
readonly type: "
|
|
590
|
-
readonly description: "
|
|
456
|
+
readonly enableEmailGenerator: {
|
|
457
|
+
readonly type: "boolean";
|
|
458
|
+
readonly description: "Generate cover email introducing the draft? Default: true";
|
|
591
459
|
};
|
|
592
|
-
readonly
|
|
593
|
-
readonly type: "
|
|
594
|
-
readonly
|
|
595
|
-
|
|
460
|
+
readonly emailContext: {
|
|
461
|
+
readonly type: "object";
|
|
462
|
+
readonly description: "Cover email context";
|
|
463
|
+
readonly properties: {
|
|
464
|
+
readonly recipientName: {
|
|
465
|
+
readonly type: "string";
|
|
466
|
+
readonly description: "Name of email recipient";
|
|
467
|
+
};
|
|
468
|
+
readonly senderName: {
|
|
469
|
+
readonly type: "string";
|
|
470
|
+
readonly description: "Your name (the sender)";
|
|
471
|
+
};
|
|
472
|
+
readonly additionalContext: {
|
|
473
|
+
readonly type: "string";
|
|
474
|
+
readonly description: "Tone, relationship notes, etc.";
|
|
475
|
+
};
|
|
596
476
|
};
|
|
597
|
-
readonly description: "Optional: specific BUBSA sections to analyze. If omitted, analyzes all 17 sections. Valid sections: parties, definitions, ip_license, payment, term_termination, confidentiality, data_privacy, reps_warranties, indemnification, liability, insurance, assignment, force_majeure, dispute_resolution, precedence, miscellaneous, sla";
|
|
598
477
|
};
|
|
599
478
|
};
|
|
600
|
-
readonly required: readonly ["
|
|
479
|
+
readonly required: readonly ["contractVertical", "representingParty", "aggressivenessLevel"];
|
|
601
480
|
};
|
|
602
481
|
readonly annotations: {
|
|
603
482
|
readonly readOnlyHint: false;
|
|
604
483
|
readonly destructiveHint: false;
|
|
605
484
|
};
|
|
606
485
|
};
|
|
607
|
-
readonly
|
|
608
|
-
readonly name: "
|
|
609
|
-
readonly description: "
|
|
610
|
-
readonly inputSchema: {
|
|
611
|
-
readonly type: "object";
|
|
612
|
-
readonly properties: {
|
|
613
|
-
readonly contractText: {
|
|
614
|
-
readonly type: "string";
|
|
615
|
-
readonly description: "The contract text (plain text or base64-encoded DOCX). For DOCX files, base64 encode the file contents.";
|
|
616
|
-
};
|
|
617
|
-
readonly fileName: {
|
|
618
|
-
readonly type: "string";
|
|
619
|
-
readonly description: "Optional filename for context (e.g., \"Acme_MSA_2024.docx\")";
|
|
620
|
-
};
|
|
621
|
-
readonly perspective: {
|
|
622
|
-
readonly type: "string";
|
|
623
|
-
readonly enum: readonly ["customer", "vendor", "neutral"];
|
|
624
|
-
readonly description: "Analyze from customer (buyer), vendor (seller), or neutral perspective. Default: customer";
|
|
625
|
-
};
|
|
626
|
-
};
|
|
627
|
-
readonly required: readonly ["contractText"];
|
|
628
|
-
};
|
|
629
|
-
readonly annotations: {
|
|
630
|
-
readonly readOnlyHint: true;
|
|
631
|
-
};
|
|
632
|
-
};
|
|
633
|
-
readonly ask_clause: {
|
|
634
|
-
readonly name: "ask_clause";
|
|
635
|
-
readonly description: "INSTANT clause Q&A (2-5 seconds). Ask about specific clauses directly WITHOUT needing a prior analysis. Examples: \"What does the indemnification clause say?\", \"Is there a limitation of liability?\", \"What are the termination terms?\"";
|
|
636
|
-
readonly inputSchema: {
|
|
637
|
-
readonly type: "object";
|
|
638
|
-
readonly properties: {
|
|
639
|
-
readonly contractText: {
|
|
640
|
-
readonly type: "string";
|
|
641
|
-
readonly description: "The contract text (plain text or base64-encoded DOCX)";
|
|
642
|
-
};
|
|
643
|
-
readonly question: {
|
|
644
|
-
readonly type: "string";
|
|
645
|
-
readonly description: "Your question about the contract (e.g., \"What is the liability cap?\", \"Is there an auto-renewal clause?\")";
|
|
646
|
-
};
|
|
647
|
-
readonly clauseType: {
|
|
648
|
-
readonly type: "string";
|
|
649
|
-
readonly enum: readonly ["indemnification", "liability", "ip", "termination", "payment", "confidentiality", "data_privacy", "sla", "force_majeure", "assignment", "any"];
|
|
650
|
-
readonly description: "Optional: Focus on a specific clause type, or \"any\" to search the whole contract. Default: any";
|
|
651
|
-
};
|
|
652
|
-
};
|
|
653
|
-
readonly required: readonly ["contractText", "question"];
|
|
654
|
-
};
|
|
655
|
-
readonly annotations: {
|
|
656
|
-
readonly readOnlyHint: true;
|
|
657
|
-
};
|
|
658
|
-
};
|
|
659
|
-
readonly check_dealbreakers: {
|
|
660
|
-
readonly name: "check_dealbreakers";
|
|
661
|
-
readonly description: "INSTANT dealbreaker check (3-5 seconds). Quick pass/fail screen against your playbook rules. Identifies blockers, missing required clauses, and who needs to approve. Use before spending time on full analysis.";
|
|
486
|
+
readonly get_analysis_status: {
|
|
487
|
+
readonly name: "get_analysis_status";
|
|
488
|
+
readonly description: "Check analysis progress. When complete, returns:\n- redlinedDocxDownloadUrl: Presigned URL to download redlined DOCX (valid 1 hour)\n- negotiationEmailHtml/PlainText: Ready-to-send negotiation email\n- favorabilityScore, topRisks, negotiationPriorities\n\nALWAYS display download URLs as clickable links when analysis completes.";
|
|
662
489
|
readonly inputSchema: {
|
|
663
490
|
readonly type: "object";
|
|
664
491
|
readonly properties: {
|
|
665
|
-
readonly
|
|
666
|
-
readonly type: "string";
|
|
667
|
-
readonly description: "The contract text (plain text or base64-encoded DOCX)";
|
|
668
|
-
};
|
|
669
|
-
readonly playbookId: {
|
|
492
|
+
readonly analysisId: {
|
|
670
493
|
readonly type: "string";
|
|
671
|
-
readonly description: "
|
|
494
|
+
readonly description: "Analysis ID from redline_swarm or power_draft";
|
|
672
495
|
};
|
|
673
496
|
};
|
|
674
|
-
readonly required: readonly ["
|
|
497
|
+
readonly required: readonly ["analysisId"];
|
|
675
498
|
};
|
|
676
499
|
readonly annotations: {
|
|
677
500
|
readonly readOnlyHint: true;
|
|
@@ -679,17 +502,17 @@ export declare const TOOL_DEFINITIONS: {
|
|
|
679
502
|
};
|
|
680
503
|
readonly download_file: {
|
|
681
504
|
readonly name: "download_file";
|
|
682
|
-
readonly description: "Download a file from BitsBound (
|
|
505
|
+
readonly description: "Download a file from BitsBound (redlined DOCX, analysis JSON). Returns base64 content or saves to local path.";
|
|
683
506
|
readonly inputSchema: {
|
|
684
507
|
readonly type: "object";
|
|
685
508
|
readonly properties: {
|
|
686
509
|
readonly downloadUrl: {
|
|
687
510
|
readonly type: "string";
|
|
688
|
-
readonly description: "
|
|
511
|
+
readonly description: "Download URL from get_analysis_status deliverables";
|
|
689
512
|
};
|
|
690
513
|
readonly saveToPath: {
|
|
691
514
|
readonly type: "string";
|
|
692
|
-
readonly description: "Optional: Local
|
|
515
|
+
readonly description: "Optional: Local path to save file. If omitted, returns base64.";
|
|
693
516
|
};
|
|
694
517
|
};
|
|
695
518
|
readonly required: readonly ["downloadUrl"];
|
|
@@ -704,7 +527,7 @@ export declare const RESOURCE_DEFINITIONS: {
|
|
|
704
527
|
readonly analysis: {
|
|
705
528
|
readonly uriTemplate: "bitsbound://analysis/{analysisId}";
|
|
706
529
|
readonly name: "Contract Analysis";
|
|
707
|
-
readonly description: "Full analysis results including all
|
|
530
|
+
readonly description: "Full analysis results including all analyzer outputs (varies by contract type), risk scores, and recommendations";
|
|
708
531
|
readonly mimeType: "application/json";
|
|
709
532
|
};
|
|
710
533
|
readonly playbook: {
|
|
@@ -731,32 +554,22 @@ export declare const RESOURCE_DEFINITIONS: {
|
|
|
731
554
|
* - O: User experiences a smooth, guided contract analysis flow
|
|
732
555
|
*/
|
|
733
556
|
export declare const PROMPT_DEFINITIONS: {
|
|
734
|
-
readonly
|
|
735
|
-
readonly name: "
|
|
736
|
-
readonly description: "
|
|
737
|
-
readonly arguments: readonly [];
|
|
738
|
-
};
|
|
739
|
-
readonly quick_scan: {
|
|
740
|
-
readonly name: "quick_scan";
|
|
741
|
-
readonly description: "⚡ Quick Risk Scan - Get instant risk assessment in 5-10 seconds without waiting for full analysis";
|
|
742
|
-
readonly arguments: readonly [];
|
|
743
|
-
};
|
|
744
|
-
readonly ask_about_contract: {
|
|
745
|
-
readonly name: "ask_about_contract";
|
|
746
|
-
readonly description: "💬 Ask About a Clause - Upload a contract and ask specific questions about any clause or term";
|
|
557
|
+
readonly redline_swarm: {
|
|
558
|
+
readonly name: "redline_swarm";
|
|
559
|
+
readonly description: "Redline Mode - Upload counterparty's DOCX and get partner-level redlines with real Track Changes, risk analysis, and negotiation email";
|
|
747
560
|
readonly arguments: readonly [];
|
|
748
561
|
};
|
|
749
|
-
readonly
|
|
750
|
-
readonly name: "
|
|
751
|
-
readonly description: "
|
|
562
|
+
readonly power_draft: {
|
|
563
|
+
readonly name: "power_draft";
|
|
564
|
+
readonly description: "Draft Mode - Generate a complete contract from scratch with multi-pass AI refinement (Opus 4.5 drafts → Analyzers critique → Opus 4.5 refines)";
|
|
752
565
|
readonly arguments: readonly [];
|
|
753
566
|
};
|
|
754
|
-
readonly
|
|
755
|
-
readonly name: "
|
|
756
|
-
readonly description: "
|
|
567
|
+
readonly check_analysis: {
|
|
568
|
+
readonly name: "check_analysis";
|
|
569
|
+
readonly description: "Check Analysis Status - Check progress or download results from a running/completed redline or draft";
|
|
757
570
|
readonly arguments: readonly [{
|
|
758
571
|
readonly name: "analysisId";
|
|
759
|
-
readonly description: "The analysis ID from
|
|
572
|
+
readonly description: "The analysis ID from redline_swarm or power_draft";
|
|
760
573
|
readonly required: true;
|
|
761
574
|
}];
|
|
762
575
|
};
|
|
@@ -800,7 +613,7 @@ export declare const OPENAPI_SPEC: {
|
|
|
800
613
|
};
|
|
801
614
|
};
|
|
802
615
|
readonly servers: readonly [{
|
|
803
|
-
readonly url: "https://bitsbound-
|
|
616
|
+
readonly url: "https://bitsbound-contract-backend.onrender.com";
|
|
804
617
|
readonly description: "Production server";
|
|
805
618
|
}];
|
|
806
619
|
readonly security: readonly [{
|
|
@@ -1554,7 +1367,7 @@ export declare function getOpenApiSpecJson(): string;
|
|
|
1554
1367
|
* This documentation is exported as a constant to comply with NNF (No New Files) policy.
|
|
1555
1368
|
* Access programmatically: `import { README_DOCUMENTATION } from './types/...Types.js'`
|
|
1556
1369
|
*/
|
|
1557
|
-
export declare const README_DOCUMENTATION: "# BitsBound MCP Server\n\nAI-powered contract analysis for Claude, ChatGPT, and other AI platforms via the Model Context Protocol (MCP).\n\n## Overview\n\nBitsBound MCP Server enables AI assistants to analyze contracts, generate redlined documents with real Track Changes,\nand provide clause-by-clause risk analysis. It connects AI platforms to BitsBound's 8-Stage TCA Pipeline:\n\n1. **Loading Context** - Parsing deal context and contract structure\n2. **Extracting Data** - Running 13 deterministic extraction scripts\n3. **Identifying Parties** - AI identifying customer and vendor positions\n4. **Researching** - Running 8 parallel research analyzers\n5. **AI Analysis** - Running 18+ parallel AI analyzers (The Swarm)\n6. **Instant Swarm\u2122** - Parallel redlining across all sections (optional)\n7. **Generating Email** - Drafting negotiation email with redline summary (optional)\n8. **Synthesizing Results** - Generating final recommendations and scores\n\n## Quick Start\n\n### For Claude Desktop (MCP Protocol)\n\nAdd to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n \"mcpServers\": {\n \"bitsbound\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@bitsbound/mcp-server\"],\n \"env\": {\n \"BITSBOUND_API_KEY\": \"sk_live_your_api_key_here\"\n }\n }\n }\n}\n```\n\n### For ChatGPT (Custom GPT Actions)\n\n1. Create a new Custom GPT at https://chat.openai.com/gpts/editor\n2. Go to \"Configure\" \u2192 \"Create new action\"\n3. Import OpenAPI schema from: `https://bitsbound-
|
|
1370
|
+
export declare const README_DOCUMENTATION: "# BitsBound MCP Server\n\nAI-powered contract analysis for Claude, ChatGPT, and other AI platforms via the Model Context Protocol (MCP).\n\n## Overview\n\nBitsBound MCP Server enables AI assistants to analyze contracts, generate redlined documents with real Track Changes,\nand provide clause-by-clause risk analysis. It connects AI platforms to BitsBound's 8-Stage TCA Pipeline:\n\n1. **Loading Context** - Parsing deal context and contract structure\n2. **Extracting Data** - Running 13 deterministic extraction scripts\n3. **Identifying Parties** - AI identifying customer and vendor positions\n4. **Researching** - Running 8 parallel research analyzers\n5. **AI Analysis** - Running 18+ parallel AI analyzers (The Swarm)\n6. **Instant Swarm\u2122** - Parallel redlining across all sections (optional)\n7. **Generating Email** - Drafting negotiation email with redline summary (optional)\n8. **Synthesizing Results** - Generating final recommendations and scores\n\n## Quick Start\n\n### For Claude Desktop (MCP Protocol)\n\nAdd to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n \"mcpServers\": {\n \"bitsbound\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@bitsbound/mcp-server\"],\n \"env\": {\n \"BITSBOUND_API_KEY\": \"sk_live_your_api_key_here\"\n }\n }\n }\n}\n```\n\n### For ChatGPT (Custom GPT Actions)\n\n1. Create a new Custom GPT at https://chat.openai.com/gpts/editor\n2. Go to \"Configure\" \u2192 \"Create new action\"\n3. Import OpenAPI schema from: `https://bitsbound-contract-backend.onrender.com/api/v1/mcp/openapi.json`\n4. Set Authentication: API Key, Header name: `x-api-key`\n5. Enter your BitsBound API key\n\n### For Other AI Platforms (REST API)\n\nUse the REST API directly with your API key:\n\n```bash\ncurl -X POST https://bitsbound-contract-backend.onrender.com/api/v1/mcp/analyze \\\n -H \"Content-Type: application/json\" \\\n -H \"x-api-key: sk_live_your_api_key_here\" \\\n -d '{\n \"contract_content\": \"<base64-encoded-docx>\",\n \"filename\": \"master-service-agreement.docx\",\n \"analysis_type\": \"full\"\n }'\n```\n\n## Getting Your API Key\n\n1. Sign up at https://account.bitsbound.com\n2. Subscribe to a plan (Starter: $25/mo, Professional: $125/mo, Team: $625/mo)\n3. Navigate to API Keys section\n4. Generate a new API key (format: `sk_live_xxxxx`)\n\n## Available Tools\n\n### process_contract\nUpload a contract (DOCX format, base64 encoded) for full 8-stage pipeline processing.\n\n**Parameters:**\n- `docxBase64` (required): Base64-encoded DOCX file\n- `fileName` (required): Original filename\n- `analysisDepth`: 'quick' (~10 min), 'standard' (~30 min), 'deep' (~45 min)\n- `perspective`: 'customer', 'vendor', or 'neutral'\n\n**Returns:** Analysis ID for tracking progress\n\n### get_analysis_status\nCheck the status of a running or completed analysis.\n\n**Parameters:**\n- `analysisId` (required): The analysis ID from process_contract\n\n**Returns:** Progress percentage, current phase, results when complete\n\n### ask_sac\nAsk the Supreme AI Co-Counsel questions about an analyzed contract.\n\n**Parameters:**\n- `analysisId` (required): Analysis ID of a completed analysis\n- `question` (required): Your question about the contract\n- `includeClauseCitations`: Include specific clause citations (default: true)\n\n**Returns:** AI response with clause citations and follow-up suggestions\n\n### generate_redline\nGenerate a redlined Word document with real OOXML Track Changes.\n\n**Parameters:**\n- `analysisId` (required): Analysis ID of a completed analysis\n- `aggressiveness`: 1-5 (1=conservative, 5=aggressive)\n- `includeComments`: Include rationale comments (default: true)\n\n**Returns:** Base64-encoded redlined DOCX with download URL\n\n### generate_negotiation_email\nGenerate a professional negotiation email to send to counterparty.\n\n**Parameters:**\n- `analysisId` (required): Analysis ID of a completed analysis\n- `tone`: 'collaborative', 'firm', or 'aggressive'\n- `recipientRole`: Role of the recipient (e.g., \"General Counsel\")\n\n**Returns:** Subject line, email body, and key points\n\n### extract_clause\nExtract and analyze a specific clause type from an analyzed contract.\n\n**Parameters:**\n- `analysisId` (required): Analysis ID of a completed analysis\n- `clauseType` (required): One of: 'indemnification', 'liability', 'ip', 'termination',\n 'payment', 'confidentiality', 'data_privacy', 'sla', 'force_majeure', 'assignment'\n\n**Returns:** Clause text, risk level, analysis, suggested improvements\n\n### compare_playbook\nCompare an analyzed contract against a company playbook.\n\n**Parameters:**\n- `analysisId` (required): Analysis ID of a completed analysis\n- `playbookId` (required): ID of the playbook to compare against\n\n**Returns:** Deviations, compliance score, required approvals\n\n## Example Workflow\n\n```\nUser: \"Analyze this contract and tell me the key risks\"\n\nClaude/ChatGPT:\n1. Identifies the contract type (MSA, M&A, VC term sheet, employment, NDA, etc.)\n2. Calls process_contract with the uploaded DOCX (with Instant Swarm + Email enabled)\n3. Polls get_analysis_status to watch progress through 8 stages:\n - Loading Context \u2192 Extracting Data \u2192 Identifying Parties \u2192 Researching\n - AI Analysis \u2192 Instant Swarm\u2122 \u2192 Generating Email \u2192 Synthesizing Results\n4. Reads results showing favorability score (e.g., 42% - Vendor Favorable)\n5. Identifies top risks based on contract type and activated analyzers\n6. User can ask follow-up questions via ask_sac (SAC has full contract context)\n7. Downloads the redlined DOCX with real Track Changes (from Instant Swarm\u2122)\n8. Reviews the auto-generated negotiation email (from Email Generator)\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| BITSBOUND_API_KEY | Yes | Your API key (sk_live_xxxxx) |\n| BITSBOUND_API_URL | No | API URL (default: production server) |\n\n## API Endpoints (REST)\n\nAll endpoints require `x-api-key` header or `Authorization: Bearer <key>` header.\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | /api/v1/mcp/analyze | Start contract analysis |\n| GET | /api/v1/mcp/analysis/:id/status | Get analysis status |\n| GET | /api/v1/mcp/analysis/:id/full | Get full analysis results |\n| POST | /api/v1/mcp/sac/chat | Ask SAC questions |\n| POST | /api/v1/mcp/redline/generate | Generate redlined DOCX |\n| POST | /api/v1/mcp/email/generate | Generate negotiation email |\n| GET | /api/v1/mcp/analysis/:id/clause/:type | Extract specific clause |\n| POST | /api/v1/mcp/playbook/compare | Compare against playbook |\n| GET | /api/v1/mcp/playbook/:id | Get playbook details |\n| GET | /api/v1/mcp/playbooks | List available playbooks |\n| GET | /api/v1/mcp/openapi.json | OpenAPI specification (public) |\n\n## Pricing\n\nBitsBound uses token-based pricing. Analysis costs vary by depth:\n- Quick analysis: ~100K tokens (~$2.50)\n- Standard analysis: ~500K tokens (~$12.50)\n- Deep analysis: ~1M tokens (~$25.00)\n\nSubscription tiers include monthly token allocations:\n- Starter ($25/mo): 1M tokens\n- Professional ($125/mo): 5M tokens\n- Team ($625/mo): 25M tokens\n- Enterprise ($3,750/mo): 150M tokens\n\n## Legal Disclaimer\n\nBitsBound provides AI-assisted contract analysis tools for legal professionals. All outputs are\npreliminary drafts requiring attorney review and do not constitute legal advice. BitsBound is\nnot a law firm and does not provide legal advice.\n\n## Support\n\n- Website: https://bitsbound.com\n- Documentation: https://bitsbound.com/docs\n- API Keys: https://account.bitsbound.com/api-keys\n- Support: support@bitsbound.com\n\n## License\n\nMIT License - see package.json for details.\n\n---\n\nBuilt by Rob Taylor, Esq. - Corporate attorney and full-stack AI engineer.\n";
|
|
1558
1371
|
/**
|
|
1559
1372
|
* Returns the README documentation for display or export.
|
|
1560
1373
|
*/
|