Skip to main content
Glama
pdf4me
by pdf4me

update_hyperlink_annotation

Replace outdated hyperlinks in PDFs by searching for existing text or URL and applying new display text and destination.

Instructions

Update hyperlink annotations in a PDF using PDF4me UpdateHyperlinkAnnotation API (POST /api/v2/UpdateHyperlinkAnnotation). Provide a local PDF path and all hyperlink update fields (SearchOn, SearchValue, IsExpression, TextCurrentValue, TextNewValue, URLCurrentValue, URLNewValue). Supports async via isAsync and 202 Location polling. Saves the updated PDF to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesLocal path to the input PDF.
search_onYesSearch criteria type (e.g. Text).
output_dirNo
search_valueYesValue to search for.
is_expressionYesWhether the search is treated as an expression.
url_new_valueYesNew hyperlink URL destination.
text_new_valueYesNew display text.
output_file_nameNo
url_current_valueYesExisting hyperlink URL to replace.
text_current_valueYesExisting display text to replace.
Behavior3/5

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

The description discloses async behavior via isAsync and 202 Location polling, and states it saves the updated PDF to disk. Yet it does not explain file overwriting behavior, permissions, or that isAsync is not present in the input schema, which is a gap given there are no annotations.

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

Conciseness5/5

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

The description is two sentences, front-loaded with the main purpose, and includes useful API details. Every sentence earns its place with no redundancy.

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?

The description covers the core purpose, API endpoint, async support, and save action, but omits details about output file path handling (output_dir, output_file_name) and does not clarify the isAsync mismatch with the schema. Given no output schema and 10 parameters, this is incomplete.

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

Parameters3/5

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

Schema coverage is 80%, so the schema already documents most parameters. The description lists the required fields in CamelCase, but does not add much semantics beyond naming them, except implying all fields are needed together. It does not explain relationships between parameters or the missing isAsync parameter.

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?

The description clearly states the tool updates hyperlink annotations in a PDF, names the specific API endpoint, and lists the relevant update fields. This distinguishes it from sibling tools like find_and_replace_text, which targets text rather than hyperlinks.

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

Usage Guidelines4/5

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

The description provides clear context: it is for updating hyperlink annotations in a PDF, requires a local path and all update fields, and supports async. However, it does not explicitly state when to use it over alternatives or mention exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pdf4me/pdf4me-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server