projoflow-mcp-server 1.0.4 → 1.0.5
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/index.js +101 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -322,6 +322,51 @@ const TOOLS = [
|
|
|
322
322
|
},
|
|
323
323
|
required: ["task_id", "content"]
|
|
324
324
|
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: "get_project_context",
|
|
328
|
+
description: "Get the context/background information for a project. This contains important details like tech stack, goals, decisions, and other AI-relevant information.",
|
|
329
|
+
inputSchema: {
|
|
330
|
+
type: "object",
|
|
331
|
+
properties: {
|
|
332
|
+
project_id: { type: "string", description: "Project ID" }
|
|
333
|
+
},
|
|
334
|
+
required: ["project_id"]
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: "update_project_context",
|
|
339
|
+
description: "Update the context/background information for a project",
|
|
340
|
+
inputSchema: {
|
|
341
|
+
type: "object",
|
|
342
|
+
properties: {
|
|
343
|
+
project_id: { type: "string", description: "Project ID" },
|
|
344
|
+
context: { type: "string", description: "Project context (markdown supported)" }
|
|
345
|
+
},
|
|
346
|
+
required: ["project_id", "context"]
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: "list_project_documents",
|
|
351
|
+
description: "List all documents uploaded to a project",
|
|
352
|
+
inputSchema: {
|
|
353
|
+
type: "object",
|
|
354
|
+
properties: {
|
|
355
|
+
project_id: { type: "string", description: "Project ID" }
|
|
356
|
+
},
|
|
357
|
+
required: ["project_id"]
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: "get_document_url",
|
|
362
|
+
description: "Get a signed download URL for a project document",
|
|
363
|
+
inputSchema: {
|
|
364
|
+
type: "object",
|
|
365
|
+
properties: {
|
|
366
|
+
file_path: { type: "string", description: "File path from list_project_documents" }
|
|
367
|
+
},
|
|
368
|
+
required: ["file_path"]
|
|
369
|
+
}
|
|
325
370
|
}
|
|
326
371
|
];
|
|
327
372
|
|
|
@@ -675,6 +720,62 @@ async function handleTool(name, args) {
|
|
|
675
720
|
return data;
|
|
676
721
|
}
|
|
677
722
|
|
|
723
|
+
case "get_project_context": {
|
|
724
|
+
const { data, error } = await supabase
|
|
725
|
+
.from("projects")
|
|
726
|
+
.select("id, name, context")
|
|
727
|
+
.eq("id", args.project_id)
|
|
728
|
+
.single();
|
|
729
|
+
if (error) throw new Error(error.message);
|
|
730
|
+
return {
|
|
731
|
+
project_id: data.id,
|
|
732
|
+
project_name: data.name,
|
|
733
|
+
context: data.context || "(No context set for this project)"
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
case "update_project_context": {
|
|
738
|
+
const { data, error } = await supabase
|
|
739
|
+
.from("projects")
|
|
740
|
+
.update({ context: args.context })
|
|
741
|
+
.eq("id", args.project_id)
|
|
742
|
+
.select("id, name, context")
|
|
743
|
+
.single();
|
|
744
|
+
if (error) throw new Error(error.message);
|
|
745
|
+
return {
|
|
746
|
+
success: true,
|
|
747
|
+
project_id: data.id,
|
|
748
|
+
project_name: data.name,
|
|
749
|
+
context_length: data.context?.length || 0
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
case "list_project_documents": {
|
|
754
|
+
const { data, error } = await supabase
|
|
755
|
+
.from("project_documents")
|
|
756
|
+
.select("id, name, description, file_path, file_size, mime_type, created_at")
|
|
757
|
+
.eq("project_id", args.project_id)
|
|
758
|
+
.order("created_at", { ascending: false });
|
|
759
|
+
if (error) throw new Error(error.message);
|
|
760
|
+
return {
|
|
761
|
+
project_id: args.project_id,
|
|
762
|
+
document_count: data?.length || 0,
|
|
763
|
+
documents: data || []
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
case "get_document_url": {
|
|
768
|
+
const { data, error } = await supabase.storage
|
|
769
|
+
.from("project-documents")
|
|
770
|
+
.createSignedUrl(args.file_path, 3600); // 1 hour expiry
|
|
771
|
+
if (error) throw new Error(error.message);
|
|
772
|
+
return {
|
|
773
|
+
file_path: args.file_path,
|
|
774
|
+
signed_url: data.signedUrl,
|
|
775
|
+
expires_in: "1 hour"
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
|
|
678
779
|
default:
|
|
679
780
|
throw new Error(`Unknown tool: ${name}`);
|
|
680
781
|
}
|