Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LEANPUB_API_KEYNoYour Leanpub API key (literal key). Requires a Pro plan API key.
LEANPUB_API_KEY_FILENoPath to a file containing the Leanpub API key.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
verify_api_keyA

Verify the configured Leanpub API key and return the authenticated user.

get_bookB

Get a book's summary: title, word/page counts, sales, and preview/published download URLs.

check_book_existsB

Check whether a book slug exists and you are an author of it.

create_bookC

Create a new Leanpub book (Browser, GitHub, or Upload mode).

create_bundleC

Create a new Leanpub bundle.

create_courseC

Create a new Leanpub course.

create_trackC

Create a new Leanpub track (curated collection of courses).

preview_bookA

Start a full preview generation (PDF + EPUB) for a book. Returns immediately; poll get_job_status or use wait_for_job to know when it's done.

preview_subsetC

Generate a faster PDF-only preview using Subset.txt.

preview_singleA

Preview a single chapter from raw Markdown content without touching Subset.txt. Saved as {slug}-single-file.pdf.

publish_bookB

Publish a book, making the latest version available to readers.

unpublish_bookB

Unpublish a book (primary author only).

retire_bookA

Retire a published book — no new purchases, existing readers keep access (primary author only).

close_bookC

Close a book completely — hidden from the store (primary author only).

get_job_statusC

Check the status of a running preview/publish job. Returns {} when no job is running.

wait_for_jobA

Poll get_job_status every 5s (configurable) until the job completes or the timeout elapses. Use right after preview_book/publish_book.

get_royaltiesC

Get a book's sales and royalties summary.

get_individual_purchasesC

Get a paginated list of individual purchases for a book.

list_couponsB

List all coupons for a book.

get_couponC

Get details for a specific coupon.

create_couponC

Create a new coupon for a book.

update_couponB

Update an existing coupon (suspend/resume, change uses, etc). Only include fields to change.

get_user_reader_emailsA

Get emails of readers who opted to share them with you, across all your books/courses.

get_book_reader_emailsB

Get emails of readers of a specific book who opted to share them.

register_interestA

Register a reader's interest in an unpublished book so they're notified on publish.

get_interested_readersC

List readers who registered interest and opted to share their email.

preview_courseB

Start a preview generation for a course (self-published, organization, or university).

publish_courseC

Publish a course (self-published, organization, or university).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

C2.9/5.0

Scored across 28 tools

Disambiguation4/5

Most tools target distinct actions (get, create, publish, preview) on specific entities. However, the three preview tools (preview_book, preview_subset, preview_single) and the three reader-email tools are closely related, though descriptions sufficiently clarify their different use cases.

Naming Consistency5/5

Tool names follow a consistent snake_case verb_noun pattern throughout, such as get_book, create_coupon, publish_course, and wait_for_job. Minor compound names like check_book_exists still fit the established convention without introducing style inconsistencies.

Tool Count2/5

With 28 tools, the set exceeds the 25-tool threshold for 'too many.' While the scope spans multiple entity types (books, courses, bundles, coupons, readers, jobs), the count feels heavy, especially since several entities only have creation tools (e.g., create_bundle, create_track), inflating the surface without corresponding coverage.

Completeness2/5

The tool surface has significant gaps. Books have create/publish/preview/status transitions, but there is no list_books or update_book. Bundles and tracks only have create operations—no get, update, or delete—and courses lack get/update/delete as well. This incompleteness will force agents to rely on out-of-band knowledge or fail when managing those entities.

Maintenance

ActivityMaintained
ResponsivenessNo issues