Skip to content

Commit d81a3c5

Browse files
committed
fix(pdf-server): correct the 'discards state' claim in display_pdf prompts
Both viewers coexist; nothing is discarded. The actual failure mode is the model now holds a new viewUUID and addresses the wrong viewer -- interact calls land on the fresh empty one, not the one with the user's existing annotations. Rewording to say that.
1 parent 91880a6 commit d81a3c5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/pdf-server/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ Use this tool when the user wants to view or read a PDF. The renderer displays t
12301230
Accepts local files (use list_pdfs), client MCP root directories, or any HTTPS URL.`
12311231
: `Open a PDF in an interactive viewer. Call this ONCE per PDF.
12321232
1233-
**All follow-up actions go through the \`interact\` tool** with the returned viewUUID — annotating, signing, stamping, filling forms, navigating, searching, extracting text/screenshots. Calling display_pdf again creates a second viewer and discards the existing one with all its state.
1233+
**All follow-up actions go through the \`interact\` tool** with the returned viewUUID — annotating, signing, stamping, filling forms, navigating, searching, extracting text/screenshots. Calling display_pdf again creates a SEPARATE viewer with a different viewUUID — interact calls using the new UUID will not reach the viewer the user already sees.
12341234
12351235
Returns a viewUUID in structuredContent. Pass it to \`interact\`:
12361236
- add_annotations, update_annotations, remove_annotations, highlight_text
@@ -1403,7 +1403,7 @@ Set \`elicit_form_inputs\` to true to prompt the user to fill form fields before
14031403
: `PDF opened. viewUUID: ${uuid}
14041404
14051405
→ To annotate, sign, stamp, fill forms, navigate, or extract: call \`interact\` with this viewUUID.
1406-
→ DO NOT call display_pdf again — that creates a second viewer and loses all state.
1406+
→ DO NOT call display_pdf again — that spawns a separate viewer with a different viewUUID; your interact calls would target the new empty one, not the one the user is looking at.
14071407
14081408
URL: ${normalized}`,
14091409
},

0 commit comments

Comments
 (0)