refactor(mcp): drop fable_ prefix from tool names; rebrand to Scribe
MCP clients see tools namespaced by the server's local name already
(mcp__<server>__<tool>), so the fable_ prefix on every tool name was
redundant and ate tokens in the model's tool list.
Tools renamed (34 total):
fable_search → search
fable_list_notes / get_note / create_note / update_note / delete_note → list_notes / ...
fable_list_tasks / get_task / create_task / update_task / add_task_log → list_tasks / ...
fable_list_projects / get_project / create_project / update_project → list_projects / ...
fable_list_milestones / create_milestone / update_milestone → list_milestones / ...
fable_list_events / create_event / get_event / update_event / delete_event → list_events / ...
fable_list_tags → list_tags
fable_get_recent → get_recent
fable_list_persons / create_person / update_person → list_persons / ...
fable_list_places / create_place / update_place → list_places / ...
fable_list_lists / create_list / update_list → list_lists / ...
Also rebranded in MCP scope:
FastMCP("fable", ...) → FastMCP("scribe", ...)
auth realm "fable-mcp" → "scribe-mcp"
ASGI scope key fable_user_id → scribe_user_id
ContextVar label fable_mcp_user_id → scribe_mcp_user_id
Tool docstrings "in Fable" / "Fable task" → "in Scribe" / "Scribe task"
Server _INSTRUCTIONS prose
Deliberately kept:
- The internal Python package name `fabledassistant` (per project naming
convention — internal stays).
- "Fabled Scribe" as the official product/brand name (page footer,
smtp_from_name default).
- References to the legacy `fable-mcp/` standalone package in docstrings
explaining what we ported from — accurate until that directory is
deleted in Phase 10.
Client impact: existing MCP registrations need
claude mcp remove <name> && claude mcp add ...
once with a freshly-copied snippet from Settings → MCP Access. Claude
Code then re-discovers tools on connect — old conversations that
referenced fable_* tool names will see "tool not found" on those calls
until updated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,18 +17,18 @@ from fabledassistant.mcp._context import current_user_id
|
||||
from fabledassistant.services import notes as notes_svc
|
||||
|
||||
|
||||
async def fable_list_notes(
|
||||
async def list_notes(
|
||||
limit: int = 20,
|
||||
offset: int = 0,
|
||||
tag: str = "",
|
||||
search_text: str = "",
|
||||
) -> dict:
|
||||
"""List notes (non-task documents) stored in Fable.
|
||||
"""List notes (non-task documents) stored in Scribe.
|
||||
|
||||
Optionally filter by a single tag (plain string, no # prefix) or a keyword
|
||||
search against title and body. Results are ordered by last-updated descending.
|
||||
|
||||
Use fable_search for semantic/meaning-based lookup instead of exact keyword search.
|
||||
Use search for semantic/meaning-based lookup instead of exact keyword search.
|
||||
"""
|
||||
uid = current_user_id()
|
||||
rows, total = await notes_svc.list_notes(
|
||||
@@ -42,8 +42,8 @@ async def fable_list_notes(
|
||||
return {"notes": [n.to_dict() for n in rows], "total": total}
|
||||
|
||||
|
||||
async def fable_get_note(note_id: int) -> dict:
|
||||
"""Fetch the full content of a single Fable note by its ID.
|
||||
async def get_note(note_id: int) -> dict:
|
||||
"""Fetch the full content of a single Scribe note by its ID.
|
||||
|
||||
Returns id, title, body (markdown), tags, project_id, created_at, updated_at.
|
||||
"""
|
||||
@@ -54,13 +54,13 @@ async def fable_get_note(note_id: int) -> dict:
|
||||
return note.to_dict()
|
||||
|
||||
|
||||
async def fable_create_note(
|
||||
async def create_note(
|
||||
title: str,
|
||||
body: str = "",
|
||||
tags: list[str] | None = None,
|
||||
project_id: int = 0,
|
||||
) -> dict:
|
||||
"""Create a new note in Fable.
|
||||
"""Create a new note in Scribe.
|
||||
|
||||
Args:
|
||||
title: Note title (required).
|
||||
@@ -81,14 +81,14 @@ async def fable_create_note(
|
||||
return note.to_dict()
|
||||
|
||||
|
||||
async def fable_update_note(
|
||||
async def update_note(
|
||||
note_id: int,
|
||||
title: str = "",
|
||||
body: str = "",
|
||||
tags: list[str] | None = None,
|
||||
project_id: int = 0,
|
||||
) -> dict:
|
||||
"""Update an existing Fable note. Only explicitly provided fields are changed.
|
||||
"""Update an existing Scribe note. Only explicitly provided fields are changed.
|
||||
|
||||
Args:
|
||||
note_id: ID of the note to update.
|
||||
@@ -113,8 +113,8 @@ async def fable_update_note(
|
||||
return note.to_dict()
|
||||
|
||||
|
||||
async def fable_delete_note(note_id: int) -> str:
|
||||
"""Permanently delete a Fable note by ID. This cannot be undone."""
|
||||
async def delete_note(note_id: int) -> str:
|
||||
"""Permanently delete a Scribe note by ID. This cannot be undone."""
|
||||
uid = current_user_id()
|
||||
deleted = await notes_svc.delete_note(uid, note_id)
|
||||
if not deleted:
|
||||
@@ -124,10 +124,10 @@ async def fable_delete_note(note_id: int) -> str:
|
||||
|
||||
def register(mcp) -> None:
|
||||
for fn in (
|
||||
fable_list_notes,
|
||||
fable_get_note,
|
||||
fable_create_note,
|
||||
fable_update_note,
|
||||
fable_delete_note,
|
||||
list_notes,
|
||||
get_note,
|
||||
create_note,
|
||||
update_note,
|
||||
delete_note,
|
||||
):
|
||||
mcp.tool(name=fn.__name__)(fn)
|
||||
|
||||
Reference in New Issue
Block a user