You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add concrete per-type schema docs with field names in tool description
- Add JSON example showing add_annotations with highlight + stamp
- Replace opaque z.record(z.string(), z.unknown()) with typed union
of all annotation schemas (full + partial forms) so the model sees
exact field names and types
- Remove redundant manual safeParse since Zod inputSchema validates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: examples/pdf-server/server.ts
+49-49Lines changed: 49 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -872,16 +872,29 @@ Actions:
872
872
- find: Search text silently (no UI change). Requires \`query\`. Results appear in model context only.
873
873
- search_navigate: Jump to a search match. Requires \`matchIndex\` (from search/find results).
874
874
- zoom: Set zoom level. Requires \`scale\` (0.5–3.0).
875
-
- add_annotations: Add annotations to the PDF. Requires \`annotations\` array.
876
-
- update_annotations: Partially update existing annotations. Requires \`annotations\` array (id + type required).
875
+
- add_annotations: Add annotations to the PDF. Requires \`annotations\` array. Each annotation has \`id\` (string), \`type\`, and \`page\` (1-indexed).
876
+
- update_annotations: Partially update existing annotations. Requires \`annotations\` array (id + type required, other fields optional).
877
877
- remove_annotations: Remove annotations by ID. Requires \`ids\` array.
878
-
- highlight_text: Find text and highlight it. Requires \`query\`. Optional \`page\`, \`color\`, \`content\`.
878
+
- highlight_text: Find text and highlight it. Requires \`query\`. Optional \`page\` (defaults to all pages), \`color\`, \`content\` (tooltip).
879
879
- fill_form: Fill form fields. Requires \`fields\` array of { name, value }.
880
880
- get_pages: Get text and/or screenshots from pages without navigating. Uses \`intervals\` (page ranges with optional start/end, e.g. [{start:1,end:5}], [{}] for all). Optional \`getText\` (default true), \`getScreenshots\` (default false). Max 20 pages. Returns page content directly.
0 commit comments