Skip to content

POSIX read-side MCP tools behind enable_posix_tools flag #1399

Closed

Description

@phernandez

Part of the POSIX tool surface + memory evals tracker.

Scope

Add read-side POSIX-shaped MCP tools, registered only when the enable_posix_tools config flag is true (default false). Existing tools are untouched; both surfaces can coexist for A/B evaluation.

Tool Backed by Notes
cat GET /notes/{id} --lines N-M line ranges; section/max_tokens params stubbed until section indexing lands
grep POST /search semantic by default; literal=true (SPEC-47's -F) for FTS-literal
ls GET /directory/{path}
find directory endpoint recursive + glob
tail recent activity endpoint recency view
man search + read against the manual project apropos = metadata search over type: manpage

Requirements

  • Flag: enable_posix_tools: bool = False in config; gate tool registration at the MCP composition root (mcp/container.py pattern) — no scattered if checks in tool bodies.
  • Tools are thin translations: typed client → existing API route. No new service logic.
  • Structured JSON output shape suitable for agents (SPEC-47's --format json behavior is the only mode for MCP).
  • Per-project routing via get_project_client() like every other MCP tool.
  • Tool descriptions must be short (the wire/manual split: short description=, long-form docs in the manual project).
  • Tests: unit per tool + an integration test proving the flag gates registration (off = tools absent, on = present).
  • Do NOT shadow or conflict with existing tool names.

Out of scope

  • Write verbs (write, mv, rm) — later issue if the read-side A/B justifies it.
  • Section indexing (section=, max_tokens= actually working) — separate sub-issue; parameters may exist but return a clear not-yet-supported error.
  • CLI bm cat/grep/... verbs — separate sub-issue.

Acceptance

  • Flag off (default): tool listing identical to today.
  • Flag on: six new tools registered and functional against a real project.
  • just test-sqlite green; coverage holds.

🤖 Generated with Claude Code

https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp

Activity

  1. claude commented on Aug 31, 2026

    @claude
    Contributor

    Claude finished @phernandez's task in 31s —— View job


    Triage

    Type: Enhancement (feature request) — labeled enhancement.
    Component: MCP tools (no repository label; not a Cloud-specific concern, so component: none).
    Priority: Low/Medium — additive, flag-gated, no impact on existing tool surface when off.
    Complexity: Medium — six thin read-side tools (cat, grep, ls, find, tail, man) mapping to existing API routes via typed clients, gated at the MCP composition root, plus unit tests and a flag-gating integration test. No new service logic, but touches mcp/container.py and adds a new config flag, six tool modules, and a manual project for man/apropos.

    Duplicates: None found. This is part of the SPEC-47 POSIX tool surface tracker (#1398), alongside the companion sub-issues #1403 (section indexing — a listed dependency for the stubbed section/max_tokens params here), #1404 (CLI POSIX verbs, explicitly out of scope for this issue), and #1401 (the eval that will A/B this surface). No conflicting or overlapping open issue proposes the same enable_posix_tools-gated MCP tool set.

    Notes for implementation: The issue is well-specified (flag default, per-tool route mapping, out-of-scope boundaries, acceptance criteria) and doesn't need clarifying questions before pickup.

  2. added
    enhancement
    on Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions