Skip to main content
Glama
dweigend

Joplin MCP Server

by dweigend

search_notes

Find specific notes in Joplin by entering search queries with optional result limits to quickly locate relevant information.

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

  • The MCP tool handler for 'search_notes', registered via @mcp.tool() decorator. Calls JoplinAPI.search_notes and formats 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/model for the search_notes tool parameters.
    class SearchNotesInput(BaseModel):
        """Input parameters for searching notes."""
        query: str
        limit: Optional[int] = 100
  • Core implementation of note search in JoplinAPI class, querying the Joplin REST API /search endpoint.
    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"]
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but provides minimal behavioral context. It mentions that it 'returns a dictionary containing search results' but doesn't describe what that dictionary contains, whether results are paginated, how sorting works, or any performance characteristics. For a search tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with a clear purpose statement followed by parameter documentation. The Args/Returns structure is helpful, though the 'args' wrapper adds some redundancy. Every sentence serves a purpose, though the 'Dictionary containing search results' could be more informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a single parameter with 0% schema coverage, the description provides basic functionality but lacks important context. It explains what the tool does and documents parameters, but doesn't cover return format details, error conditions, or how this search differs from other retrieval methods. For a search tool, more behavioral context would be expected.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds parameter information beyond the schema, explaining that 'args' contains 'query: Search query string' and 'limit: Maximum number of results (default: 100)'. Since schema description coverage is 0%, this compensates somewhat. However, it doesn't explain query syntax, what fields are searched, or how the limit parameter interacts with pagination.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with 'Search for notes in Joplin' - a specific verb ('search') and resource ('notes in Joplin'). It distinguishes from siblings like create_note or delete_note by focusing on retrieval rather than mutation. However, it doesn't explicitly differentiate from get_note which might also retrieve notes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like get_note or other search tools. There's no mention of prerequisites, context for searching versus direct retrieval, or any exclusions. The only implied usage is for finding notes based on a query.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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