Skip to content

MCP Tools

Narnia exposes twenty-seven MCP tools: eight for session history, three for broken-session recovery, four for local session storage, eight for scheduled-job management, and four for file-based schedule portability. Use them from any AI assistant that supports the Model Context Protocol.

Session History Tools

Tool Purpose Key Parameters
list_recent_sessions List most recently updated sessions limit
search_sessions Ranked session-content search query, limit
get_session_details Full metadata for one session sessionId
get_session_checkpoints All checkpoints for a session sessionId
get_session_turns Paginated conversation turns sessionId, offset, limit
get_session_workspace Git root and artifact file list sessionId
list_sessions_by_repository Exact effective remote-repository filter repo
list_sessions_by_cwd Exact working-directory filter cwd

Looking for the web UI launcher?

The open_narnia_ui MCP tool has been replaced by the narnia-web-server skill, which provides more reliable lifecycle management with full visibility into build output.

Common Workflow

After a machine restart, choose the field you actually know:

  1. list_recent_sessions — scan what was running recently
  2. list_sessions_by_repository or list_sessions_by_cwd — filter exact metadata
  3. search_sessions — search conversation content by topic
  4. get_session_details — confirm the right session before resuming
  5. get_session_checkpoints — read the last checkpoint to restore context

Session-history tools are read-only and return JSON.

Broken Session Recovery Tools

Recovery tools archive the broken event stream and ask Copilot to reseed the same session ID and folder. Narnia does not modify Chronicle.

Tool Purpose Key Parameters
preview_session_migration Inspect compatibility and migration impact sessionId
migrate_broken_session Reseed the same session ID and folder sessionId, confirmMigration
get_session_recovery_packet Read archived recovery context in chunks sessionId, offset, maxCharacters

Git Worktree Tools

Tool Purpose Key Parameters
get_session_worktrees List a session's worktrees and flag branch-override mismatches sessionId

Session Storage Tools

Storage tools use the same cached scanner and cleanup service as the web UI.

Tool Purpose Key Parameters
get_session_storage_overview Cached totals and largest local sessions
scan_session_storage Queue a metadata-only background scan
preview_local_session_cleanup Dry-run cleanup safety and reclaim estimates sessionIds, overrideProtections
delete_local_sessions Delete validated local data through Copilot SDK sessionIds, overrideProtections, archiveDeletedSessions, confirmLocalDeletion

Deletion is local-only, irreversible, and requires explicit confirmation. Synced GitHub copies and Narnia-owned metadata remain.

Scheduled Job Tools

Manage and transfer Narnia-owned scheduled Copilot jobs — recurring copilot -p runs that Windows Task Scheduler executes unattended. See the narnia-scheduler skill for create, migration, packaging, import, verification, and handoff workflows.

Tool Purpose Key Parameters
list_schedules All cataloged jobs joined to live task status
get_schedule A single job's full catalog entry by id id
get_schedule_log Latest run log and live running state id
create_schedule Create a job and (by default) register its task name, prompt, cadenceKind, time
update_schedule Replace a job's definition and re-register id, name, prompt
set_schedule_enabled Enable/disable a job's task id, enabled
run_schedule_now Start a job's task immediately id
delete_schedule Remove a job's task, wrapper, and catalog entry id
export_schedule_package Export selected Narnia jobs jobIds, profile
build_schedule_package Package definitions reconstructed from external tasks jobs, profile
preview_schedule_package Resolve bindings and inspect destination readiness packageJson
import_schedule_package Import an accepted preview as disabled jobs packageJson, previewFingerprint

These tools are backed by the same service as the web UI's Schedules page — creating or editing a job through either surface is immediately visible in the other.

list_schedules reports a health per job. A scheduler exit code of 0 does not prove the run finished its work, because the Copilot CLI exits cleanly when it is interrupted — see Scheduled Job Health.

See Portable Scheduled Jobs for the complete transfer and handoff workflow.