Skip to content

Normalize the CLI / MCP tool argument surface for v1.0 #977

@groksrc

Description

@groksrc

Motivation

The MCP tools and the bm tool CLI expose the same operations with diverging argument names and shapes. Each divergence is individually defensible, but together they make the surface hard to predict — during a single manual QA session (June 11, the #962-#976 batch), a careful user writing CLI commands from the MCP signatures hit six mismatches in a row. Agents have the same failure mode in reverse: they learn one surface and transfer it to the other (the exact rationale behind #930's comma-split decision and #882's workspace-param parity).

Observed divergences (same session, current main)

Concept MCP tool param CLI flag/arg
Target folder write_note(directory=...) (aliases: folder, dir, path) --folder
Note type write_note(note_type=...) --type
Tags on write tags (list or comma string) --tags (repeatable)
Tags on search tags --tag (repeatable, singular)
Search query search_notes(query=...) positional QUERY
Type filter on search note_types --type
Context URL build_context(url=...) positional URL

Related shape quirk found in the same pass: a JSON-array string inside a list-typed param (--type '["note","task"]') silently matches nothing on both surfaces (parse_tags and parse_str_list are consistent with each other here, but the behavior surprises).

Proposal (v1.0 — the breaking-change window)

  1. Pick one canonical noun per concept (e.g. decide folder vs directory, type vs note_type, singular vs plural for repeatable flags) and apply it to BOTH surfaces.
  2. CLI flags mirror MCP param names wherever it doesn't fight CLI ergonomics; where positional args are kept (query, URL, identifier), make that choice consistent across subcommands.
  3. Deprecation path before 1.0: accept old names as hidden aliases with a deprecation note, remove at v1.0.
  4. Document the final surface in the man-pages work (Add man pages for bm CLI commands #610 / Create Unix-style Basic Memory manual pages as notes #952) — exact flag documentation is what those issues exist for, and they need a stable surface to document.

Non-goals

  • No behavior changes to the underlying tools — naming/shape normalization only.
  • Cloud CLI commands (bm cloud ...) are out of scope unless they share the same nouns.

Found during manual QA, same session as #972/#974/#975.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv1.0Targeted for the v1.0 release
    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