Skip to content

Feature: Merge search_by_metadata into search_notes as optional filters #605

@bm-clawd

Description

@bm-clawd

Problem

We currently have two search tools: search_notes (text/semantic search) and search_by_metadata (frontmatter filter). This is confusing for agents and wastes tool calls when you want both — e.g. "find active tasks about dashboards" requires either two calls or picking one approach.

Proposal

Add optional type and metadata_filters parameters to search_notes so one tool handles everything:

search_notes(
    query="dashboard",           # text/semantic search (optional)
    type="Task",                  # shorthand for frontmatter type filter
    metadata_filters={"status": "active"},  # additional frontmatter filters
    limit=10
)

Behavior:

  • query only → current text/semantic search (unchanged)
  • type/metadata_filters only → pure metadata filter (replaces search_by_metadata)
  • Both → text search filtered by metadata (the common case agents actually need)

Why

  • Simpler tool surface for agents (1 tool instead of 2)
  • The dashboard currently has to choose between text search and metadata filter — combining them is the natural query
  • Reduces tool call overhead
  • search_by_metadata can be deprecated/aliased

Backward Compatibility

  • All existing search_notes calls work unchanged (new params are optional)
  • search_by_metadata could remain as an alias or be deprecated with a migration period

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions