1942913366
CI & Build / Python lint (push) Successful in 2s
CI & Build / integration (push) Successful in 20s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Successful in 50s
CI & Build / Build & push image (push) Successful in 1m7s
Record reusable functions/components once so they surface via the existing semantic search + title-first auto-inject, instead of re-solving as one-offs. A snippet is a Note with note_type='snippet' (no schema change): note_type is free-text, and semantic_search_notes never filters by type, so snippets join the recall/auto-inject pool the moment they're embedded. Structured fields (name/language/signature/location/when_to_use/code) are stored via a body convention — title = "name — when to use" (what auto-inject surfaces), language + "snippet" as tags, templated markdown body — keeping storage swappable later without changing the tool/UI contract. - services/snippets.py: compose/parse helpers + create/get/list/update wrappers over notes_svc (dedup + System association reused). - mcp/tools/snippets.py: list_snippets / create_snippet / get_snippet / update_snippet, registered in tools/__init__.py. - unit tests for the serialize/parse round-trip and the MCP tool surface. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pa2EsuB54BuWQ8GfJq9c7t
27 lines
815 B
Python
27 lines
815 B
Python
"""MCP tool implementations.
|
|
|
|
Each tool module exposes a `register(mcp)` function that attaches its tools
|
|
to a FastMCP instance. `register_all(mcp)` is the single entry point called
|
|
from `mcp.server.build_mcp_server`.
|
|
"""
|
|
from scribe.mcp.tools import (
|
|
milestones, notes, processes, projects, recent, repos, rulebooks, search, snippets, systems, tags, tasks, trash,
|
|
)
|
|
|
|
|
|
def register_all(mcp) -> None:
|
|
"""Register every tool module's tools on the given FastMCP instance."""
|
|
search.register(mcp)
|
|
notes.register(mcp)
|
|
tasks.register(mcp)
|
|
projects.register(mcp)
|
|
milestones.register(mcp)
|
|
systems.register(mcp)
|
|
tags.register(mcp)
|
|
recent.register(mcp)
|
|
repos.register(mcp)
|
|
processes.register(mcp)
|
|
snippets.register(mcp)
|
|
rulebooks.register(mcp)
|
|
trash.register(mcp)
|