Expand description
Settings MCP - forge’s configuration, read and edited through the same
catalogue and writer the settings page uses (mcp__forge__settings__*).
The four tools are ANY-CALLER and always on for every session. The config is what the session itself runs under, so no project can withhold the door to it.
-
settings__index- the catalogue’s shape: type, state and effect class per key, no values. -
settings__get- one key’s value; the caller’s own project’s keys and the global keys read freely, another project’s key is refused by name. -
settings__set- one catalogue-validated save of one key or a batch of them, always held for the reader’s approval before anything is written;settings__unsetclears one key on the same terms. -
facade- theSettingsFacadeseam (prod overWeak<Workspace>+ a mock for tool tests).
Re-exports§
use std::sync::Arc;🔒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 crate::SessionSlot;🔒use crate::mcp::settings::facade::SettingsError;🔒use crate::mcp::settings::facade::SettingsFacade;🔒use crate::mcp::settings::facade::SettingsSetItem;🔒use crate::mcp::settings::facade::SettingsWriteOutcome;🔒
Modules§
- facade 🔒
SettingsFacade- the seam between the settings MCP tools and the config machinery. The production impl (ProdSettingsFacade) reads the document the settings page draws and routes every write through the workspace’s held-write registry; the mock returns preloaded results so the tool tests can assert argument handling and error surfacing without a config.
Structs§
Functions§
- add_
tools 🔒 - Attach the settings tools to an existing
McpServerBuilder. Called for BOTH lead and worker sessions, unconditionally: the config is every session’s own environment. - effect_
name 🔒 - effect_
names 🔒 - tool_
error 🔒