MCP tool reference

Every tool exposed by the Anthra MCP server, grouped by the scope it requires. The schemas are JSON Schema, exactly as the MCP client sees them on tools/list.

books:read

  • list_books

    List every book in this account (newest first). Returns id, title, status, visibility, slug.

    Input schema
    {
      "type": "object",
      "properties": {}
    }
  • get_book

    Fetch a single book with its full chapter list (titles, summaries, content, word counts, audio URLs).

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string",
          "description": "Book UUID."
        }
      },
      "required": [
        "bookId"
      ]
    }
  • get_chapter

    Fetch a single chapter (full prose content included).

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        },
        "chapterId": {
          "type": "string"
        }
      },
      "required": [
        "bookId",
        "chapterId"
      ]
    }

books:write

  • create_book

    Create a draft book from a one-line premise. Returns the book id, which subsequent generation tools accept. After creating, call `generate_outline`.

    Input schema
    {
      "type": "object",
      "properties": {
        "premise": {
          "type": "string",
          "minLength": 10,
          "description": "One-paragraph book idea (10–4000 chars)."
        },
        "title": {
          "type": "string",
          "maxLength": 200
        },
        "genre": {
          "type": "string",
          "maxLength": 120
        },
        "modelTier": {
          "type": "string",
          "enum": [
            "haiku",
            "sonnet",
            "opus"
          ],
          "description": "Writer model tier: haiku=fast draft, sonnet=default, opus=editorial."
        }
      },
      "required": [
        "premise"
      ]
    }
  • update_book

    Patch a book's metadata (title, subtitle, description, author, cover color, genre, tone). Does not touch chapters.

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "subtitle": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "coverColor": {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$"
        },
        "genre": {
          "type": "string"
        },
        "audience": {
          "type": "string"
        },
        "toneStyle": {
          "type": "string"
        }
      },
      "required": [
        "bookId"
      ]
    }
  • delete_book

    Soft-delete a book. Recoverable within 30 days, after which the cron worker hard-deletes it.

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        }
      },
      "required": [
        "bookId"
      ]
    }

generation:run

  • generate_outline

    Run the outliner: replaces any existing chapters with a fresh outline, sets title/subtitle/description/coverColor on the book, and advances status to `writing`. Synchronous — may take 10–60s.

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        },
        "research": {
          "type": "boolean",
          "description": "Force-enable the Perplexity research pass before outlining. Defaults to the account-wide flag."
        }
      },
      "required": [
        "bookId"
      ]
    }
  • write_chapter

    Generate prose for one chapter and persist it. Returns the new content. Streaming is not exposed over MCP — this call resolves when the chapter is fully written and saved. Call chapters in `order` so the writer has continuity.

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        },
        "chapterId": {
          "type": "string"
        }
      },
      "required": [
        "bookId",
        "chapterId"
      ]
    }
  • rewrite_chapter

    Apply a directive to revise one chapter (e.g., "punch up the dialogue", "shorten by 30%"). Snapshots the prior text so the change is recoverable, then overwrites the chapter and invalidates audio.

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        },
        "chapterId": {
          "type": "string"
        },
        "directive": {
          "type": "string",
          "minLength": 3,
          "description": "Editorial instructions for the rewrite."
        }
      },
      "required": [
        "bookId",
        "chapterId",
        "directive"
      ]
    }
  • narrate_chapter

    Synthesize ElevenLabs narration for a chapter and upload the MP3 to Vercel Blob. Returns the audio URL. Requires ELEVENLABS_API_KEY + BLOB_READ_WRITE_TOKEN on the server.

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        },
        "chapterId": {
          "type": "string"
        }
      },
      "required": [
        "bookId",
        "chapterId"
      ]
    }

publish:write

  • publish_book

    Publish a book at /read/{slug}. Every chapter must have content. Returns the public reader URL.

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "unlisted",
            "public"
          ],
          "description": "Defaults to the book's current visibility."
        }
      },
      "required": [
        "bookId"
      ]
    }
  • unpublish_book

    Revert a published book to status `ready`. Reader page stops resolving.

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        }
      },
      "required": [
        "bookId"
      ]
    }

account:read

  • get_usage

    Lifetime + 30-day rollups of LLM token usage across this account, grouped by call kind (outline, chapter, rewrite, …).

    Input schema
    {
      "type": "object",
      "properties": {}
    }

analytics:read

  • get_reader_analytics

    Per-chapter reader stats for a published book (views, audio starts, completions, drop-off).

    Input schema
    {
      "type": "object",
      "properties": {
        "bookId": {
          "type": "string"
        }
      },
      "required": [
        "bookId"
      ]
    }