Skip to content

Decide comma-split behavior for note_types/entity_types/categories params in search_notes #930

@phernandez

Description

@phernandez

#910 fixed comma-splitting for the `tags` parameter of `search_notes` (now uses `parse_tags`, consistent with `write_note` and the `tag:` query shorthand).

The same gap remains for the other list-typed params — `note_types`, `entity_types`, and `categories` still use `coerce_list`, which wraps a comma string as a single literal element instead of splitting. Single values and JSON-array strings already work; only the comma-string form differs from `tags`.

This was deliberately left out of #910 (minimize-diffs), but it needs an explicit decision rather than silent closure:

  • Option A: comma-split these params too (consistent tool surface; an agent that learned `tags="a,b"` will try `note_types="note,task"`)
  • Option B: keep as-is and document clearly per param that comma strings are not split

Note `coerce_list` itself can't change globally — `canvas.py` uses it for lists of dicts that must never comma-split. A dedicated coercer per convention is the likely shape.

A related review note on #910: `parse_tags`' catch-all branch stringifies non-str/list inputs (e.g. `tags=5` → `["5"]`) instead of rejecting them; if strict input rejection is wanted, that belongs in the same decision.

Refs #910

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions