bear_get_today
Retrieve today's notes from Bear App using a search term and API token, with the option to display the Bear window for quick access.
Instructions
Get today's notes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Search term | |
| show_window | No | Show Bear window | |
| token | No | Bear API token |
Implementation Reference
- src/index.ts:995-1015 (handler)The main handler function that implements the 'bear_get_today' tool logic. It processes input arguments to build Bear URL parameters, executes the 'today' callback via executeWithCallback, and returns a standardized MCP content response with today's notes data.private async getToday(args: any) { const params: Record<string, string | boolean> = {}; if (args.search) params.search = args.search; if (args.token) params.token = args.token; if (args.show_window) params.show_window = "yes"; const todayData = await this.executeWithCallback("today", params); return { content: [ { type: "text", text: JSON.stringify({ message: `Retrieved today's notes${args.search ? ` matching: ${args.search}` : ""}`, notes: todayData }, null, 2) } ] }; }
- src/index.ts:592-612 (schema)The tool registration object defining the name, description, and input schema for 'bear_get_today', registered in the MCP server's tools list.{ name: "bear_get_today", description: "Get today's notes", inputSchema: { type: "object", properties: { search: { type: "string", description: "Search term" }, token: { type: "string", description: "Bear API token" }, show_window: { type: "boolean", description: "Show Bear window" } } } },
- src/index.ts:727-728 (registration)The switch case in the CallToolRequestHandler that routes 'bear_get_today' tool calls to the getToday handler method.case "bear_get_today": return await this.getToday(args);