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:
@@ -5,8 +5,8 @@ import pytest
|
||||
|
||||
from fabledassistant.mcp._context import _user_id_ctx
|
||||
from fabledassistant.mcp.tools.projects import (
|
||||
fable_list_projects, fable_get_project, fable_create_project,
|
||||
fable_update_project,
|
||||
list_projects, get_project, create_project,
|
||||
update_project,
|
||||
)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ async def test_list_projects_wraps_in_dict():
|
||||
"fabledassistant.mcp.tools.projects.projects_svc.list_projects",
|
||||
AsyncMock(return_value=rows),
|
||||
):
|
||||
out = await fable_list_projects()
|
||||
out = await list_projects()
|
||||
assert len(out["projects"]) == 2
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ async def test_get_project_enriches_with_milestone_summary():
|
||||
"fabledassistant.mcp.tools.projects.milestones_svc.get_project_milestone_summary",
|
||||
AsyncMock(return_value=milestone_summary),
|
||||
):
|
||||
out = await fable_get_project(project_id=5)
|
||||
out = await get_project(project_id=5)
|
||||
assert out["id"] == 5
|
||||
assert out["milestone_summary"] == milestone_summary
|
||||
|
||||
@@ -60,7 +60,7 @@ async def test_get_project_raises_when_not_found():
|
||||
AsyncMock(return_value=None),
|
||||
):
|
||||
with pytest.raises(ValueError, match="project 999 not found"):
|
||||
await fable_get_project(project_id=999)
|
||||
await get_project(project_id=999)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -68,7 +68,7 @@ async def test_create_project_passes_color_empty_as_none():
|
||||
p = _fake_project()
|
||||
mock = AsyncMock(return_value=p)
|
||||
with patch("fabledassistant.mcp.tools.projects.projects_svc.create_project", mock):
|
||||
await fable_create_project(title="P", color="")
|
||||
await create_project(title="P", color="")
|
||||
assert mock.call_args.kwargs["color"] is None
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ async def test_update_project_only_sends_non_default_fields():
|
||||
p = _fake_project()
|
||||
mock = AsyncMock(return_value=p)
|
||||
with patch("fabledassistant.mcp.tools.projects.projects_svc.update_project", mock):
|
||||
await fable_update_project(project_id=1, status="archived")
|
||||
await update_project(project_id=1, status="archived")
|
||||
args, kwargs = mock.call_args
|
||||
assert args == (7, 1)
|
||||
assert kwargs == {"status": "archived"}
|
||||
@@ -90,4 +90,4 @@ async def test_update_project_raises_when_not_found():
|
||||
AsyncMock(return_value=None),
|
||||
):
|
||||
with pytest.raises(ValueError, match="project 999 not found"):
|
||||
await fable_update_project(project_id=999, title="x")
|
||||
await update_project(project_id=999, title="x")
|
||||
|
||||
Reference in New Issue
Block a user