disable_library_source
Remove a library source from the current campaign's enabled content to prevent its use in gameplay.
Instructions
Disable a library source for the current campaign.
Removes a library source from the campaign's enabled content. The source will no longer be available for use in this campaign.
Args: source_id: The source identifier (use list_enabled_library to see enabled sources)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_id | Yes | The source identifier to disable |
Implementation Reference
- src/dm20_protocol/storage.py:1324-1339 (handler)The `disable_library_source` method in `DnDStorage` class handles disabling a library source for the active campaign. It updates the `_library_bindings` object and saves the updated bindings to disk.
def disable_library_source(self, source_id: str) -> None: """Disable a library source for the current campaign. Args: source_id: The source identifier to disable """ if not self._current_campaign: raise ValueError("No current campaign") if not self._library_bindings: raise ValueError("Library bindings not initialized") self._library_bindings.disable_source(source_id) self._save_library_bindings() logger.info(f"🚫 Disabled library source '{source_id}' for campaign '{self._current_campaign.name}'") - src/dm20_protocol/permissions.py:182-182 (registration)The `disable_library_source` tool is registered in the `_DM_ONLY_TOOLS` set within `src/dm20_protocol/permissions.py`, restricting its usage to the Dungeon Master (DM) role.
"disable_library_source",