deleteFileVectors
Remove vector data associated with a specific file to manage storage and optimize search performance in the Pinata MCP server.
Instructions
Delete vectors for a file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ID of the file to delete vectors for |
Implementation Reference
- src/index.ts:1749-1783 (handler)The deleteFileVectors tool handler - deletes vector embeddings for a file by making a DELETE request to the Pinata vectorize API endpoint. Takes a file_id parameter and returns a success message with the API response or an error.
server.tool( "deleteFileVectors", "Delete vectors for a file", { file_id: z.string().describe("ID of the file to delete vectors for"), }, async ({ file_id }) => { try { const url = `https://uploads.pinata.cloud/v3/vectorize/files/${file_id}`; const response = await fetch(url, { method: "DELETE", headers: getHeaders(), }); if (!response.ok) { throw new Error( `Failed to delete file vectors: ${response.status} ${response.statusText}` ); } const data = await response.json(); return { content: [ { type: "text", text: `✅ File vectors deleted\n\n${JSON.stringify(data, null, 2)}`, }, ], }; } catch (error) { return errorResponse(error); } } );