Add search_notes MCP tool #19

Merged
forgejo_admin merged 1 commit from 18-add-search-notes-mcp-tool into main 2026-03-07 12:39:42 +00:00

Summary

Adds a search_notes MCP tool that wraps the new GET /notes/search full-text search endpoint. Thin httpx wrapper following the same pattern as list_notes, get_note, etc.

Changes

  • src/pal_e_docs_mcp/tools/notes.py: Added search_notes tool with parameters: query (required), limit (optional), note_type (optional), project (optional), tags (optional). Returns ranked results with slug, title, note_type, status, rank, and headline (highlighted snippet).

Test Plan

  • ruff check and ruff format --check pass cleanly
  • Module imports successfully (from pal_e_docs_mcp.tools.notes import search_notes)
  • Once the search API is deployed, verify: call search_notes(query="postgres") and confirm ranked results with highlighted snippets are returned

Review Checklist

  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • Single file change, follows existing tool pattern exactly
  • plan-2026-02-26-tf-modularize-postgres -- Phase 5, PR 2 (search_notes MCP tool)
  • Forgejo issue: #18
## Summary Adds a `search_notes` MCP tool that wraps the new `GET /notes/search` full-text search endpoint. Thin httpx wrapper following the same pattern as `list_notes`, `get_note`, etc. ## Changes - `src/pal_e_docs_mcp/tools/notes.py`: Added `search_notes` tool with parameters: `query` (required), `limit` (optional), `note_type` (optional), `project` (optional), `tags` (optional). Returns ranked results with slug, title, note_type, status, rank, and headline (highlighted snippet). ## Test Plan - [x] `ruff check` and `ruff format --check` pass cleanly - [x] Module imports successfully (`from pal_e_docs_mcp.tools.notes import search_notes`) - [ ] Once the search API is deployed, verify: call `search_notes(query="postgres")` and confirm ranked results with highlighted snippets are returned ## Review Checklist - [x] No secrets committed - [x] No unnecessary file changes - [x] Commit messages are descriptive - [x] Single file change, follows existing tool pattern exactly ## Related Notes - `plan-2026-02-26-tf-modularize-postgres` -- Phase 5, PR 2 (search_notes MCP tool) - Forgejo issue: #18
Add search_notes MCP tool wrapping /notes/search endpoint
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ad26971177
Adds full-text search capability via the new Postgres tsvector-backed
search API. Supports query, limit, note_type, project, and tags params.
Returns ranked results with highlighted snippets (headline).

Closes #18

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
forgejo_admin deleted branch 18-add-search-notes-mcp-tool 2026-03-07 12:39:42 +00:00
forgejo_admin referenced this pull request from a commit 2026-03-07 12:39:44 +00:00
Sign in to join this conversation.
No description provided.