Expand description
The document hand-off family: one tool a session calls to hand the person at a client a document - markdown, a PDF or plain text - which opens in the client’s own viewer rather than in the conversation.
The tool answers at the reader’s decision, like the browser hand-off.
The call parks on the ask - open or not now - and the viewer’s
approve or feedback releases it with the decision, the note and
the review the finish filed; a review the reader leaves
is filed under the document’s own scope and named in the answer, so the
agent reads it back like any review. A session spawned without the
review family still hands off, but its description and answer name the
family it lacks instead of telling it to call a tool it does not have.
NotNow ends the call with the reader’s decline. A detached client
leaves the call parked, and the ask is re-readable when a client
returns; only the waiter’s own drop abandons it.
Any-caller and not toggleable, like the browser: every session may
hand a document out of its own tree, and the read resolves against that
tree or its project’s document_roots - so there is nothing a project
could withhold. Every state the read can refuse is the call’s failure,
with the read’s own sentence in it.
Re-exports§
use std::sync::Arc;🔒use forge_primitives::SessionSlot;🔒use forge_primitives::document::DocumentHandOffEnding;🔒use forge_primitives::review::doc_scope_ref;🔒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_sdk::mcp::tool::ToolOutputBlock;🔒use serde_json::Value;🔒use crate::mcp::documents::facade::DocumentFacade;🔒
Modules§
- facade
- The narrow surface the document tool calls: one verb, the workspace’s own read-and-raise.
Structs§
- Hand
OffTool 🔒 - The one tool: the hand-off itself.
Constants§
- DESCRIPTION 🔒
- What the model reads about the tool before calling it: what it hands
over, when
reviewableearns its place, and which moment this answers. - DESCRIPTION_
WITHOUT_ 🔒REVIEW - What a session spawned without
reviewreads instead, before it calls: the hand-off works and the reader may still review, but the review is the lead’s to read, so the plain description would promise it back. The paragraphs it shares withDESCRIPTIONchange in both.
Functions§
- add_
tools 🔒 - Attach the hand-off tool to an existing builder, so it shares the
forgeserver name with every other family.