Skip to main content
Glama
david-wang-0

okular-mcp

by david-wang-0

Okular: mouse selection

get_selection
Read-only

Retrieve text selected with your mouse or clipboard from the current PDF page, including document path and line numbers.

Instructions

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).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoprimary

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint=true annotation already establishes this as a safe read. The description adds real context beyond that: selection may come from the mouse or clipboard, and line numbers are only populated when the text is found on the current page. It still omits what happens when nothing is selected or how the two sources behave differently.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The two sentences overlap heavily: the first ('Text the user has selected with the mouse, with page and lines') largely restates the second. It is short but not maximally economical; the lead could be tighter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, and the safety profile is carried by annotations. Given the one-parameter, read-only scope, the description covers what an agent needs. Minor gaps remain around the default source behavior and empty-selection handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the single 'source' parameter has only a default and no documentation. The description compensates by naming the accepted conceptual values ('primary' for mouse selection, 'clipboard' for the clipboard), which is the key semantic an agent needs to set that parameter correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb+resource: retrieving the text the user has selected with the mouse, plus page and line numbers. It implicitly distinguishes itself from siblings like page_text and context by noting the line numbers match those tools' output. It does not name an alternative it is not, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clarifies the two retrieval modes ('primary' mouse selection vs 'clipboard') and that line numbers appear only when the text is found on the currently shown page, which implies usage. However, there is no explicit statement of when to reach for this instead of page_text, context, or viewer_state.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.