Skip to main content
Glama

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
NameRequiredDescriptionDefault
source_idYesThe source identifier to disable

Implementation Reference

  • 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}'")
  • 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",
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Polloinfilzato/dm20-protocol'

If you have feedback or need assistance with the MCP directory API, please join our Discord server