feat(plan): MCP task tools — kind on create_task + list_tasks
This commit is contained in:
@@ -28,12 +28,14 @@ async def list_tasks(
|
||||
offset: int = 0,
|
||||
status: str = "",
|
||||
project_id: int = 0,
|
||||
kind: str = "",
|
||||
) -> dict:
|
||||
"""List tasks in Scribe.
|
||||
|
||||
Args:
|
||||
status: Filter by status — one of: todo, in_progress, done, cancelled. Omit for all.
|
||||
project_id: Filter to a specific project. Use 0 for no filter.
|
||||
kind: Filter by task kind — 'work' or 'plan'. Omit (empty) for all kinds.
|
||||
|
||||
Results are ordered by last-updated descending.
|
||||
"""
|
||||
@@ -43,6 +45,7 @@ async def list_tasks(
|
||||
is_task=True,
|
||||
status=status or None,
|
||||
project_id=project_id or None,
|
||||
task_kind=kind or None,
|
||||
limit=max(1, min(limit, 100)),
|
||||
offset=max(0, offset),
|
||||
)
|
||||
@@ -78,6 +81,7 @@ async def create_task(
|
||||
milestone_id: int = 0,
|
||||
parent_id: int = 0,
|
||||
tags: list[str] | None = None,
|
||||
kind: str = "work",
|
||||
) -> dict:
|
||||
"""Create a new task in Scribe.
|
||||
|
||||
@@ -90,6 +94,7 @@ async def create_task(
|
||||
milestone_id: Place within a project milestone (0 = no milestone).
|
||||
parent_id: Make this a sub-task of another task (0 = top-level).
|
||||
tags: List of plain-string tags without # prefix.
|
||||
kind: 'work' (default) or 'plan'. Prefer the start_planning tool to create plans.
|
||||
"""
|
||||
uid = current_user_id()
|
||||
note = await notes_svc.create_note(
|
||||
@@ -102,6 +107,7 @@ async def create_task(
|
||||
milestone_id=milestone_id or None,
|
||||
parent_id=parent_id or None,
|
||||
tags=tags,
|
||||
task_kind=kind,
|
||||
)
|
||||
return note.to_dict()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user