@kynver-app/mcp-estimator 0.2.12 → 0.2.14

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/dist/server.js CHANGED
@@ -18,6 +18,7 @@ import * as takeoffTools from "./tools/takeoff-tools.js";
18
18
  import * as intakeTools from "./tools/intake-tools.js";
19
19
  import * as remodelEstimateTools from "./tools/remodel-estimate-tools.js";
20
20
  import * as remodelDeliverableTools from "./tools/remodel-deliverable-tools.js";
21
+ import * as signingTools from "./tools/signing-tools.js";
21
22
  import { readOwnPackageVersion } from "./lib/package-version.js";
22
23
  const PACKAGE_VERSION = readOwnPackageVersion(import.meta.url);
23
24
  function toolResult(text) {
@@ -110,5 +111,9 @@ export function createEstimatorServer() {
110
111
  register(takeoffTools.getEstimateApproval.name, { description: takeoffTools.getEstimateApproval.description, inputSchema: takeoffTools.getEstimateApproval.inputSchemaZod }, (args) => takeoffTools.getEstimateApproval.execute(args));
111
112
  // --- Intake tools (1) ---
112
113
  register(intakeTools.normalizeRemodelIntake.name, { description: intakeTools.normalizeRemodelIntake.description, inputSchema: intakeTools.normalizeRemodelIntake.inputSchemaZod }, (args) => intakeTools.normalizeRemodelIntake.execute(args));
114
+ // --- Signing tools (3) ---
115
+ register(signingTools.createSigningRequest.name, { description: signingTools.createSigningRequest.description, inputSchema: signingTools.createSigningRequest.inputSchemaZod }, (args) => signingTools.createSigningRequest.execute(args));
116
+ register(signingTools.getSigningRequests.name, { description: signingTools.getSigningRequests.description, inputSchema: signingTools.getSigningRequests.inputSchemaZod }, (args) => signingTools.getSigningRequests.execute(args));
117
+ register(signingTools.cancelSigningRequest.name, { description: signingTools.cancelSigningRequest.description, inputSchema: signingTools.cancelSigningRequest.inputSchemaZod }, (args) => signingTools.cancelSigningRequest.execute(args));
113
118
  return server;
114
119
  }
@@ -301,7 +301,6 @@ declare const updateConfigSchema: z.ZodObject<{
301
301
  companyAddress: z.ZodOptional<z.ZodString>;
302
302
  companyLogo: z.ZodOptional<z.ZodString>;
303
303
  licenseNumber: z.ZodOptional<z.ZodString>;
304
- defaultNotes: z.ZodOptional<z.ZodString>;
305
304
  defaultTerms: z.ZodOptional<z.ZodString>;
306
305
  }, "strip", z.ZodTypeAny, {
307
306
  defaultMarkup?: number | undefined;
@@ -312,7 +311,6 @@ declare const updateConfigSchema: z.ZodObject<{
312
311
  companyAddress?: string | undefined;
313
312
  companyLogo?: string | undefined;
314
313
  licenseNumber?: string | undefined;
315
- defaultNotes?: string | undefined;
316
314
  defaultTerms?: string | undefined;
317
315
  }, {
318
316
  defaultMarkup?: number | undefined;
@@ -323,7 +321,6 @@ declare const updateConfigSchema: z.ZodObject<{
323
321
  companyAddress?: string | undefined;
324
322
  companyLogo?: string | undefined;
325
323
  licenseNumber?: string | undefined;
326
- defaultNotes?: string | undefined;
327
324
  defaultTerms?: string | undefined;
328
325
  }>;
329
326
  export declare const updateConfig: {
@@ -338,7 +335,6 @@ export declare const updateConfig: {
338
335
  companyAddress: z.ZodOptional<z.ZodString>;
339
336
  companyLogo: z.ZodOptional<z.ZodString>;
340
337
  licenseNumber: z.ZodOptional<z.ZodString>;
341
- defaultNotes: z.ZodOptional<z.ZodString>;
342
338
  defaultTerms: z.ZodOptional<z.ZodString>;
343
339
  }, "strip", z.ZodTypeAny, {
344
340
  defaultMarkup?: number | undefined;
@@ -349,7 +345,6 @@ export declare const updateConfig: {
349
345
  companyAddress?: string | undefined;
350
346
  companyLogo?: string | undefined;
351
347
  licenseNumber?: string | undefined;
352
- defaultNotes?: string | undefined;
353
348
  defaultTerms?: string | undefined;
354
349
  }, {
355
350
  defaultMarkup?: number | undefined;
@@ -360,7 +355,6 @@ export declare const updateConfig: {
360
355
  companyAddress?: string | undefined;
361
356
  companyLogo?: string | undefined;
362
357
  licenseNumber?: string | undefined;
363
- defaultNotes?: string | undefined;
364
358
  defaultTerms?: string | undefined;
365
359
  }>;
366
360
  execute: (args: z.infer<typeof updateConfigSchema>) => Promise<string>;
@@ -156,12 +156,11 @@ const updateConfigSchema = z.object({
156
156
  companyAddress: z.string().optional(),
157
157
  companyLogo: z.string().optional(),
158
158
  licenseNumber: z.string().optional(),
159
- defaultNotes: z.string().optional(),
160
159
  defaultTerms: z.string().optional(),
161
160
  });
162
161
  export const updateConfig = {
163
162
  name: "estimator_update_config",
164
- description: "Update the user's estimator settings. You can set: companyName, defaultMarkup (waste %), taxRate, companyPhone, companyEmail, companyAddress, companyLogo (URL), licenseNumber, defaultNotes (appended to every estimate), and defaultTerms (terms & conditions).",
163
+ description: "Update the user's estimator settings. You can set: companyName, defaultMarkup (waste %), taxRate, companyPhone, companyEmail, companyAddress, companyLogo (URL), licenseNumber (contractor CCB/license number), and defaultTerms (terms & conditions appended to estimates).",
165
164
  inputSchemaZod: updateConfigSchema,
166
165
  execute: async (args) => {
167
166
  if (!client.hasApiKey())
@@ -0,0 +1,89 @@
1
+ import { z } from "zod";
2
+ declare const createSigningRequestSchema: z.ZodObject<{
3
+ estimateId: z.ZodString;
4
+ recipientEmail: z.ZodOptional<z.ZodString>;
5
+ recipientName: z.ZodOptional<z.ZodString>;
6
+ senderNote: z.ZodOptional<z.ZodString>;
7
+ expiresInDays: z.ZodOptional<z.ZodNumber>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ estimateId: string;
10
+ recipientEmail?: string | undefined;
11
+ recipientName?: string | undefined;
12
+ senderNote?: string | undefined;
13
+ expiresInDays?: number | undefined;
14
+ }, {
15
+ estimateId: string;
16
+ recipientEmail?: string | undefined;
17
+ recipientName?: string | undefined;
18
+ senderNote?: string | undefined;
19
+ expiresInDays?: number | undefined;
20
+ }>;
21
+ export declare const createSigningRequest: {
22
+ name: string;
23
+ description: string;
24
+ inputSchemaZod: z.ZodObject<{
25
+ estimateId: z.ZodString;
26
+ recipientEmail: z.ZodOptional<z.ZodString>;
27
+ recipientName: z.ZodOptional<z.ZodString>;
28
+ senderNote: z.ZodOptional<z.ZodString>;
29
+ expiresInDays: z.ZodOptional<z.ZodNumber>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ estimateId: string;
32
+ recipientEmail?: string | undefined;
33
+ recipientName?: string | undefined;
34
+ senderNote?: string | undefined;
35
+ expiresInDays?: number | undefined;
36
+ }, {
37
+ estimateId: string;
38
+ recipientEmail?: string | undefined;
39
+ recipientName?: string | undefined;
40
+ senderNote?: string | undefined;
41
+ expiresInDays?: number | undefined;
42
+ }>;
43
+ execute: (args: z.infer<typeof createSigningRequestSchema>) => Promise<string>;
44
+ };
45
+ declare const getSigningRequestsSchema: z.ZodObject<{
46
+ estimateId: z.ZodString;
47
+ }, "strip", z.ZodTypeAny, {
48
+ estimateId: string;
49
+ }, {
50
+ estimateId: string;
51
+ }>;
52
+ export declare const getSigningRequests: {
53
+ name: string;
54
+ description: string;
55
+ inputSchemaZod: z.ZodObject<{
56
+ estimateId: z.ZodString;
57
+ }, "strip", z.ZodTypeAny, {
58
+ estimateId: string;
59
+ }, {
60
+ estimateId: string;
61
+ }>;
62
+ execute: (args: z.infer<typeof getSigningRequestsSchema>) => Promise<string>;
63
+ };
64
+ declare const cancelSigningRequestSchema: z.ZodObject<{
65
+ estimateId: z.ZodString;
66
+ requestId: z.ZodString;
67
+ }, "strip", z.ZodTypeAny, {
68
+ estimateId: string;
69
+ requestId: string;
70
+ }, {
71
+ estimateId: string;
72
+ requestId: string;
73
+ }>;
74
+ export declare const cancelSigningRequest: {
75
+ name: string;
76
+ description: string;
77
+ inputSchemaZod: z.ZodObject<{
78
+ estimateId: z.ZodString;
79
+ requestId: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ estimateId: string;
82
+ requestId: string;
83
+ }, {
84
+ estimateId: string;
85
+ requestId: string;
86
+ }>;
87
+ execute: (args: z.infer<typeof cancelSigningRequestSchema>) => Promise<string>;
88
+ };
89
+ export {};
@@ -0,0 +1,51 @@
1
+ import { z } from "zod";
2
+ import * as client from "../lib/kynver-client.js";
3
+ const createSigningRequestSchema = z.object({
4
+ estimateId: z.string(),
5
+ recipientEmail: z.string().email().optional(),
6
+ recipientName: z.string().max(200).optional(),
7
+ senderNote: z.string().max(2000).optional(),
8
+ expiresInDays: z.number().int().min(1).max(365).optional(),
9
+ });
10
+ export const createSigningRequest = {
11
+ name: "estimator_create_signing_request",
12
+ description: "Create a contract signing request for an estimate. Returns a tokenized signing URL that can be shared with the client. The client can review and electronically sign the estimate at that URL. The signing request expires after expiresInDays (default 30). Does not send emails during implementation.",
13
+ inputSchemaZod: createSigningRequestSchema,
14
+ execute: async (args) => {
15
+ if (!client.hasApiKey())
16
+ return client.noApiKeyMessage();
17
+ const { estimateId, ...body } = args;
18
+ const data = await client.post(`/estimator/estimates/${estimateId}/signing-requests`, body);
19
+ return JSON.stringify(data);
20
+ },
21
+ };
22
+ const getSigningRequestsSchema = z.object({
23
+ estimateId: z.string(),
24
+ });
25
+ export const getSigningRequests = {
26
+ name: "estimator_get_signing_requests",
27
+ description: "List all signing requests for an estimate. Returns status (pending/signed/expired/cancelled), signing URL, recipient, and audit metadata for each request.",
28
+ inputSchemaZod: getSigningRequestsSchema,
29
+ execute: async (args) => {
30
+ if (!client.hasApiKey())
31
+ return client.noApiKeyMessage();
32
+ const data = await client.get(`/estimator/estimates/${args.estimateId}/signing-requests`);
33
+ return JSON.stringify(data);
34
+ },
35
+ };
36
+ const cancelSigningRequestSchema = z.object({
37
+ estimateId: z.string(),
38
+ requestId: z.string(),
39
+ });
40
+ export const cancelSigningRequest = {
41
+ name: "estimator_cancel_signing_request",
42
+ description: "Cancel a pending signing request. Cannot cancel a request that has already been signed. The signing URL will become invalid immediately.",
43
+ inputSchemaZod: cancelSigningRequestSchema,
44
+ execute: async (args) => {
45
+ if (!client.hasApiKey())
46
+ return client.noApiKeyMessage();
47
+ const { estimateId, requestId } = args;
48
+ const data = await client.patch(`/estimator/estimates/${estimateId}/signing-requests`, { requestId });
49
+ return JSON.stringify(data);
50
+ },
51
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kynver-app/mcp-estimator",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/__tests__/**",