Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_skillsA

List the available skills (tool groups) — project, documents, search, analysis, compilation, memory, relationships — with a description, the tool count, whether the skill is already active, and its tool names. Use this to discover capabilities, then call use_skill to activate a group whose tools you need. Takes no parameters.

use_skillA

Activate a skill so its tools become available to call. Returns the activated skill's tool names and their schemas; clients that support tools/list_changed will also see the new tools appear automatically. Call list_skills first to see the available skill names. Tools are progressively disclosed, so activate the skill you need before using its tools (most tools are pre-activated by default).

open_projectA

Open a Scrivener project and make it the active project for this session. Every document, structure, search, and analysis tool operates on the project opened here, so call this first. Accepts the path to a .scriv folder or the .scrivx file inside it and resolves the project automatically. Returns the project title, author, and metadata. Opening a project closes any project already open. If you do not know the path, call discover_projects first.

get_structureA

Return the binder hierarchy of the open project: its folders and documents in tree order, each with id, title, type, depth, and word count. Use this to understand the manuscript layout and to obtain the document ids that read_document, write_document, and the analysis tools require. By default returns a compact flat array of [id, title, type, depth, wordCount, hasChildren] tuples to save tokens; set summaryOnly for just project-level counts. Requires an open project (call open_project first).

refresh_projectA

Reload the open project from disk, discarding the in-memory cache. Use this when the project has been changed by the Scrivener app or another process while open here, so that subsequent reads reflect the latest saved state. Requires an open project. Takes no parameters.

close_projectA

Close the currently open project, flush any pending memory/auto-save state, and clear the active session. After this, document and analysis tools have no project to act on until open_project is called again. Use this to switch projects cleanly or release file handles at the end of a session. Requires an open project. Takes no parameters.

discover_projectsA

Scan common locations (Documents, Desktop, and iCloud Mobile Documents) for Scrivener projects and return the paths of every .scriv folder found, searching up to three levels deep. Use this when the user refers to their project by name rather than path ("open my novel"): present the results and pass the chosen path to open_project. Does not open anything itself. Returns a list of project paths, or a message if none are found.

get_document_infoA

Return metadata for a single document without its body text: title, type, word count, synopsis, label, status, parent, and custom metadata. Use this to inspect a document or to read its word count cheaply; call read_document when you need the actual prose, or get_structure for the whole binder. Requires an open project and a valid document id.

read_documentA

Read the text of a single document. By default returns plain text; set format to "formatted" to get rich text with styling and structure preserved. Use offset and limit to page through long documents by word range instead of returning the whole thing. Use get_document_info when you only need metadata, or search/semantic_search to find content across many documents. Requires an open project and a valid document id.

write_documentA

Replace the entire text of an existing document with new content. This overwrites the body; a backup of the previous version is taken first and the write is atomic. To change only the title or metadata use update_document; to add a new document use create_document. Requires an open project and a valid document id.

create_documentA

Create a new text document or folder in the binder and return its new id. Optionally set the initial body content and the parent folder; if no parent is given the item is added at the top level. Each call creates a distinct item (not idempotent). Use write_document to change content afterward. Requires an open project.

delete_documentA

Move a document to the project trash. This is reversible: the document can be listed with list_trash and brought back with restore_document until the trash is emptied in Scrivener. Deleting an already-trashed document is a no-op. Requires an open project and a valid document id.

move_documentA

Move a document or folder to a different parent folder in the binder, optionally at a specific position among the target folder's children. Changes only the location, not the content. Requires an open project, a valid document id, and a valid target folder id.

update_documentA

Update a document's title and/or its metadata (synopsis, notes, label, status, and custom fields) in a single call. Pass only the fields you want to change; omitted fields are left untouched. To change the body text use write_document; to move it use move_document. Requires an open project and a valid document id.

searchA

Search the open project and return matching documents with relevance-ranked snippets. By default performs an intelligent full-text/semantic search of document content; set field to "title" for a fast case-insensitive title lookup, or scope to "trash" to search only trashed documents. For meaning-based "find passages about X" queries use semantic_search; to find every occurrence of a specific name or term use find_mentions. Requires an open project.

list_trashA

