Skip to main content
Glama
david-wang-0

okular-mcp

by david-wang-0

PDF: attach a text file

attach_file

Embed a Markdown or Mermaid text file as a paperclip annotation in an Okular PDF margin near text or at page top, or replace an existing attachment's file.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
noteNo
pageNo
pathNo
colorNo
contentYes
near_textNo
replace_xrefNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, but the description adds genuinely useful operational context: Okular persists the attachment via the icon's context menu, and there is a 'save-Okular-first' caveat shared with mark_text. The replace_xref mode (overwriting an existing attachment's file) is disclosed, which is meaningful given destructiveHint=false. It stops short of explaining auth/permission requirements or what the tool returns.

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 key constraint is front-loaded, but the second sentence restates 'Embed a text file ... as a paperclip annotation' almost verbatim from the opening line, wasting space. The remaining clauses earn their place by conveying placement and save behavior.

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

Completeness3/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 mutation/save caveat is covered. But with 8 parameters at 0% schema coverage and no explanation of the required ones (name, content) or the placement interplay between page/near_text/path, the description is only minimally sufficient for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0% and there are 8 parameters, so the description carries the full burden — yet it only adds meaning for `near_text` (placement, level with text) and `replace_xref` (target existing attachment). The six remaining parameters (name, note, page, path, color, content) are left completely undetermined by both schema and description.

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?

States a specific verb ('Embed') plus resource ('a text file ... as a paperclip annotation') and gives concrete file-type examples (Markdown, Mermaid). An agent can distinguish this from add_note and mark_text, though the description never explicitly contrasts with those siblings.

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 implies when this tool applies by describing placement modes ('level with `near_text` or at the top of the page') and a replace flow ('replace the file of an existing attachment `replace_xref`'), and points to `mark_text` for a shared caveat. However it never states when to choose attach_file over add_note or read_attachment, so usage is only implied.

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