feat/mcp-resources-and-tool-coverage #1

Merged
hans merged 2 commits from feat/mcp-resources-and-tool-coverage into main 2026-08-31 06:24:08 +02:00
Owner
No description provided.
Captures the gap found in an agent session: search works, but there is
no way over MCP to learn which repositories exist, what the legal
tag/department values are, or what links back to a note. Proposes
registry/repo/taxonomy resources, generic list_resources/read_resource
plus dedicated shortcut tools, a backlinks tool wrapping the existing
BacklinkStore, and a ranked survey of the remaining CLI surface.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZQjS377gLWp3E4anrN2Yq
Implements the first cut from
docs/extensions/mcp-resources-and-tool-coverage.md.

ApplicationServices (the one place the aggregation lives):
  - repo_inventory() -> [RepoInfo]: every registry entry plus local
    facts (accessible, indexed_commit, note_count, shared checkout).
    Inaccessible repos are listed, marked accessible=False.
  - tags_taxonomy() -> TaxonomyInfo: the resolved tags taxonomy;
    never raises, reports configured/loaded/error instead.
  - backlinks(note_id) -> [Backlink]: reverse of follow_links,
    wrapping BacklinkStore, re-resolving each source through get_note
    and surfacing the per-link link_type.
  - new optional `registry_path` field so tags_taxonomy() can resolve
    the taxonomy file; the CLI passes it from _build_services().

MCP (mcp/resources.py holds the shared JSON projection):
  - resources zettel://registry, zettel://tags,
    zettel://repo/{shortname}
  - tools list_resources / read_resource (generic; read_resource
    rejects any URI outside the enumerated set), list_repos,
    get_tags_taxonomy, backlinks
  - registered both ways on purpose: client support for resources is
    uneven, tools are driven reliably.

CLI: `zettel repos` and `zettel taxonomy` (both with --json).

Docs: fixed the follow_links row in mcp-server.md (it does not return
backlinks) and listed the new surface; AGENTS.md updated.

+22 tests; full suite green (506).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZQjS377gLWp3E4anrN2Yq
hans merged commit 62d95706de into main 2026-08-31 06:24:08 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hans/zettelmesh!1
No description provided.