List all documents currently in the project trash, with their ids and titles. Use this to see what can be brought back with restore_document, or to confirm a delete_document call. Requires an open project. Takes no parameters.

restore_documentA

Restore a trashed document back into the binder, optionally into a specific target folder (otherwise it returns to a default location). Use list_trash to find the document id first. This is the inverse of delete_document. Requires an open project and a valid document id.

read_annotationsA

Return the inline comments and footnotes attached to a document, grouped by type. Use this to review editorial notes and references without reading the full body; use read_document for the prose itself. Requires an open project and a valid document id.

find_mentionsA

Find every occurrence of a specific name or term (a character, place, or keyword) across all documents, returning each hit with surrounding context and its document. Use this for exact "where does X appear" lookups; use search for relevance-ranked results or semantic_search for meaning-based matches. Returns up to 50 mentions. Requires an open project.

analyze_documentA

Analyze the writing quality of a single document and return a summary of readability, pacing, and the top issues found. This is the general-purpose prose analyzer: narrow it with analysisTypes to focus on style, structure, themes, characters, sentiment, or pacing. Use check_consistency for project-wide continuity instead, or enhance_content to get rewritten prose rather than a critique. Calls an external AI model. Requires an open project and a valid document id.

enhance_contentA

Produce an AI-improved version of a document's text for a chosen goal (fix grammar, refine style, improve clarity, expand, summarize, or rework creatively) and return the suggested rewrite. This does NOT modify the document; review the result and call write_document to save it. Use analyze_document for a critique instead of a rewrite, or generate_content to create new text from a prompt. Calls an external AI model. Requires an open project.

generate_contentA

Generate new prose from a natural-language prompt and return the generated text, optionally steered by project context (a document, characters, or a target style) and a desired length. This creates fresh text and does not modify any document. Use enhance_content to improve existing text instead, or analyze_document to critique it. Calls an external AI model and requires OPENAI_API_KEY; without it a placeholder is returned.

rememberA

Store or update a fact in the project's persistent memory so later tools and sessions stay consistent: a character profile, world-building detail, plot thread, or style-guide entry. Pass an id inside data to update an existing entry, or omit it to add a new one. Use recall to read memory back. Requires an open project.

recallA

Read back the project's persistent memory: stored characters, world-building, plot threads, and style guide. Returns the requested store, or the full memory when memoryType is omitted or "all". Use remember to write new facts. Requires an open project.

check_consistencyA

Scan the whole project for continuity problems and return the issues found: character contradictions, timeline conflicts, location mismatches, and dropped or inconsistent plot threads. This is the project-wide continuity checker; use analyze_document to critique a single document's prose instead. Narrow the scan with checkTypes. Requires an open project.

semantic_searchA

Find passages by meaning rather than exact words, using embeddings over the project, and return the most relevant documents with similarity scores and related entities. Use this for conceptual "find passages about X" queries; use search for keyword/full-text matching and find_mentions to locate every occurrence of a specific name or term. Calls an external embedding model. Requires an open project with semantic indexing available.

compile_documentsA

Compile the project's documents into a single continuous manuscript in the requested format and return the compiled text (large results are spooled to a file reference). In "standard" mode it joins documents in binder order; in "intelligent" mode it uses AI to optimize the output for a specific target such as an agent query or synopsis. To write a manuscript to disk in a publishing format (EPUB, etc.) use export_project instead. Requires an open project.

export_projectA

Export the whole project to a file on disk in a publishing/interchange format (Markdown, HTML, JSON, or EPUB) and return the output path and a summary. Use this to produce a deliverable file; use compile_documents when you want the compiled text back in the response rather than written to disk. Requires an open project.

get_statisticsA

Return project-wide statistics: total word and document counts, plus title and author. Use this for a quick project overview; use get_structure for the per-document breakdown or get_document_info for a single document. Requires an open project.

generate_marketing_materialsA

Generate a publishing/marketing artifact from the manuscript — a synopsis, query letter, pitch packet, elevator pitch, or book blurb — using the project content as context, and return the generated text. Use this for submission and pitching materials; use compile_documents to assemble the manuscript itself. Requires an open project with text content. Each call regenerates fresh output (not idempotent).

add_relationshipA

