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,7 +5,7 @@ import pytest
|
||||
|
||||
from fabledassistant.mcp._context import _user_id_ctx
|
||||
from fabledassistant.mcp.tools.milestones import (
|
||||
fable_list_milestones, fable_create_milestone, fable_update_milestone,
|
||||
list_milestones, create_milestone, update_milestone,
|
||||
)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ async def test_list_milestones_returns_dict_with_progress():
|
||||
"fabledassistant.mcp.tools.milestones.milestones_svc.get_project_milestone_summary",
|
||||
AsyncMock(return_value=rows),
|
||||
):
|
||||
out = await fable_list_milestones(project_id=1)
|
||||
out = await list_milestones(project_id=1)
|
||||
assert out["milestones"] == rows
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ async def test_create_milestone_passes_through():
|
||||
m = _fake_ms(id=5)
|
||||
mock = AsyncMock(return_value=m)
|
||||
with patch("fabledassistant.mcp.tools.milestones.milestones_svc.create_milestone", mock):
|
||||
out = await fable_create_milestone(project_id=1, title="new", description="d")
|
||||
out = await create_milestone(project_id=1, title="new", description="d")
|
||||
assert out["id"] == 5
|
||||
assert mock.call_args.kwargs["project_id"] == 1
|
||||
assert mock.call_args.kwargs["title"] == "new"
|
||||
@@ -53,7 +53,7 @@ async def test_create_milestone_empty_description_becomes_none():
|
||||
m = _fake_ms()
|
||||
mock = AsyncMock(return_value=m)
|
||||
with patch("fabledassistant.mcp.tools.milestones.milestones_svc.create_milestone", mock):
|
||||
await fable_create_milestone(project_id=1, title="t", description="")
|
||||
await create_milestone(project_id=1, title="t", description="")
|
||||
assert mock.call_args.kwargs["description"] is None
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ async def test_update_milestone_only_sends_non_default_fields():
|
||||
m = _fake_ms()
|
||||
mock = AsyncMock(return_value=m)
|
||||
with patch("fabledassistant.mcp.tools.milestones.milestones_svc.update_milestone", mock):
|
||||
await fable_update_milestone(project_id=1, milestone_id=5, status="done")
|
||||
await update_milestone(project_id=1, milestone_id=5, status="done")
|
||||
args, kwargs = mock.call_args
|
||||
assert args == (7, 5)
|
||||
assert kwargs == {"status": "done"}
|
||||
@@ -74,7 +74,7 @@ async def test_update_milestone_order_index_negative_is_omitted():
|
||||
m = _fake_ms()
|
||||
mock = AsyncMock(return_value=m)
|
||||
with patch("fabledassistant.mcp.tools.milestones.milestones_svc.update_milestone", mock):
|
||||
await fable_update_milestone(project_id=1, milestone_id=5, order_index=-1)
|
||||
await update_milestone(project_id=1, milestone_id=5, order_index=-1)
|
||||
assert "order_index" not in mock.call_args.kwargs
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ async def test_update_milestone_order_index_zero_is_explicit():
|
||||
m = _fake_ms()
|
||||
mock = AsyncMock(return_value=m)
|
||||
with patch("fabledassistant.mcp.tools.milestones.milestones_svc.update_milestone", mock):
|
||||
await fable_update_milestone(project_id=1, milestone_id=5, order_index=0)
|
||||
await update_milestone(project_id=1, milestone_id=5, order_index=0)
|
||||
assert mock.call_args.kwargs["order_index"] == 0
|
||||
|
||||
|
||||
@@ -95,4 +95,4 @@ async def test_update_milestone_raises_when_not_found():
|
||||
AsyncMock(return_value=None),
|
||||
):
|
||||
with pytest.raises(ValueError, match="milestone 999 not found"):
|
||||
await fable_update_milestone(project_id=1, milestone_id=999, title="x")
|
||||
await update_milestone(project_id=1, milestone_id=999, title="x")
|
||||
|
||||
Reference in New Issue
Block a user