brief-mcp 1.4.0 → 1.5.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.
Files changed (2) hide show
  1. package/dist/index.js +10 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -62,8 +62,8 @@ class SupabaseClient {
62
62
  const response = await axios.get(url, { headers: this.headers });
63
63
  return response.data;
64
64
  }
65
- async deleteDocument(documentId) {
66
- const response = await axios.post(`${EDGE_FUNCTIONS_URL}/delete-document`, { document_id: documentId }, { headers: this.headers });
65
+ async deleteDocument(documentId, orgRef) {
66
+ const response = await axios.post(`${EDGE_FUNCTIONS_URL}/delete-document`, { document_id: documentId, org_ref: orgRef }, { headers: this.headers });
67
67
  return response.data;
68
68
  }
69
69
  async listOrganizations() {
@@ -147,13 +147,17 @@ async function startMCPServer() {
147
147
  },
148
148
  {
149
149
  name: 'delete-knowledge',
150
- description: 'Delete a document from your organization\'s knowledge base',
150
+ description: 'Delete a document from a knowledge base. IMPORTANT: Call list-organizations first to get org_ref, then specify which organization the document belongs to.',
151
151
  inputSchema: {
152
152
  type: 'object',
153
153
  properties: {
154
154
  id: {
155
155
  type: 'string',
156
156
  description: 'The document ID to delete'
157
+ },
158
+ org_ref: {
159
+ type: 'string',
160
+ description: 'Organization slug or ref where the document is (from list-organizations). Required for multi-org.'
157
161
  }
158
162
  },
159
163
  required: ['id']
@@ -225,16 +229,16 @@ async function startMCPServer() {
225
229
  };
226
230
  }
227
231
  case 'delete-knowledge': {
228
- const { id } = toolArgs;
232
+ const { id, org_ref } = toolArgs;
229
233
  if (!id) {
230
234
  throw new Error('Document ID is required');
231
235
  }
232
- const result = await supabase.deleteDocument(id);
236
+ const result = await supabase.deleteDocument(id, org_ref);
233
237
  return {
234
238
  content: [{
235
239
  type: 'text',
236
240
  text: result.success
237
- ? `Document ${id} deleted.`
241
+ ? `Document ${id} deleted${org_ref ? ` from ${org_ref}` : ''}.`
238
242
  : `Failed to delete document ${id}.`
239
243
  }]
240
244
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brief-mcp",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Brief MCP - Context-first development with RAG-powered knowledge base",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",