Skip to main content
Glama
trashNote.ts1.3 kB
import { Tool } from "@modelcontextprotocol/sdk/types.js"; import { executeBearURLScheme } from "./urlSchemeUtils.js"; export const trashNoteTool: Tool = { name: "trash_note", description: "Move a Bear note to trash", inputSchema: { type: "object", properties: { id: { type: "string", description: "The unique identifier of the note to trash" } }, required: ["id"] } }; export async function handleTrashNote(args: any) { const { id } = args; if (!id || typeof id !== 'string') { return { content: [{ type: "text", text: "Error: Note ID is required" }] }; } try { const params = { id }; const result = await executeBearURLScheme('bear://x-callback-url/trash', params); if (result.success) { return { content: [{ type: "text", text: `Note moved to trash successfully` }] }; } else { return { content: [{ type: "text", text: `Failed to trash note: ${result.error || result.message}` }] }; } } catch (error) { return { content: [{ type: "text", text: `Error trashing note: ${error instanceof Error ? error.message : 'Unknown error'}` }] }; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/quanticsoul4772/bear-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server