extract_content
Extract content from PDF rulebooks and save as CustomSource JSON for use in AI-assisted Dungeons & Dragons campaigns. Specify source, content name, and type to prepare game elements for the rulebook system.
Instructions
Extract content from a PDF source and save as CustomSource JSON.
Extracts the full content definition from a PDF source based on the table of contents entry. The extracted content is saved to the library/extracted/{source_id}/ directory in CustomSource JSON format, ready to be loaded by the rulebook system.
Examples: - extract_content("tome-of-heroes", "Fighter", "class") - extract_content("phb", "Elf", "race") - extract_content("phb", "Fireball", "spell")
Args: source_id: The source identifier (use list_library to see available sources) content_name: Name of the content to extract (as shown in TOC) content_type: Type of content (class, race, spell, monster, feat, item)
Returns: Success message with path to extracted file, or error message
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_id | Yes | The source identifier (e.g., 'tome-of-heroes') | |
| content_name | Yes | Name of the content to extract (e.g., 'Fighter', 'Elf') | |
| content_type | Yes | Type of content to extract |