Skip to main content
Glama
dweigend

Joplin MCP Server

by dweigend

search_notes

Find and retrieve Joplin notes by entering a search query and specifying result limits using the Model Context Protocol for efficient note management.

Instructions

Search for notes in Joplin.

Args: args: Search parameters query: Search query string limit: Maximum number of results (default: 100) Returns: Dictionary containing search results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsYes

Implementation Reference

  • MCP tool handler for 'search_notes': decorated with @mcp.tool(), takes SearchNotesInput, calls JoplinAPI.search_notes, formats and returns results.
    @mcp.tool() async def search_notes(args: SearchNotesInput) -> Dict[str, Any]: """Search for notes in Joplin. Args: args: Search parameters query: Search query string limit: Maximum number of results (default: 100) Returns: Dictionary containing search results """ if not api: return {"error": "Joplin API client not initialized"} try: results = api.search_notes(query=args.query, limit=args.limit) return { "status": "success", "total": len(results.items), "has_more": results.has_more, "notes": [ { "id": note.id, "title": note.title, "body": note.body, "created_time": note.created_time.isoformat() if note.created_time else None, "updated_time": note.updated_time.isoformat() if note.updated_time else None, "is_todo": note.is_todo } for note in results.items ] } except Exception as e: logger.error(f"Error searching notes: {e}") return {"error": str(e)}
  • Pydantic input schema for search_notes tool defining query (required) and limit (optional, default 100).
    class SearchNotesInput(BaseModel): """Input parameters for searching notes.""" query: str limit: Optional[int] = 100
  • Core JoplinAPI helper method implementing the search_notes functionality by making a GET request to the Joplin '/search' endpoint and parsing into PaginatedResponse of JoplinNote objects.
    def search_notes( self, query: str, limit: int = 100 ) -> PaginatedResponse[JoplinNote]: """Search for notes. Args: query: Search query string limit: Maximum number of results Returns: PaginatedResponse containing matching JoplinNote objects """ params = { "query": query, "limit": limit } response = self._make_request("GET", "search", params=params) return PaginatedResponse( items=[JoplinNote.from_api_response(item) for item in response["items"]], has_more=response["has_more"] )

Other Tools

Related Tools

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/dweigend/joplin-mcp-server'

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