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:
@@ -3,9 +3,9 @@
|
||||
Tasks are notes with a non-null `status` — same model, different filter.
|
||||
Wrappers call services/notes.py for CRUD with is_task=True and add the
|
||||
task-specific fields (status, priority, due_date, parent_id), plus
|
||||
services/task_logs.py for fable_add_task_log.
|
||||
services/task_logs.py for add_task_log.
|
||||
|
||||
There is no fable_delete_task — matches the existing fable-mcp surface.
|
||||
There is no delete_task — matches the existing fable-mcp surface.
|
||||
Cancel by updating status to "cancelled".
|
||||
|
||||
Sentinels (preserved from existing fable-mcp):
|
||||
@@ -23,13 +23,13 @@ from fabledassistant.services import notes as notes_svc
|
||||
from fabledassistant.services import task_logs as task_logs_svc
|
||||
|
||||
|
||||
async def fable_list_tasks(
|
||||
async def list_tasks(
|
||||
limit: int = 20,
|
||||
offset: int = 0,
|
||||
status: str = "",
|
||||
project_id: int = 0,
|
||||
) -> dict:
|
||||
"""List tasks in Fable.
|
||||
"""List tasks in Scribe.
|
||||
|
||||
Args:
|
||||
status: Filter by status — one of: todo, in_progress, done, cancelled. Omit for all.
|
||||
@@ -49,8 +49,8 @@ async def fable_list_tasks(
|
||||
return {"tasks": [n.to_dict() for n in rows], "total": total}
|
||||
|
||||
|
||||
async def fable_get_task(task_id: int) -> dict:
|
||||
"""Fetch a single Fable task by ID.
|
||||
async def get_task(task_id: int) -> dict:
|
||||
"""Fetch a single Scribe task by ID.
|
||||
|
||||
Returns id, title, body, status, priority, tags, project_id, milestone_id,
|
||||
parent_id, parent_title, due_date, created_at, updated_at.
|
||||
@@ -69,7 +69,7 @@ async def fable_get_task(task_id: int) -> dict:
|
||||
return data
|
||||
|
||||
|
||||
async def fable_create_task(
|
||||
async def create_task(
|
||||
title: str,
|
||||
body: str = "",
|
||||
status: str = "todo",
|
||||
@@ -79,7 +79,7 @@ async def fable_create_task(
|
||||
parent_id: int = 0,
|
||||
tags: list[str] | None = None,
|
||||
) -> dict:
|
||||
"""Create a new task in Fable.
|
||||
"""Create a new task in Scribe.
|
||||
|
||||
Args:
|
||||
title: Task title (required).
|
||||
@@ -106,7 +106,7 @@ async def fable_create_task(
|
||||
return note.to_dict()
|
||||
|
||||
|
||||
async def fable_update_task(
|
||||
async def update_task(
|
||||
task_id: int,
|
||||
title: str = "",
|
||||
body: str = "",
|
||||
@@ -115,7 +115,7 @@ async def fable_update_task(
|
||||
project_id: int = 0,
|
||||
milestone_id: int = 0,
|
||||
) -> dict:
|
||||
"""Update an existing Fable task. Only explicitly provided fields are changed.
|
||||
"""Update an existing Scribe task. Only explicitly provided fields are changed.
|
||||
|
||||
Args:
|
||||
task_id: ID of the task to update.
|
||||
@@ -146,8 +146,8 @@ async def fable_update_task(
|
||||
return note.to_dict()
|
||||
|
||||
|
||||
async def fable_add_task_log(task_id: int, content: str) -> dict:
|
||||
"""Append a timestamped progress log entry to a Fable task.
|
||||
async def add_task_log(task_id: int, content: str) -> dict:
|
||||
"""Append a timestamped progress log entry to a Scribe task.
|
||||
|
||||
Use this to record work sessions, decisions, or status updates over time
|
||||
without overwriting the task's main body. Each entry is stored separately
|
||||
@@ -163,10 +163,10 @@ async def fable_add_task_log(task_id: int, content: str) -> dict:
|
||||
|
||||
def register(mcp) -> None:
|
||||
for fn in (
|
||||
fable_list_tasks,
|
||||
fable_get_task,
|
||||
fable_create_task,
|
||||
fable_update_task,
|
||||
fable_add_task_log,
|
||||
list_tasks,
|
||||
get_task,
|
||||
create_task,
|
||||
update_task,
|
||||
add_task_log,
|
||||
):
|
||||
mcp.tool(name=fn.__name__)(fn)
|
||||
|
||||
Reference in New Issue
Block a user