Skip to main content
Glama
Paperboy

Paperboy

Official
by sudostash

set_outline

DestructiveIdempotent

Replace a PDF's bookmarks with a new reading-order outline of titles, nesting levels, pages or links. Validates every entry before writing, and can clear all bookmarks.

Instructions

Replace a PDF's bookmarks (its outline) with entries, in reading order. Each has a title, a level (default 1, up to 20; at most one deeper than the entry before it, so level 2 nests under the previous level-1 entry) and either a 1-based page or a link (http, https or mailto); with neither it is a heading that goes nowhere. An empty list removes all bookmarks. Everything is checked before anything is written.

To add to existing bookmarks, read them with get_outline first and pass them back with yours (check its truncated flag). Rewriting keeps titles, nesting, pages and links; other actions (scripts and the like), colour and style, open/closed state and exact scroll positions are not kept. The result opens with the bookmarks panel showing. Needs the owner password if the PDF forbids document assembly; signed PDFs are refused because the change would break the signature.

Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input_path": "<input_path>",
      "entries": "<entries>"
    },
    "name": "set_outline"
  }
}

Input Schema

NameRequiredDescriptionDefault
entriesYes
passwordNo
overwriteNo
input_pathYes
output_pathNo

Output Schema

NameRequiredDescriptionDefault
outputYes
entriesYes
replacedYes
password_protectedYes
user_password_changedYes
permissions_restrictedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive=true, readOnly=false and idempotent=true, but the description adds substantial information beyond them: which attributes survive a rewrite (titles, nesting, pages, links) and which are lost (actions/scripts, colour, style, open/closed state, scroll positions). It also discloses the owner-password requirement for document assembly, that signed PDFs are refused, and that 'ask' keeps the password off the chat transcript.

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

Conciseness4/5

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

Front-loaded with the core replace semantics and the entry shape, then the add-via-get_outline workflow, then caveats. Dense but every sentence carries operational content; the password/'ask' note at the end is slightly tangential to this specific tool but still useful.

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

Completeness5/5

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

For a destructive, password-gated mutation with an output schema already present, the description covers prerequisite auth, refusal cases, data preservation vs. loss, and validation-before-write. Nothing an agent needs to call it safely and correctly is missing.

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?

With 0% schema description coverage the description must carry the burden, and it does for the hard part — entry title, level defaults/limits and the one-step nesting rule, 1-based page vs. http/https/mailto links, and the empty-list case — plus the password and 'ask' mechanism. It does not explain overwrite, input_path or output_path, leaving three of five parameters undocumented anywhere.

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

Purpose5/5

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

States a specific verb and resource ('Replace a PDF's bookmarks (its outline) with entries, in reading order') and immediately clarifies the semantics of the replacement input. It is clearly distinguished from the read-side sibling get_outline, so an agent can tell the two apart without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit alternative path: to add rather than replace, call get_outline first and pass the existing entries back, including the advice to check its truncated flag. The empty-list edge case and the 'checked before anything is written' precondition are both spelled out, leaving little to inference.

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