Agent / foldkit-agent-webmcp
Tools follow the Model
Availability is Model-dependent, so the advertised WebMCP tool set may change as the application changes:
ts
RequestedDeleteTodo: {
name: 'delete_todo',
description: 'Delete the selected todo',
available: model => Option.isSome(model.selectedTodoId),
}no selection tools: create_todo
|
user selects todo
v
selected todo tools: create_todo, delete_todoWith followModel: true (the default) and a host with subscribe, a Model
change reconciles registrations. A capability that disappears is unregistered;
a newly available capability is registered.
Availability is stronger than discoverability. A capability absent from the tool list is also refused if a caller somehow invokes its known name.
Reconciliation is serialized, so overlapping Model changes cannot register the same capability twice. A failed browser registration is not recorded as live and is retried on a later reconcile.