Skip to main content
Glama

Poetry MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
POETRY_VAULT_PATHYesPath to your Poetry vault directory

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
sync_catalog

Synchronize catalog from filesystem.

Scans all markdown files in catalog/ directory and builds in-memory indices. This should be called before using other catalog tools.

Args: force_rescan: If True, rescan all files even if already loaded

Returns: SyncResult with statistics about the sync operation

get_poem

Get a poem by ID or title.

Args: identifier: Poem ID or exact title include_content: Whether to include full poem text

Returns: Poem object or None if not found

search_poems

Search for poems matching criteria.

Args: query: Text to search for in titles, content, and notes states: Filter by states (e.g., ["completed", "fledgeling"]) forms: Filter by forms (e.g., ["free_verse", "prose_poem"]) tags: Filter by tags (poems must have all specified tags) limit: Maximum number of results to return include_content: Whether to include full poem text in results

Returns: SearchResult with matched poems and query metadata

find_poems_by_tag

Find poems by tags.

Args: tags: List of tags to match match_mode: "all" (poems must have all tags) or "any" (at least one tag) states: Optional filter by states limit: Maximum number of results

Returns: List of matching poems

list_poems_by_state

List poems in a specific state.

Args: state: State to filter by (completed, fledgeling, still_cooking, etc.) sort_by: Field to sort by (title, created_at, updated_at, word_count) limit: Maximum number of results

Returns: List of poems in the specified state

get_catalog_stats

Get catalog statistics.

Returns: CatalogStats with counts, metrics, and health information

get_server_info

Get server information and status.

Returns: Dictionary with server metadata

get_all_nexuses

Get all nexuses (themes/motifs/forms) from the registry.

Returns complete registry with all nexus entries, organized by category. Use this to discover available themes, motifs, and forms for tagging poems.

Returns: NexusRegistry with themes, motifs, and forms

Example: Get all available themes: registry = await get_all_nexuses() for theme in registry.themes: print(f"{theme.name} → #{theme.canonical_tag}")

link_poem_to_nexus

Link a poem to a nexus by adding the nexus's canonical tag.

Safely updates the poem's tags field in frontmatter, preserving all other fields. Creates a backup before modification. Automatically resyncs catalog after update.

Args: poem_id: Poem identifier (ID or title) nexus_name: Name of nexus to link (e.g., "Water-Liquid", "Childhood") nexus_type: Type of nexus (theme/motif/form), defaults to "theme"

Returns: Dictionary with operation details including success status

Example: Link a poem to a theme: result = await link_poem_to_nexus( poem_id="antlion", nexus_name="Water-Liquid", nexus_type="theme" ) print(f"Added tag: {result['tag_added']}")

find_nexuses_for_poem

Prepare poem and theme data for analysis by the MCP agent.

Returns poem content and available themes for YOU (the agent) to analyze. YOU identify which themes match the poem and provide confidence scores.

Args: poem_id: Poem identifier (ID or title) max_suggestions: Maximum number of theme suggestions requested

Returns: Dictionary with: - poem: Poem data (title, content, current_tags) - available_themes: Theme options with descriptions - instructions: Analysis guidance

Example workflow: ``` # 1. Get data for analysis data = await find_nexuses_for_poem("antlion", max_suggestions=3)

# 2. YOU analyze data['poem'] against data['available_themes'] # 3. YOU identify matching themes with confidence scores # 4. User applies tags with link_poem_to_nexus() ```
get_poems_for_enrichment

Get batch of poems needing theme enrichment for agent analysis.

Returns poems with minimal or no tags for YOU (the agent) to analyze. YOU suggest which themes apply to each poem.

Args: poem_ids: List of poem IDs (None = all untagged/lightly-tagged poems) max_poems: Maximum poems to return (default 50)

Returns: Dictionary with: - poems: List of poem data (id, title, content, current_tags) - available_themes: Theme options with descriptions - instructions: Batch analysis guidance

Example workflow: ``` # 1. Get poems needing enrichment data = await get_poems_for_enrichment(max_poems=10)

# 2. YOU analyze data['poems'] against data['available_themes'] # 3. YOU suggest 1-3 themes for each poem with confidence scores # 4. User applies high-confidence tags with link_poem_to_nexus() ```
sync_nexus_tags

Synchronize [[Nexus]] links in poem body with frontmatter tags.

Analyzes the poem's content for [[Nexus Name]] wikilinks and syncs them with the frontmatter tags field. Can sync in either direction or both.

Args: poem_id: Poem identifier (ID or title) direction: Sync direction - "links_to_tags", "tags_to_links", or "both"

Returns: Dictionary with sync results and any conflicts found

Example: Sync wikilinks to tags: result = await sync_nexus_tags( poem_id="antlion", direction="links_to_tags" ) print(f"Tags added: {result['tags_added']}") print(f"Conflicts: {result['conflicts']}")

move_poem_to_state

Move a poem to a different state directory and update frontmatter.

Moves the poem file between state directories (Completed, Fledgelings, etc.) and updates the frontmatter state field. Handles backup files automatically.

Args: poem_id: Poem identifier (ID or title) new_state: Target state (completed, fledgeling, still_cooking, etc.)

Returns: Dictionary with move operation results

Example: Promote a poem to completed: result = await move_poem_to_state( poem_id="antlion", new_state="completed" ) print(f"Moved from {result['old_state']} to {result['new_state']}") print(f"New path: {result['new_path']}")

grade_poem_quality

Prepare poem and quality rubric for grading by the MCP agent.

Returns poem content and quality dimension descriptions for YOU (the agent) to grade. YOU provide scores (0-10) and reasoning for each dimension.

8 Quality Dimensions:

  • Detail: Vividness and specificity of imagery

  • Life: Living, breathing quality and vitality

  • Music: Sound quality and rhythmic elements

  • Mystery: Ambiguity, layers, reader engagement

  • Sufficient Thought: Intellectual depth and insight

  • Surprise: Unexpected elements, fresh perspectives

  • Syntax: Sentence structure and line breaks

  • Unity: Coherence and wholeness

Args: poem_id: Poem identifier (ID or title) dimensions: Optional list of specific dimensions to grade (default: all 8)

Returns: Dictionary with: - poem: Poem data (title, content) - dimensions: Quality dimensions with descriptions - instructions: Grading guidance

Example workflow: ``` # 1. Get poem and rubric data = await grade_poem_quality("antlion")

# 2. YOU grade data['poem'] on data['dimensions'] # 3. YOU provide scores 0-10 with reasoning for each dimension # - 0-3: Absent/poor # - 4-6: Adequate # - 7-8: Strong # - 9-10: Exceptional ```

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/james-livefront/poetry-mcp'

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