@kynver-app/mcp-estimator 0.2.2 → 0.2.3
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/package.json
CHANGED
|
@@ -119,17 +119,17 @@ export const listTakeoffProjects = {
|
|
|
119
119
|
export const uploadTakeoffInput = {
|
|
120
120
|
name: "estimator_upload_takeoff_input",
|
|
121
121
|
description:
|
|
122
|
-
"
|
|
122
|
+
"Upload a takeoff input file (base64) for a project. kind: eagleview_pdf|eagleview_xml|eagleview_json|eagleview_csv|spec_pdf|spreadsheet|photo|voice|other. For remodel budgets use kind=spreadsheet with CSV.",
|
|
123
123
|
inputSchemaZod: uploadTakeoffInputSchema,
|
|
124
124
|
execute: async (args: z.infer<typeof uploadTakeoffInputSchema>): Promise<string> => {
|
|
125
125
|
if (!client.hasApiKey()) return client.noApiKeyMessage();
|
|
126
|
-
|
|
127
|
-
message:
|
|
128
|
-
"Use POST /api/estimator/takeoffs/{projectId}/inputs multipart (kind + file) from an authenticated client. MCP base64 upload route can be added when hosted file relay is available.",
|
|
129
|
-
projectId: args.projectId,
|
|
126
|
+
const data = await client.post(`/estimator/takeoffs/${args.projectId}/inputs`, {
|
|
130
127
|
kind: args.kind,
|
|
131
128
|
fileName: args.fileName,
|
|
129
|
+
base64: args.base64,
|
|
130
|
+
...(args.mimeType ? { mimeType: args.mimeType } : {}),
|
|
132
131
|
});
|
|
132
|
+
return JSON.stringify(data);
|
|
133
133
|
},
|
|
134
134
|
};
|
|
135
135
|
|
|
@@ -18,7 +18,7 @@ export const analyzePhotos = {
|
|
|
18
18
|
const data = await client.post("/estimator/analyze", {
|
|
19
19
|
type: "photos",
|
|
20
20
|
images: args.images,
|
|
21
|
-
prompt: args.prompt,
|
|
21
|
+
...(args.prompt ? { prompt: args.prompt } : {}),
|
|
22
22
|
});
|
|
23
23
|
return JSON.stringify(data);
|
|
24
24
|
},
|
|
@@ -41,7 +41,7 @@ export const analyzeDocument = {
|
|
|
41
41
|
const data = await client.post("/estimator/analyze", {
|
|
42
42
|
type: "document",
|
|
43
43
|
text: args.text,
|
|
44
|
-
prompt: args.prompt,
|
|
44
|
+
...(args.prompt ? { prompt: args.prompt } : {}),
|
|
45
45
|
});
|
|
46
46
|
return JSON.stringify(data);
|
|
47
47
|
},
|