MCP server for accessing notes and tags from the Bear note-taking application
The Bear MCP server exposes three read-only tools for querying notes from a local SQLite database. While the tool names follow verb-first convention (get_*, search-like), the implementation has critical gaps in schema completeness, parameter descriptions, output documentation, and error handling. All three tools have input schemas defined in the ListToolsRequest handler, but parameter descriptions are minimal or missing, output types are undocumented, and error guidance is absent. The descriptions themselves are terse (10-47 chars) and lack context about when to use each tool or what they return. Most critically, the `getNotesLike` function contains a SQL injection vulnerability due to unparameterized string interpolation in the WHERE clause, which is a security and stability risk. No tool declares what it returns, no pagination is offered despite potentially returning hundreds of notes, and error paths do not guide recovery.
get all notes
get notes that includes a string like
get all note tags. You can search notes by tags with get_note_like
SQL injection vulnerability in `getNotesLike()`, unparameterized string interpolation in WHERE clause (`WHERE ... ZTEXT LIKE '%${like}%'`) allows attacker-controlled input to modify query logic. LLM-supplied search terms could break queries or expose unintended data.
No output schema documentation. LLMs cannot plan downstream operations without knowing what fields are returned. E.g., get_notes returns objects with ZCREATIONDATE, ZSUBTITLE, ZTEXT, ZTITLE, ZUNIQUEIDENTIFIER, but this is undocumented and LLMs must infer structure from examples.
Parameter descriptions are missing or trivial. The `like` parameter in get_tags and get_notes_like says 'find notes has this string' / 'find notes that includes a string like', no mention of case sensitivity, special character handling, regex support, or length limits.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 39 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 0 | - | v1 |
Tool descriptions are too short (10 - 47 chars, well below rubric baseline of 194 chars p50). 'get all notes' and 'get all note tags' lack context on when to use each, what data structure is returned, or dependencies between tools. LLMs cannot reliably select tools based on these descriptions.
No pagination support. get_notes and get_notes_like fetch all matching notes without limit or offset. A Bear database with hundreds or thousands of notes could return data exceeding LLM context windows, causing truncation and loss of signal.
Error handling is minimal. Tools return Promise rejections with raw database errors that give no recovery guidance. If a note is corrupted or the database is locked, the LLM sees an unstructured error with no hint about what to do next.
Tool descriptions mention dependencies ('You can search notes by tags with get_note_like' in get_tags) but tool names are inconsistent, the function is named `getNotesLike` / `get_notes_like`, not `get_note_like`. This mismatch confuses tool discovery.
No description of what fields are returned or why. Bear database columns (ZCREATIONDATE, ZSUBTITLE, ZTEXT, ZTITLE, ZUNIQUEIDENTIFIER) are opaque to users. Tool descriptions should clarify: 'Returns title, subtitle, full text, creation date, and unique ID for each note.' This helps agents understand what data is available.