Record a typed, directed relationship between two story entities (e.g. a character "mentors" another, or a character "appears in" a document) in the project story graph. Returns the stored edge with its generated id. Use this to build the knowledge graph that find_relationships, character_network, and discover_connections then query. Requires an open project with the relationship engine initialized.

find_relationshipsA

Query the story graph for entities related to a given entity, returning the connected entities and the relationship types that link them. This covers cross-references and discovered connections for a specific entity; use character_network for the whole-cast graph, or discover_connections to surface co-occurring entities project-wide. Requires an open project with the relationship engine initialized.

character_networkA

Return the full character relationship network for the project: every character and the typed relationships connecting them, suitable for rendering a graph or analyzing the cast structure. Use find_relationships instead when you only need one entity's connections. Requires an open project with the relationship engine initialized. Takes no parameters.

discover_connectionsA

Surface previously unrecorded relationships across the project by analyzing entity co-occurrence, returning candidate connections the story graph does not yet contain. Use this to find latent links to confirm with add_relationship; use find_relationships for known connections of a specific entity. Requires an open project with the relationship engine initialized.

queue_document_analysisA

Enqueue a background NLP analysis of one document (readability, entities, sentiment) and return a job id immediately without blocking. Poll the job with get_job_status and stop it with cancel_job. Use this for large documents where a synchronous analyze_document call would be slow; use analyze_document directly for quick, inline results.

queue_project_analysisA

Enqueue a background batch analysis across many documents at once and return a job id immediately. Poll progress with get_job_status and stop it with cancel_job. Use this to analyze a whole manuscript or large set of documents; for a single document prefer queue_document_analysis or the synchronous analyze_document.

suggest_improvementsA

Generate AI writing suggestions for a prompt or a specific document — ideas for revision, next steps, or alternatives. Returns suggestion text. Optionally grounds the suggestions in a document's content. Use this for generative "how could this be better" help; use analyze_document for structured metrics or check_consistency to find contradictions.

analyze_writing_styleA

Analyze the prose style of one or more text samples — sentence variety, tone, voice, pacing, and other stylistic features — and return a structured style profile. Use this to characterize how something is written; use analyze_document for document-level metrics or check_plot_consistency for narrative coherence.

check_plot_consistencyA

Scan a set of documents for plot-level inconsistencies — timeline conflicts, contradicted facts, dropped threads — and return the issues found with the documents involved. Use this for story/plot coherence across chapters; use check_consistency for general consistency checks or analyze_writing_style for prose-level analysis.

get_job_statusA

Look up the status and progress of a background job previously started by queue_document_analysis, queue_project_analysis, or another async tool. Returns the job state (queued, running, completed, failed), progress, and result when finished. Poll this after enqueuing work; use cancel_job to stop a job.

cancel_jobA

Cancel a queued or running background job by its type and id. Returns whether the cancellation succeeded. Cancelling an already-finished or unknown job is harmless. Use get_job_status first to check whether a job is still in progress.

check_character_continuityA

Scan the manuscript for continuity problems with a single character — contradictions in how they are described, named, or portrayed across documents (e.g. eye color or role changing between chapters). Returns a continuity report listing each appearance and any detected inconsistencies. Use this for one character in depth; use check_consistency for project-wide plot/character checks. Requires an open project.

track_motifsA

Trace recurring motifs across the manuscript — themes, symbols, repeated phrases, or structural patterns — and report where each recurs and how strongly. Returns the detected motifs ranked by strength with their occurrences. Use this for thematic/symbolic patterns; use find_mentions for literal occurrences of a specific word. Requires an open project.

analyze_narrativeA

Analyze the narrative structure of a document — its arc, recurring motifs, and entity relationships — and return a structured report, optionally with metrics and visualization data. Use this for structural/arc analysis of one document; use analyze_document for prose quality and check_consistency for contradiction detection. Requires an open project and a valid document id.

get_memory_statsA

Return statistics about the project's memory subsystem (the holographic/fractal memory that powers semantic search and continuity): how much has been ingested, index size, and related metrics. This is the single source for memory metrics. Optionally scope to one document or include a detailed breakdown. Requires an open project.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/writerslogic/scrivener-mcp'

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