Expand description
Task MCP - the project’s live task list (mcp__forge__tasks__*).
forge owns the task list its sessions work from: a task is a declared
piece of work in flight, stored in the machine-local redb store (see
crate::store::tasks) and rendered by the Inspector’s TASKS
section. The CLI’s own task tools are gated per model and do not
survive a session, so forge does not use them.
The tools (tasks__create / tasks__update / tasks__list /
tasks__delete / tasks__claim / tasks__wait) are ANY-CALLER,
scoped to the caller’s own project - a worker creating its own
subtasks is the normal case, and any session may move any task in its
project; tasks__approve is the lead’s own door and is not offered to
a worker. Task-list mutations are direct Workspace methods (state
writes), not Command-bus dispatches.
facade- theTasksFacadeseam (prod overWeak<Workspace>+ a mock for tool tests).
Re-exports§
use std::sync::Arc;🔒use std::time::SystemTime;🔒use forge_sdk::mcp::server::McpServerBuilder;🔒use forge_sdk::mcp::tool::Tool;🔒use forge_sdk::mcp::tool::ToolInput;🔒use forge_sdk::mcp::tool::ToolOutput;🔒use forge_primitives::tasks::LinkKind;🔒use forge_primitives::tasks::Task;🔒use forge_primitives::tasks::TaskId;🔒use forge_primitives::tasks::TaskStatus;🔒use forge_primitives::tasks::WaitingKind;🔒use crate::SessionSlot;🔒use crate::mcp::tasks::facade::TaskDraft;🔒use crate::mcp::tasks::facade::TaskPatch;🔒use crate::mcp::tasks::facade::TasksError;🔒use crate::mcp::tasks::facade::TasksFacade;🔒
Modules§
- facade 🔒
TasksFacade- the seam between the task MCP tools and workspace state. The production impl (ProdTasksFacade) resolves the caller’s project and drives the directWorkspacetask methods; the mock records calls for tool tests.
Structs§
- Approve 🔒
- Approve
Args 🔒 - Claim 🔒
- Claim
Args 🔒 - Create 🔒
- Delete 🔒
- Delete
Args 🔒 - List 🔒
- List
Args 🔒 - Update 🔒
- Update
Args 🔒 - Wait 🔒
- Wait
Args 🔒
Functions§
- add_
tools 🔒 - Attach the task tools to an existing
McpServerBuilder. Called for BOTH lead and worker sessions (tasks are any-caller), sobuild_forge_serverinvokes this unconditionally. - board_
row_ 🔒to_ json - One board row as the tool output reads it: the record, what the board derived, and the wait it is sitting on.
- fmt_
rfc3339 🔒 - Format a
SystemTimeas a UTC RFC3339 string for tool output. - format_
tasks_ 🔒error - status_
str 🔒 - The status as the schema spells it.
- task_
to_ 🔒json - Readable JSON for one task (the tool-output shape the LLM sees). Absent optional fields are omitted rather than sent as null.
- tool_
error 🔒 - verify_
str 🔒 - The gate as the tool schema spells it.
- waiting_
kind_ 🔒str