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:
2026-05-27 11:48:55 -04:00
co-authored by Claude Opus 4.7
parent 97c22941a8
commit 6aa84002b3
19 changed files with 191 additions and 190 deletions
+12 -12
View File
@@ -21,8 +21,8 @@ from fabledassistant.services import milestones as milestones_svc
from fabledassistant.services import projects as projects_svc
async def fable_list_projects() -> dict:
"""List all Fable projects for the current user.
async def list_projects() -> dict:
"""List all Scribe projects for the current user.
Returns id, title, description, goal, status (active/archived), color,
and a short auto-generated summary for each project.
@@ -32,8 +32,8 @@ async def fable_list_projects() -> dict:
return {"projects": [p.to_dict() for p in rows]}
async def fable_get_project(project_id: int) -> dict:
"""Fetch a Fable project by ID, including its milestone summary.
async def get_project(project_id: int) -> dict:
"""Fetch a Scribe project by ID, including its milestone summary.
Returns full project fields plus a milestone_summary list with each
milestone's id, title, status, and task counts.
@@ -49,14 +49,14 @@ async def fable_get_project(project_id: int) -> dict:
return data
async def fable_create_project(
async def create_project(
title: str,
description: str = "",
goal: str = "",
status: str = "active",
color: str = "",
) -> dict:
"""Create a new project in Fable.
"""Create a new project in Scribe.
Args:
title: Project name (required).
@@ -77,7 +77,7 @@ async def fable_create_project(
return project.to_dict()
async def fable_update_project(
async def update_project(
project_id: int,
title: str = "",
description: str = "",
@@ -85,7 +85,7 @@ async def fable_update_project(
status: str = "",
color: str = "",
) -> dict:
"""Update an existing Fable project. Only explicitly provided fields are changed.
"""Update an existing Scribe project. Only explicitly provided fields are changed.
Args:
project_id: ID of the project to update.
@@ -115,9 +115,9 @@ async def fable_update_project(
def register(mcp) -> None:
for fn in (
fable_list_projects,
fable_get_project,
fable_create_project,
fable_update_project,
list_projects,
get_project,
create_project,
update_project,
):
mcp.tool(name=fn.__name__)(fn)