Chat Tools
Chat tools are callable functions the Chat assistant can use inside Lis Novel chats.
They are available only in Chat (not in prompt templates or editor automation), and they can both read and write data.
Scope, safety, and behavior
- Scope: tools run against the active novel.
- Lore scope: lore tools include the active novel and (when present) its series-scoped lore/fields.
- No web access: tools only read/write local Lis Novel data.
- Hidden lore: lore entries with
aiVisibility = hiddenare excluded unless explicitly allowed by attached lore context. - AI-hidden sections: scene manuscript/content exposed to tools omits section blocks marked
hideFromAi=true. - Soft-deleted content: tools operate on active records (deleted scenes/chapters/acts/notes are excluded).
- Confirmation: destructive actions require
confirm: true(or throw a confirmation-required error).
Global limits
- Lore/note/scene search tools: default
limit = 20, max50. - Scene excerpt tools: default
excerptSize = 160, max400. get_scenes: max200scene ids.get_novel_outline_snapshot: max500scoped scenes.analyze_scene_summary_alignment: max200analyzed scenes.create_scene_beats: 1..50 beats per call.list_lore_fields: defaultlimit = 200, max500.
Lore tools
search_lore_entries
Search by name, aliases, tags, or description.
- Inputs:
query(required),includeAliases(defaulttrue),includeTags(defaulttrue),limit. - Returns:
{ matches: LoreEntrySummary[] }withname,type,aiVisibility,customDetails,xml.
list_lore_entries
List lore entries (optionally by type).
- Inputs:
type?,limit(default/max50). - Returns:
{ matches }withid,type,aliases,tags,description. - Note: does not return
name.
get_lore_entry
Fetch one lore entry.
- Inputs:
id(required),includeCustomDetails(defaulttrue). - Returns:
{ loreEntry }or{ loreEntry: null }.
list_lore_fields
List custom detail fields.
- Inputs:
limit(default200, max500),collects?(entry type filter). - Returns:
{ fields }.
get_lore_field
Fetch one lore field.
- Inputs:
id(required). - Returns:
{ field }or{ field: null }.
create_lore_entry
Create a lore entry.
- Inputs:
name?,type?(defaultother),description?,aliases?,tags?,aiVisibility?,scope?(novel|series),details?. aiVisibilityvalues:visible | always | manual | hidden.- Returns:
{ loreEntry }. - Note: Chat lore tools use
descriptionas the lore body text field. Lorenotesstay available in the Lore UI but are not exposed to Chat tools.
update_lore_entry
Update lore entry core fields, arrays, and details.
- Inputs:
id(required), plus any of:patch,aliases,tags,details,customDetails,confirm?. patch.aiVisibilityvalues:visible | always | manual | hidden.- Returns:
{ loreEntry }. - Note: use
patch.descriptionfor lore body text updates; Chat tools do not read or write Lore Entrynotes. - Confirmation rule: required for destructive changes (type change or detail clears).
delete_lore_entry
Delete a lore entry.
- Inputs:
id(required),confirm. - Returns:
{ deleted: { id, name, type } }.
create_lore_field
Create a custom detail field.
- Inputs:
name,type(text|line|dropdown|lore_reference),collects?,aiContext?,showInList?,scope?,options?. - Returns:
{ field }. - Note:
optionsare only valid fordropdownfields.
update_lore_field
Update a custom detail field.
- Inputs:
id,patch,confirm?. - Returns:
{ field }. - Confirmation rule: required when changing field
type.
delete_lore_field
Delete a custom detail field.
- Inputs:
id,confirm. - Returns:
{ deleted: { id, name, type } }.
create_lore_field_option
Create a dropdown option.
- Inputs:
loreFieldId,label?,color?. - Returns:
{ option }.
update_lore_field_option
Update a dropdown option.
- Inputs:
id,patch(label?,color?,position?). - Returns:
{ option }.
delete_lore_field_option
Delete a dropdown option.
- Inputs:
id,confirm. - Returns:
{ deleted: { id, label } }.
reorder_lore_field_options
Reorder dropdown options for a field.
- Inputs:
loreFieldId,optionIds(ordered list). - Returns: model reorder result.
set_lore_entry_details
Set/clear detail values for one entry.
- Inputs:
entryId,details(required),clear?,confirm?. - Returns:
{ loreEntry }. - Confirmation rule: required when clearing details.
batch_update_lore_entries
Run multiple lore-entry updates in one call.
- Inputs:
updates(required),confirm?. - Returns:
{ results }(per-entryupdatedorerror). - Note: batch lore text updates use
patch.description; Chat tools do not expose Lore Entrynotes. - Confirmation rule: required when batch includes destructive changes.
Note tools
search_notes
List active notes; optionally compute match scope against a query.
- Inputs:
query?(default empty),scope(title|content|both, defaultboth),limit. - Returns:
{ matches }withid,name,matchScope(title|content|both|none). - Note: when
queryis empty, notes are still listed withmatchScope = none.
get_notes
Fetch notes by id with content rendered to Markdown.
- Inputs:
ids(required, 1..50). - Returns:
{ notes }in requested id order (missing ids are omitted).
create_note
Create a note.
- Inputs:
name?,content?(TipTap JSON),contentText?,favourite?. - Returns:
{ note }.
update_note
Update a note.
- Inputs:
id(required) and at least one ofname,content,contentText,favourite. - Returns:
{ note }.
delete_notes
Delete one or many notes.
- Inputs:
id?,ids?,confirm. - Returns:
{ deleted }. - Rules: requires at least one id and
confirm: true.
Scene search tools
search_scenes_by_phrase
Search manuscripts and/or summaries with excerpts.
- Inputs:
query(required),scope(manuscript|summary|both),limit,excerptSize. - Returns:
{ matches }with scene/act/chapter metadata plus excerpt. - Manuscript scope uses AI-visible prose only (Scene Beats and sections with
hideFromAi=trueare omitted).
search_scenes_by_label
Find scenes by label id or label name.
- Inputs:
labelId?,labelName?,limit(one oflabelId/labelNamerequired). - Returns:
{ matches }. - Note:
labelNamematching is case-sensitive.
search_scenes_by_pov
Find scenes by POV character and optional POV type.
- Inputs:
characterId(required),povType?,limit. - Returns:
{ matches }.
search_structure_by_phrase
Search structure text and optionally group results.
- Inputs:
query(required),level(scene|chapter|act, defaultscene),limit,excerptSize. - Returns:
{ matches }(flat scene matches or grouped chapter/act matches). - Scene prose search text uses AI-visible prose only (sections with
hideFromAi=trueare omitted).
Structure tools
get_story_structure
Get active novel structure.
- Inputs: none.
- Returns:
{ novelId, structureMode, acts }. - Scene
contentin returned structure is sanitized for AI visibility (section blocks withhideFromAi=trueare removed).
get_scenes
Fetch scene metadata + plain-text manuscript.
- Inputs:
ids(required, 1..200). - Returns:
{ scenes }. manuscriptcontains AI-visible prose only (Scene Beats and sections withhideFromAi=trueare omitted).
get_novel_outline_snapshot
Get structure + word-count snapshot.
- Inputs:
actIds?,chapterIds?,sceneIds?,includeSummaries?,includeManuscriptPreview?,previewChars?,maxScenes?. - Returns:
{ novel, scope, scenes }with aggregate counts/stats.
analyze_scene_summary_alignment
Analyze summary/prose alignment.
- Inputs:
actIds?,chapterIds?,sceneIds?,maxScenes?,keywordLimit?,previewChars?. - Returns:
{ novel, scope, totals, scenes }with alignment scores, signals, and recommendations.
create_act
Create an act.
- Inputs:
title?,numerate?. - Returns:
{ act }. - Mode rule: only in
acts_chapters_scenes.
update_act
Update an act.
- Inputs:
id,title?,numerate?. - Returns:
{ act }. - Mode rule: only in
acts_chapters_scenes.
delete_act
Delete an act.
- Inputs:
id,confirm. - Returns:
{ act }. - Mode rule: only in
acts_chapters_scenes.
reorder_acts
Reorder acts.
- Inputs:
actOrder(must include all active act ids exactly once). - Returns:
{ success: true }. - Mode rule: only in
acts_chapters_scenes.
create_chapter
Create a chapter.
- Inputs:
actId?,title?,numerate?. - Returns:
{ chapter }. - Mode rule: unavailable in
scenes_only.
update_chapter
Update/move chapter.
- Inputs:
id,actId?,title?,numerate?. - Returns:
{ chapter }. - Mode rule: unavailable in
scenes_only.
delete_chapter
Delete a chapter.
- Inputs:
id,confirm. - Returns:
{ chapter }.
move_chapter
Move chapter to another act/position.
- Inputs:
chapterId,toActId,toIndex?. - Returns:
{ success: true }. - Mode rule: only in
acts_chapters_scenes.
reorder_chapters
Reorder chapters in an act.
- Inputs:
actId,chapterOrder(full ordered set). - Returns:
{ success: true }.
create_scene
Create a scene.
- Inputs:
chapterId?,subtitle?,summary?,includeInContext?,pov?,contentJson?,contentText?. - Returns:
{ scene }. - Note: if
chapterIdis omitted, the tool uses/creates default act/chapter. - Note: returned
scene.contentis sanitized for AI visibility (sections withhideFromAi=trueare removed).
create_scene_beats
Insert beat blocks into a scene manuscript.
- Inputs:
sceneId?,beats(required, 1..50),insert?(append|prepend, defaultappend),clearExistingBeats?. - Returns:
{ sceneId, beatsCreated, beatIds, resolvedSceneId, insert, clearExistingBeats }. - Note: if
sceneIdis omitted, the most recently created active scene is used.
update_scene
Update scene metadata/manuscript.
- Inputs:
id(required) + at least one update field (subtitle,summary,includeInContext,pov,contentJson,contentText). - Returns:
{ scene }. - Note: returned
scene.contentis sanitized for AI visibility (sections withhideFromAi=trueare removed).
delete_scene
Delete a scene.
- Inputs:
id,confirm. - Returns:
{ scene }. - Note: returned
scene.contentis sanitized for AI visibility (sections withhideFromAi=trueare removed).
move_scene
Move a scene to another chapter/position.
- Inputs:
sceneId,toChapterId,toIndex?. - Returns:
{ success: true }.
reorder_scenes
Reorder scenes in a chapter.
- Inputs:
chapterId,sceneOrder(full ordered set). - Returns:
{ success: true }.
apply_outline_blueprint
Apply generated outline data to the novel.
- Inputs:
mode?(append|replace_existing),structureMode?,acts?,chapters?,scenes?,confirm?. - Returns:
{ applied, mode, counts }. - Rules: at least one of
acts|chapters|scenesis required. - Confirmation rules:
mode = replace_existingrequiresconfirm: true.- changing
structureModerequiresconfirm: true.
split_scenes_into_chapters
Create chapter buckets and move existing scenes.
- Inputs:
actId?,chapters(required),removeEmptyChapters?,confirm?. - Returns:
{ success: true, createdChapterIds }. - Rules:
- unavailable in
scenes_only. - each
sceneIdcan appear only once in the request. removeEmptyChapters: truerequiresconfirm: true.
- unavailable in
Practical usage patterns
- Character lookup:
search_lore_entries->get_lore_entry. - Notes retrieval:
search_notes->get_notes. - Scene audit:
get_novel_outline_snapshot->analyze_scene_summary_alignment. - Structure edits:
create_scene/create_scene_beats/update_scene, then reorder or move tools. - Bulk lore updates:
batch_update_lore_entriesfor multi-entry cleanup.