Skip to main content
Glama
david-wang-0

okular-mcp

by david-wang-0

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OKULAR_MCP_AUTHORNoOverride the author name that marks written by the server carry. Default is 'llm'.llm

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": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
viewer_stateA

Which PDF and page Okular is showing.

Open Okular windows: document path, current page (1-based) and page count.

get_selectionA

Text the user has selected with the mouse, with page and lines.

Text currently selected with the mouse ('primary') or on the clipboard ('clipboard'), with the document path, page and line numbers when it is found on the page Okular shows (line numbers match page_text and context).

page_textB

Numbered text lines of a page range.

Numbered text lines of a page range (default: the page shown in Okular); lines such as "12-30" narrows to a window. Line numbers match context.

contextA

The paragraph around the user's mouse selection.

The paragraph around the user's current mouse selection (or text) on the page shown, with neighbours paragraphs before and after and the line numbers, so you can see what they are pointing at without reading the whole page.

linksA

Links on a page with their targets, to follow citations yourself.

Links on a page (default: the page shown): anchor text and line, then the target page and line for internal links (citations, sections, figures) or the URL. Follow one with page_text(page=..., lines="<target_line>-...").

outlineC

The document's table of contents.

The document's bookmark tree (sections with page numbers), a map of the paper.

annotationsB

All highlights, notes and attachments saved in the PDF.

All annotations in the PDF (default: the open document): page, type, author, highlighted text, note. Only annotations saved to the file are visible.

mark_textA

Highlight, underline, squiggle or strike out a passage, with a note.

Mark every occurrence of text on a page (default: the one shown) as highlight, underline, squiggly or strikeout, saved into the PDF under a distinct author; quote enough words to be unique. A note sits on the mark, or with note_in_margin on a comment icon in the margin replying to it (least intrusive). color: blue, yellow, green, orange, pink, purple, red, cyan, grey, #rrggbb or r,g,b in 0-1 (default light blue; red for strikeout). The user must save Okular first or their unsaved marks are lost.

add_noteA

Put a comment icon in the margin, or reply to an annotation.

Comment icon in the margin: level with near_text, or as a threaded reply to the annotation reply_to (an xref from annotations, e.g. to answer the user's own note), else at the top of the page. color as in mark_text. Same save-Okular-first caveat as mark_text.

attach_fileB

Embed a text file (Markdown, Mermaid) as a paperclip annotation.

Embed a text file (e.g. notes.md, diagram.mmd) as a paperclip annotation in the margin, level with near_text or at the top of the page; or replace the file of an existing attachment replace_xref. Okular saves it via the icon's context menu. Same save-Okular-first caveat as mark_text.

read_attachmentB

Read an attached file back as text.

Contents of a file-attachment annotation (an xref from annotations with a file field), decoded as text.

remove_annotationB

Delete an annotation by xref.

Delete an annotation by the xref reported by annotations (default: the open document) and save. Same save-in-Okular-first caveat as mark_text.

gotoA

Jump Okular to a page for the user.

Jump Okular to page of path (default: current document; opens it if needed).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 13 tools

Disambiguation5/5

Each tool targets a distinct resource or action: viewer state, selection, page text, context around selection, links, outline, annotations, annotation creation/reading/removal, and navigation. Slight conceptual overlap exists between context/page_text and mark_text/add_note, but the descriptions clearly delimit them.

Naming Consistency3/5

All names use snake_case, but the pattern mixes noun phrases (viewer_state, annotations, outline) with verb_noun forms (get_selection, mark_text, remove_annotation, goto). It remains readable, but there is no single predictable convention across the set.

Tool Count5/5

13 tools is well within the ideal range and matches a PDF reading/annotation server's scope. Each tool represents a distinct operation, and none feels redundant or excessively granular.

Completeness4/5

The surface covers reading, navigation, annotation creation/reading/deletion, and attachments. Minor gaps remain: no explicit save or full-text search operation, and annotations cannot be modified in place, but the core lifecycle is covered.

Maintenance

ActivityMaintained
ResponsivenessNo issues