{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "mcp.kdandoc.com",
    "site": "kdandoc.com",
    "addresses": [
      {
        "address": "13.227.65.113",
        "endpoints": 2,
        "shared_infrastructure": false,
        "network": {
          "asn": 16509,
          "name": "AMAZON-02 - Amazon.com, Inc.",
          "prefix": "13.227.65.0/24",
          "country": "US"
        }
      },
      {
        "address": "13.227.65.112",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      },
      {
        "address": "13.227.65.129",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      },
      {
        "address": "13.227.65.114",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "13.227.65.113",
          "13.227.65.112",
          "13.227.65.129",
          "13.227.65.114"
        ],
        "first_seen": "2026-11-23T15:12:01.762Z",
        "last_seen": "2026-11-23T15:12:01.762Z",
        "checks": 1
      },
      {
        "addresses": [
          "13.227.65.129",
          "13.227.65.114",
          "13.227.65.113",
          "13.227.65.112"
        ],
        "first_seen": "2026-11-22T15:11:03.305Z",
        "last_seen": "2026-11-22T15:11:03.305Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Google Cloud",
        "evidence": "Server header \"Google Frontend\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "pdf-mcp-server",
      "version": "3.2.4",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "Google Frontend"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 1,
      "sample": [
        {
          "id": "4592",
          "url": "https://app.magreader.com.au/agent/mcp",
          "server_name": "au.com.magreader/discovery",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T07:20:12.360Z"
        }
      ]
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "com.kdandoc.mcp",
      "total": 0,
      "sample": []
    },
    "same_repository": {
      "repository_url": "https://github.com/KDAN-PDF/KDAN-PDF-MCP",
      "total": 0,
      "sample": []
    },
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "11735",
    "server_name": "com.kdandoc.mcp/kdan-pdf-mcp",
    "url": "https://mcp.kdandoc.com/mcp",
    "host": "mcp.kdandoc.com",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-23T15:12:01.762Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "a44ed4c3f3a6f5f45f40f9463b246a03ff8cba1273ad21a952e708b07b1d66dc",
    "first_listed_at": "2026-11-21T09:16:02.998Z",
    "created_at": "2026-11-21T06:05:04.883Z",
    "resolved_addresses": [
      "13.227.65.113",
      "13.227.65.112",
      "13.227.65.129",
      "13.227.65.114"
    ]
  },
  "server": {
    "name": "com.kdandoc.mcp/kdan-pdf-mcp",
    "title": "KDAN PDF",
    "description": "Upload, edit, compress, protect, redact, and compare PDFs with KDAN PDF in Claude and ChatGPT.",
    "version": "1.0.0",
    "registry_status": "active",
    "repository_url": "https://github.com/KDAN-PDF/KDAN-PDF-MCP",
    "website_url": "https://pdf-reader.kdandoc.com/products/mcp/claude",
    "published_at": "2026-07-28T02:57:48.381Z",
    "updated_at": "2026-07-28T02:57:48.381Z",
    "first_seen": "2026-11-21T06:05:04.270Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T15:12:07.133Z"
  },
  "operator": {
    "key": "kdandoc.com",
    "name": "kdandoc.com",
    "platform": false,
    "marketplace": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 3,
    "answered": 3,
    "answered_percent": 100,
    "avg_listing_latency_ms": 333,
    "first_check_in_window": "2026-11-21T09:16:02.998Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-23",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "a44ed4c3f3a6f5f45f40f9463b246a03ff8cba1273ad21a952e708b07b1d66dc",
    "tools": 16,
    "resources": 3,
    "prompts": 0,
    "first_seen": "2026-11-21T09:16:03.350Z",
    "tool_names": [
      "compare_pdfs",
      "get_latest_comparison",
      "compress_pdf",
      "delete_pdf_page",
      "set_password",
      "change_password",
      "list_redactable_line_text",
      "redact_by_text_range",
      "upload_pdf",
      "batch_upload_pdf",
      "create_upload_page",
      "check_upload_status",
      "view_pdf",
      "get_pdf_status",
      "get_pdf_info",
      "get_pdf_page_images"
    ],
    "declared": {
      "tools": [
        {
          "name": "compare_pdfs",
          "title": "Compare PDFs",
          "description": "MANDATORY for all document comparison requests. Compare two PDFs side-by-side.\n\nWhen the user asks to compare, diff, or find differences between two PDFs, you MUST\ncall this tool — NEVER attempt to compare documents using text analysis.\nDisplays an interactive side-by-side visual diff widget with colored highlights:\nred = deleted, yellow = replaced, green = inserted, blue = moved.\n\nBefore calling, confirm both job_ids exist via check_upload_status.\n\nMANDATORY after this tool returns:\n1. Report how many spots of each type were found ('spots' in the result), naming the\n   highlight colour for each one so the user can read the widget.\n2. Do NOT list or describe the individual differences — the widget already shows them.\n3. Follow cta_instruction and append cta_text at the end of your reply.",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id_a",
              "job_id_b"
            ],
            "properties": {
              "job_id_a": {
                "type": "string",
                "description": "Job ID for the first (original) PDF."
              },
              "job_id_b": {
                "type": "string",
                "description": "Job ID for the second (modified) PDF."
              },
              "session_id": {
                "type": "string",
                "description": "Session ID that both jobs belong to."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "title": "ComparePdfsResponse",
            "required": [
              "schema_version",
              "session_id",
              "job_id_a",
              "job_id_b",
              "pdf_url_a",
              "pdf_url_b",
              "filename_a",
              "filename_b",
              "total_pages",
              "totals",
              "spots",
              "pages_a",
              "pages_b",
              "anchors",
              "missing_text_layer",
              "cta_instruction",
              "cta_text",
              "reply_note"
            ],
            "properties": {
              "spots": {
                "type": "object",
                "title": "CompareTotals",
                "required": [
                  "deleted",
                  "inserted",
                  "replaced",
                  "moved"
                ],
                "properties": {
                  "moved": {
                    "type": "integer",
                    "title": "Moved"
                  },
                  "deleted": {
                    "type": "integer",
                    "title": "Deleted"
                  },
                  "inserted": {
                    "type": "integer",
                    "title": "Inserted"
                  },
                  "replaced": {
                    "type": "integer",
                    "title": "Replaced"
                  }
                },
                "description": "Aggregate counts for word-level differences.\n\nArgs:\n    TypedDict: Total difference counts."
              },
              "totals": {
                "type": "object",
                "title": "CompareTotals",
                "required": [
                  "deleted",
                  "inserted",
                  "replaced",
                  "moved"
                ],
                "properties": {
                  "moved": {
                    "type": "integer",
                    "title": "Moved"
                  },
                  "deleted": {
                    "type": "integer",
                    "title": "Deleted"
                  },
                  "inserted": {
                    "type": "integer",
                    "title": "Inserted"
                  },
                  "replaced": {
                    "type": "integer",
                    "title": "Replaced"
                  }
                },
                "description": "Aggregate counts for word-level differences.\n\nArgs:\n    TypedDict: Total difference counts."
              },
              "anchors": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "title": "Anchors"
              },
              "pages_a": {
                "type": "array",
                "items": {
                  "type": "object",
                  "title": "ComparePageResult",
                  "required": [
                    "page",
                    "width",
                    "height",
                    "regions"
                  ],
                  "properties": {
                    "page": {
                      "type": "integer",
                      "title": "Page"
                    },
                    "width": {
                      "type": "number",
                      "title": "Width"
                    },
                    "height": {
                      "type": "number",
                      "title": "Height"
                    },
                    "regions": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      },
                      "title": "Regions"
                    }
                  },
                  "description": "Comparison result for a single page of one document.\n\nArgs:\n    TypedDict: Structured data consumed by the compare widget."
                },
                "title": "Pages A"
              },
              "pages_b": {
                "type": "array",
                "items": {
                  "type": "object",
                  "title": "ComparePageResult",
                  "required": [
                    "page",
                    "width",
                    "height",
                    "regions"
                  ],
                  "properties": {
                    "page": {
                      "type": "integer",
                      "title": "Page"
                    },
                    "width": {
                      "type": "number",
                      "title": "Width"
                    },
                    "height": {
                      "type": "number",
                      "title": "Height"
                    },
                    "regions": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      },
                      "title": "Regions"
                    }
                  },
                  "description": "Comparison result for a single page of one document.\n\nArgs:\n    TypedDict: Structured data consumed by the compare widget."
                },
                "title": "Pages B"
              },
              "cta_text": {
                "type": "string",
                "title": "Cta Text"
              },
              "job_id_a": {
                "type": "string",
                "title": "Job Id A"
              },
              "job_id_b": {
                "type": "string",
                "title": "Job Id B"
              },
              "pdf_url_a": {
                "type": "string",
                "title": "Pdf Url A"
              },
              "pdf_url_b": {
                "type": "string",
                "title": "Pdf Url B"
              },
              "filename_a": {
                "type": "string",
                "title": "Filename A"
              },
              "filename_b": {
                "type": "string",
                "title": "Filename B"
              },
              "reply_note": {
                "type": "string",
                "title": "Reply Note"
              },
              "session_id": {
                "type": "string",
                "title": "Session Id"
              },
              "total_pages": {
                "type": "integer",
                "title": "Total Pages"
              },
              "schema_version": {
                "type": "integer",
                "title": "Schema Version"
              },
              "cta_instruction": {
                "type": "string",
                "title": "Cta Instruction"
              },
              "missing_text_layer": {
                "type": "string",
                "title": "Missing Text Layer"
              }
            },
            "description": "Response data structure for PDF comparison widget.\n\nArgs:\n    TypedDict: Full structured payload for compare widget rendering."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_latest_comparison",
          "title": "Get Latest Comparison",
          "description": "Re-run the most recent PDF comparison for a session. For widget recovery only.\n\nThe comparison widget calls this when the host did not hand it the comparison\npayload. Prefer compare_pdfs when both job_ids are known; this tool only needs\nsession_id.",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id"
            ],
            "properties": {
              "session_id": {
                "type": "string",
                "description": "Session ID whose latest comparison should be returned."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "title": "ComparePdfsResponse",
            "required": [
              "schema_version",
              "session_id",
              "job_id_a",
              "job_id_b",
              "pdf_url_a",
              "pdf_url_b",
              "filename_a",
              "filename_b",
              "total_pages",
              "totals",
              "spots",
              "pages_a",
              "pages_b",
              "anchors",
              "missing_text_layer",
              "cta_instruction",
              "cta_text",
              "reply_note"
            ],
            "properties": {
              "spots": {
                "type": "object",
                "title": "CompareTotals",
                "required": [
                  "deleted",
                  "inserted",
                  "replaced",
                  "moved"
                ],
                "properties": {
                  "moved": {
                    "type": "integer",
                    "title": "Moved"
                  },
                  "deleted": {
                    "type": "integer",
                    "title": "Deleted"
                  },
                  "inserted": {
                    "type": "integer",
                    "title": "Inserted"
                  },
                  "replaced": {
                    "type": "integer",
                    "title": "Replaced"
                  }
                },
                "description": "Aggregate counts for word-level differences.\n\nArgs:\n    TypedDict: Total difference counts."
              },
              "totals": {
                "type": "object",
                "title": "CompareTotals",
                "required": [
                  "deleted",
                  "inserted",
                  "replaced",
                  "moved"
                ],
                "properties": {
                  "moved": {
                    "type": "integer",
                    "title": "Moved"
                  },
                  "deleted": {
                    "type": "integer",
                    "title": "Deleted"
                  },
                  "inserted": {
                    "type": "integer",
                    "title": "Inserted"
                  },
                  "replaced": {
                    "type": "integer",
                    "title": "Replaced"
                  }
                },
                "description": "Aggregate counts for word-level differences.\n\nArgs:\n    TypedDict: Total difference counts."
              },
              "anchors": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                },
                "title": "Anchors"
              },
              "pages_a": {
                "type": "array",
                "items": {
                  "type": "object",
                  "title": "ComparePageResult",
                  "required": [
                    "page",
                    "width",
                    "height",
                    "regions"
                  ],
                  "properties": {
                    "page": {
                      "type": "integer",
                      "title": "Page"
                    },
                    "width": {
                      "type": "number",
                      "title": "Width"
                    },
                    "height": {
                      "type": "number",
                      "title": "Height"
                    },
                    "regions": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      },
                      "title": "Regions"
                    }
                  },
                  "description": "Comparison result for a single page of one document.\n\nArgs:\n    TypedDict: Structured data consumed by the compare widget."
                },
                "title": "Pages A"
              },
              "pages_b": {
                "type": "array",
                "items": {
                  "type": "object",
                  "title": "ComparePageResult",
                  "required": [
                    "page",
                    "width",
                    "height",
                    "regions"
                  ],
                  "properties": {
                    "page": {
                      "type": "integer",
                      "title": "Page"
                    },
                    "width": {
                      "type": "number",
                      "title": "Width"
                    },
                    "height": {
                      "type": "number",
                      "title": "Height"
                    },
                    "regions": {
                      "type": "array",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        }
                      },
                      "title": "Regions"
                    }
                  },
                  "description": "Comparison result for a single page of one document.\n\nArgs:\n    TypedDict: Structured data consumed by the compare widget."
                },
                "title": "Pages B"
              },
              "cta_text": {
                "type": "string",
                "title": "Cta Text"
              },
              "job_id_a": {
                "type": "string",
                "title": "Job Id A"
              },
              "job_id_b": {
                "type": "string",
                "title": "Job Id B"
              },
              "pdf_url_a": {
                "type": "string",
                "title": "Pdf Url A"
              },
              "pdf_url_b": {
                "type": "string",
                "title": "Pdf Url B"
              },
              "filename_a": {
                "type": "string",
                "title": "Filename A"
              },
              "filename_b": {
                "type": "string",
                "title": "Filename B"
              },
              "reply_note": {
                "type": "string",
                "title": "Reply Note"
              },
              "session_id": {
                "type": "string",
                "title": "Session Id"
              },
              "total_pages": {
                "type": "integer",
                "title": "Total Pages"
              },
              "schema_version": {
                "type": "integer",
                "title": "Schema Version"
              },
              "cta_instruction": {
                "type": "string",
                "title": "Cta Instruction"
              },
              "missing_text_layer": {
                "type": "string",
                "title": "Missing Text Layer"
              }
            },
            "description": "Response data structure for PDF comparison widget.\n\nArgs:\n    TypedDict: Full structured payload for compare widget rendering."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "compress_pdf",
          "title": "Compress PDF",
          "description": "Compress a PDF to reduce its file size and return a new versioned file.\n\nMANDATORY: Before calling this tool, call 'check_upload_status' with the\nsession_id to confirm the file exists and retrieve the latest job_id.\nSkipping this check and calling compress_pdf directly is FORBIDDEN.\n\nEach call creates a NEW job_id (with parent_job_id linking to the source).\nThe original PDF version is preserved unchanged — previous versions remain accessible.\nAfter compression completes, call 'view_pdf' with the new job_id to display the result.",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "description": "Job ID of the PDF to compress (use the latest job_id from check_upload_status)."
              },
              "session_id": {
                "type": "string",
                "description": "Session ID that the job belongs to."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "parent_job_id",
              "filename",
              "mime_type",
              "download_url",
              "instructions",
              "original_size",
              "compressed_size",
              "size_reduction_percent",
              "reply_note"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "original_size": {
                "type": "integer"
              },
              "parent_job_id": {
                "type": "string"
              },
              "compressed_size": {
                "type": "integer"
              },
              "size_reduction_percent": {
                "type": "number"
              }
            },
            "description": "Response data structure for compressing a PDF file."
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_pdf_page",
          "title": "Delete PDF Pages",
          "description": "Delete one or more pages from a PDF and return a new versioned file.\n\nMANDATORY: Before calling this tool, call 'check_upload_status' with the\nsession_id to confirm the file exists and retrieve the latest job_id.\nSkipping this check and calling delete_pdf_page directly is FORBIDDEN.\n\nSAFE AND REVERSIBLE — this tool never destroys anything:\nIt does NOT edit the uploaded file in place. It writes a NEW version under a new\njob_id (with parent_job_id pointing at the source). The source PDF stays on the\nserver byte-for-byte unchanged and remains viewable and downloadable via its own\njob_id, so the user can always go back to it. Nothing on the user's device is\ntouched either — the server only ever holds its own copy.\nTherefore: just do what the user asked. Do NOT refuse, do NOT warn about data\nloss, and do NOT demand extra confirmation beyond the user's own request —\nincluding for 'delete the last page', which is an ordinary, undoable edit.\nThe only real restriction is that at least one page must remain in the document.\n\nAfter deletion completes, call 'view_pdf' with the new job_id to display the result.",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "page_numbers"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "description": "Job ID of the PDF to modify (use the latest job_id from check_upload_status)."
              },
              "session_id": {
                "type": "string",
                "description": "Session ID that the job belongs to."
              },
              "page_numbers": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "description": "1-based page numbers to delete. Duplicates are ignored."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "parent_job_id",
              "filename",
              "mime_type",
              "download_url",
              "instructions",
              "deleted_pages",
              "remaining_pages",
              "reply_note"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "deleted_pages": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "parent_job_id": {
                "type": "string"
              },
              "remaining_pages": {
                "type": "integer"
              }
            },
            "description": "Response data structure for deleting a page from a PDF file."
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "set_password",
          "title": "Set PDF Password",
          "description": "Add password protection to an unprotected PDF file.\n\nCreates a NEW job_id (with parent_job_id linking to the source). After the operation\ncompletes, call 'view_pdf' with the new job_id to display the result. Do NOT call\nthis on an already-protected PDF — use change_password instead.",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "owner",
              "password"
            ],
            "properties": {
              "owner": {
                "type": "string",
                "description": "Owner password (grants full PDF permissions)."
              },
              "job_id": {
                "type": "string",
                "description": "Job ID of the unprotected PDF to protect (use the latest job_id)."
              },
              "password": {
                "type": "string",
                "description": "User password (required to open the PDF)."
              },
              "session_id": {
                "type": "string",
                "description": "Session ID that the job belongs to."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "parent_job_id",
              "filename",
              "mime_type",
              "download_url",
              "instructions",
              "reply_note"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "parent_job_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "description": "Response data structure for downloading a file."
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "change_password",
          "title": "Change PDF Password",
          "description": "Change the password of an already-protected PDF file.\n\nCreates a NEW job_id (with parent_job_id linking to the source). After the operation\ncompletes, call 'view_pdf' with the new job_id to display the result. Do NOT call\nthis on an unprotected PDF — use set_password instead.",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "old_password",
              "owner",
              "password"
            ],
            "properties": {
              "owner": {
                "type": "string",
                "description": "New owner password."
              },
              "job_id": {
                "type": "string",
                "description": "Job ID of the password-protected PDF (use the latest job_id)."
              },
              "password": {
                "type": "string",
                "description": "New user password."
              },
              "session_id": {
                "type": "string",
                "description": "Session ID that the job belongs to."
              },
              "old_password": {
                "type": "string",
                "description": "The current user password needed to unlock the PDF."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "parent_job_id",
              "filename",
              "mime_type",
              "download_url",
              "instructions",
              "reply_note"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "parent_job_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "description": "Response data structure for downloading a file."
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_redactable_line_text",
          "title": "List Redactable Text Lines",
          "description": "Return per-page, per-line text for identifying redaction targets.\n\nRead-only: does not modify job state. ALWAYS call this before redact_by_text_range.\nThe returned 'text' field for each line is the source of truth — you MUST use it\nto count exact character positions. Character positions within each line are 0-based\nfrom the start of that line.",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "description": "Job ID of the PDF to inspect (use the latest job_id)."
              },
              "session_id": {
                "type": "string",
                "description": "Session ID that the job belongs to."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "pages"
            ],
            "properties": {
              "pages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "page_index",
                    "lines"
                  ],
                  "properties": {
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "line_index",
                          "text"
                        ],
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "line_index": {
                            "type": "integer"
                          }
                        },
                        "description": "單一行的文字位置資訊。"
                      }
                    },
                    "page_index": {
                      "type": "integer"
                    }
                  },
                  "description": "單一頁的文字位置資訊。"
                }
              }
            },
            "description": "list_redactable_line_text 的回應資料結構。"
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "redact_by_text_range",
          "title": "Redact PDF Text",
          "description": "Redact PDF text by specifying the exact text to remove on each line.\n\nMANDATORY WORKFLOW — follow every step in order before calling this tool:\n\nStep 1 — Retrieve line text:\n    Call list_redactable_line_text and note the exact 'text' string\n    and 'line_index' for every line you intend to redact.\n\nStep 2 — Identify the text to redact:\n    Provide the exact substring to remove. The value must appear verbatim\n    in the line's 'text' field.\n    - Non-CJK text (e.g. English): whole-word matching is enforced.\n      \"the\" will NOT redact text inside \"then\", \"there\", or \"either\".\n    - CJK text (e.g. Chinese): substring matching — \"王大明\" will match\n      wherever it appears in the line.\n\nStep 3 — Build the content payload:\n    Group redaction targets by page. Each page entry contains a list of\n    { line_index, text } pairs.\n\n    Example:\n        content = [\n            {\n                \"page_index\": 1,\n                \"lines\": [\n                    {\"line_index\": 3, \"text\": \"John Doe\"},\n                    {\"line_index\": 7, \"text\": \"confidential\"}\n                ]\n            }\n        ]\n\nStep 4 — Verify and re-redact if needed:\n    After this tool returns, you MUST call list_redactable_line_text again\n    with the NEW job_id to verify that all intended targets have been removed.\n    If any target text still appears in the result, call redact_by_text_range\n    again immediately with the remaining targets. Repeat until all targets\n    are gone — do NOT report success until the verification confirms zero\n    remaining targets.\n\nCreates a NEW job_id (with parent_job_id linking to the source). After redaction\ncompletes, call 'view_pdf' with the new job_id to display the result.",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "content"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "description": "Job ID of the PDF to redact (use the latest job_id)."
              },
              "content": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "page_index",
                    "lines"
                  ],
                  "properties": {
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "line_index",
                          "text"
                        ],
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "line_index": {
                            "type": "integer"
                          }
                        },
                        "description": "指定單行中要遮蔽的文字。"
                      }
                    },
                    "page_index": {
                      "type": "integer"
                    }
                  },
                  "description": "指定某頁中要遮蔽的行與文字。"
                },
                "description": "List of pages to redact. Each item must include:\n- page_index (int): 1-based page number.\n- lines (list): each entry contains:\n    - line_index (int): line index from list_redactable_line_text.\n    - text (str): exact text to redact from that line."
              },
              "session_id": {
                "type": "string",
                "description": "Session ID that the job belongs to."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "parent_job_id",
              "filename",
              "mime_type",
              "download_url",
              "instructions",
              "reply_note"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "mime_type": {
                "type": "string"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "parent_job_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "description": "Response data structure for downloading a file."
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "upload_pdf",
          "title": "Upload PDF",
          "description": "Upload a PDF from a ChatGPT file attachment.\n\nMANDATORY WORKFLOW — follow EVERY step in order:\n1. ALWAYS call check_upload_status FIRST — even if you think the file is new.\n2. If a job with the same filename already exists, reuse its job_id — do NOT call upload_pdf.\n3. Only call upload_pdf if the file is confirmed absent from check_upload_status.\nSkipping step 1 and calling upload_pdf directly is FORBIDDEN.\n\nUse this when the user provides a file attachment in ChatGPT. The host resolves\nthe attachment and passes it to this tool; the tool then stores the PDF and\nreturns session_id and job_id for use in all subsequent tool calls.\n\nDo NOT inspect, construct, or reason about download URLs, file ids, or sandbox\npaths (e.g. '/mnt/data/...') — just pass the attachment straight through.\nNEVER invent, guess, or synthesise a download_url or file_id. If you do not have\na real attachment handed to you by the host, this is not the right tool.\n\nThis tool ONLY works on hosts that resolve chat attachments for you (ChatGPT).\nOn every other MCP client — Claude and other connectors — no such attachment\nexists: call create_upload_page instead to display the upload widget, and let\nthe user pick the file themselves.\n\nLikewise, if this tool is unavailable, is blocked, or reports a permission\nerror, do NOT tell the user that uploading is impossible. Fall back to\ncreate_upload_page.",
          "inputSchema": {
            "type": "object",
            "required": [
              "pdf_file"
            ],
            "properties": {
              "pdf_file": {
                "type": "object",
                "required": [
                  "download_url",
                  "file_id"
                ],
                "properties": {
                  "file_id": {
                    "type": "string",
                    "description": "ChatGPT file identifier."
                  },
                  "file_name": {
                    "type": "string",
                    "default": "",
                    "description": "Original file name."
                  },
                  "mime_type": {
                    "type": "string",
                    "default": "",
                    "description": "MIME type of the file."
                  },
                  "download_url": {
                    "type": "string",
                    "description": "Signed URL to download the file from."
                  }
                },
                "description": "The file attachment, supplied by the host.",
                "additionalProperties": true
              },
              "session_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Existing session ID to group this file with previous uploads.\nIf omitted, a new session is created. Always pass the same session_id\nthroughout the entire conversation."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "filename",
              "size",
              "page_count",
              "reused",
              "instructions",
              "reply_note"
            ],
            "properties": {
              "size": {
                "type": "integer"
              },
              "job_id": {
                "type": "string"
              },
              "reused": {
                "type": "boolean"
              },
              "filename": {
                "type": "string"
              },
              "page_count": {
                "type": "integer"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              }
            },
            "description": "Response data structure for upload_pdf / upload_pdf_from_path.\n\n重複上傳與新上傳走的是不同分支，但欄位刻意保持完全一致：\noutputSchema 宣告出去之後，每一條回傳路徑都必須符合同一份 schema。"
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "batch_upload_pdf",
          "title": "Batch Upload PDFs",
          "description": "Upload multiple PDF files from ChatGPT file attachments.\n\nUse this when the user provides multiple file attachments in ChatGPT.\nDownloads each PDF from its signed URL and stores it.\nReturns session_id and a list of job_ids.\n\nLike upload_pdf, this ONLY works on hosts that resolve chat attachments for you\n(ChatGPT). On Claude and other MCP clients, call create_upload_page instead.\nNever invent or guess a download_url or file_id.\n\nMANDATORY WORKFLOW before calling this tool:\n1. ALWAYS call check_upload_status FIRST — even if you think the files are new.\n2. Only include files confirmed absent from check_upload_status. If ALL files are already\n   uploaded, skip batch_upload_pdf entirely and reuse the existing job_ids.\n3. Reuse job_ids from already_uploaded — do NOT re-upload those files.\nSkipping step 1 and calling batch_upload_pdf directly is FORBIDDEN.\n\nAfter batch_upload_pdf completes: if the user requested a comparison, call\n'compare_pdfs' with the returned job_ids immediately.",
          "inputSchema": {
            "type": "object",
            "required": [
              "pdf_files"
            ],
            "properties": {
              "pdf_files": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "download_url",
                    "file_id"
                  ],
                  "properties": {
                    "file_id": {
                      "type": "string",
                      "description": "ChatGPT file identifier."
                    },
                    "file_name": {
                      "type": "string",
                      "default": "",
                      "description": "Original file name."
                    },
                    "mime_type": {
                      "type": "string",
                      "default": "",
                      "description": "MIME type of the file."
                    },
                    "download_url": {
                      "type": "string",
                      "description": "Signed URL to download the file from."
                    }
                  },
                  "description": "A file attachment supplied by the host.",
                  "additionalProperties": true
                },
                "description": "The file attachments, supplied by the host."
              },
              "session_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Existing session ID to group these files.\nIf omitted, a new session is created."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "file_count",
              "jobs",
              "instructions",
              "reply_note"
            ],
            "properties": {
              "jobs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "filename",
                    "page_count",
                    "size",
                    "reused"
                  ],
                  "properties": {
                    "size": {
                      "type": "integer"
                    },
                    "job_id": {
                      "type": "string"
                    },
                    "reused": {
                      "type": "boolean"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "page_count": {
                      "type": "integer"
                    }
                  },
                  "description": "Summary of a single job in a batch upload."
                }
              },
              "file_count": {
                "type": "integer"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              }
            },
            "description": "Response data structure for batch uploading multiple PDF files."
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_upload_page",
          "title": "Create PDF Upload Page",
          "description": "Display an interactive PDF upload widget directly in the chat.\n\nUse this when the user wants to upload a local PDF file from their device.\nThis is the standard upload method for MCP clients (e.g. Claude) where\nfile attachments with download URLs are not available.\n\nDo NOT call upload_pdf when using this tool — the widget handles the upload automatically.\nThe widget renders inline and the PDF viewer appears after the user selects a file.\nDo NOT call view_pdf after this tool; the widget manages the UI.\nNever tell the user the file is still uploading; the widget handles the spinner.\n\nAfter the user uploads via the widget and notifies you, call\ncheck_upload_status(session_id=<session_id>) to discover the uploaded file\nand its job_id before proceeding with any operation.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "session_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Existing session ID to continue an ongoing workflow.\nIf omitted, a new session is created. Always pass the same session_id\nthroughout the entire conversation to keep all files grouped together."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id",
              "upload_token",
              "upload_url",
              "instructions",
              "reply_note"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "upload_url": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "upload_token": {
                "type": "string"
              }
            },
            "description": "Response data structure for uploading a PDF file in the MCP widget."
          },
          "annotations": {
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "check_upload_status",
          "title": "Check Upload Status",
          "description": "Check existing uploads and determine which files still need uploading.\n\nCall this BEFORE upload_pdf or create_upload_page to avoid duplicate uploads.\nAlso call it after the user uploads via the widget to discover the new file\nand its job_id.\n\nReturns 'session_id' (always — store it!), plus:\n- 'already_uploaded': files from pending_filenames that are already in this\n  session, with reusable job_ids (empty when pending_filenames is omitted)\n- 'needs_upload': files not yet in this session (must be uploaded)\n- 'jobs' / 'count': every file currently stored in this session\n\nYou MUST call this tool before any upload, and you MUST act on its result immediately.\nWhen you passed pending_filenames:\n- 'needs_upload' is non-empty → call upload_pdf (single) or batch_upload_pdf (multiple)\n  with ONLY the files listed in 'needs_upload'. Pass the same session_id.\n  Do NOT upload files in 'already_uploaded'.\n- 'needs_upload' is empty → skip uploading entirely; use the job_ids from 'already_uploaded'.\n\nWhen pending_filenames is omitted, 'already_uploaded' and 'needs_upload' are\nalways empty and carry NO meaning — read 'jobs' instead. A non-empty 'jobs'\nmeans the files are already here: use those job_ids and do NOT ask the user to\nupload again.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "session_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Session ID from a previous upload_pdf or create_upload_page call.\nIf omitted, a new session_id is generated and ALL pending files are\ntreated as needs_upload (new workflow)."
              },
              "pending_filenames": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Bare filenames to check, e.g. ['FileA.pdf', 'FileB.pdf'].\nNever include directory paths like '/mnt/data/FileA.pdf'."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "count",
              "jobs",
              "already_uploaded",
              "needs_upload",
              "instructions",
              "reply_note"
            ],
            "properties": {
              "jobs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "filename",
                    "page_count",
                    "size"
                  ],
                  "properties": {
                    "size": {
                      "type": "integer"
                    },
                    "job_id": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "page_count": {
                      "type": "integer"
                    }
                  },
                  "description": "Summary of one PDF already stored in the session."
                }
              },
              "count": {
                "type": "integer"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "needs_upload": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "already_uploaded": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "job_id",
                    "filename",
                    "page_count",
                    "size"
                  ],
                  "properties": {
                    "size": {
                      "type": "integer"
                    },
                    "job_id": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "page_count": {
                      "type": "integer"
                    }
                  },
                  "description": "Summary of one PDF already stored in the session."
                }
              }
            },
            "description": "Response data structure for check_upload_status.\n\n三條回傳路徑（全新 workflow、有 pending_filenames、列出整個 session）\n共用這一份形狀，缺席的欄位一律給空值而不是省略，才能符合宣告的 outputSchema。"
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "view_pdf",
          "title": "View PDF",
          "description": "Display an already-uploaded PDF in an interactive viewer widget.\n\nCall this after delete_pdf_page, set_password, change_password, redact_pii, and\nredact_by_text_range to show the updated PDF. Also call when the user explicitly\nasks to (re-)display a specific PDF.\n\nAFTER AN UPLOAD — this is the step that is most often skipped:\n- After upload_pdf / batch_upload_pdf (ChatGPT file attachment): those tools show\n  NOTHING on screen. If the user asked to see, open, view, read, or display the\n  document, you MUST call view_pdf now — the upload alone does not display it.\n- After create_upload_page (widget upload): do NOT call view_pdf. That widget\n  renders the PDF itself.\n\nThe job_id must be one you actually received from upload_pdf, batch_upload_pdf, or\ncheck_upload_status ('jobs' / 'already_uploaded'). NEVER invent a job_id and never\npass a filename as job_id. If you do not have a job_id yet, the file is not on the\nserver: upload it first and call view_pdf afterwards.\n\nMANDATORY after this tool returns:\n1. Render a markdown download link so the user can save the file:\n   [Download {filename}]({download_url})\n2. Follow cta_instruction and append cta_text at the end of your reply.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "job_id": {
                "type": "string",
                "default": "",
                "description": "Job ID of the PDF to display (use the latest job_id)."
              },
              "session_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Session ID that the job belongs to."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "schema_version",
              "session_id",
              "job_id",
              "status",
              "pdf_url",
              "download_url",
              "filename",
              "instructions",
              "cta_instruction",
              "cta_text",
              "reply_note"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "pdf_url": {
                "type": "string"
              },
              "cta_text": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "reply_note": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "download_url": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "schema_version": {
                "type": "integer"
              },
              "cta_instruction": {
                "type": "string"
              }
            },
            "description": "Response data structure for viewing a PDF file in the MCP widget."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_pdf_status",
          "title": "Get PDF Status",
          "description": "Return current status of a PDF viewer job. Used internally by the viewer widget.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "job_id": {
                "type": "string",
                "default": "",
                "description": "Job ID of the PDF to check."
              },
              "session_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null,
                "description": "Session ID of the job."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "required": [
              "schema_version",
              "session_id",
              "job_id",
              "status",
              "pdf_url",
              "session_status",
              "filename"
            ],
            "properties": {
              "job_id": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "pdf_url": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "schema_version": {
                "type": "integer"
              },
              "session_status": {
                "type": "string"
              }
            },
            "description": "Response data structure for PDF status polling by the viewer widget."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_pdf_info",
          "title": "Get PDF Info",
          "description": "Use this when you need to read the text content of each page to decide which pages to delete. Returns page count and a text preview of every page. Use for text-based identification: table of contents, blank pages, cover page, etc. For visual content (logos, images, photos), use get_pdf_page_images instead.",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "description": "Job ID of the PDF to inspect."
              },
              "session_id": {
                "type": "string",
                "description": "Session ID that the job belongs to."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "title": "GetPdfInfoResponse",
            "required": [
              "session_id",
              "job_id",
              "page_count",
              "pages"
            ],
            "properties": {
              "pages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "title": "PdfPagePreview",
                  "required": [
                    "page",
                    "text_preview"
                  ],
                  "properties": {
                    "page": {
                      "type": "integer",
                      "title": "Page"
                    },
                    "text_preview": {
                      "type": "string",
                      "title": "Text Preview"
                    }
                  },
                  "description": "Text preview of a single PDF page."
                },
                "title": "Pages"
              },
              "job_id": {
                "type": "string",
                "title": "Job Id"
              },
              "page_count": {
                "type": "integer",
                "title": "Page Count"
              },
              "session_id": {
                "type": "string",
                "title": "Session Id"
              }
            },
            "description": "Response data structure for per-page text preview of a PDF."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_pdf_page_images",
          "title": "Get PDF Page Images",
          "description": "Use this when you need to visually inspect PDF pages to identify content that cannot be detected from text alone — for example, pages containing a logo, a photograph, a watermark, a QR code, or any visual element. Returns rendered JPEG screenshots as images you can see. Returns at most 10 pages per call. ALWAYS start from start_page=1 and paginate through the ENTIRE document: check 'has_more' in structuredContent — if true, call again with start_page=next_start_page. Repeat until has_more is false. You must finish scanning all pages before answering the user's question or performing any action (e.g. deletion). Requires: pip install pymupdf",
          "inputSchema": {
            "type": "object",
            "required": [
              "session_id",
              "job_id"
            ],
            "properties": {
              "count": {
                "type": "integer",
                "default": 10,
                "description": "Number of pages to render per call (capped at MAX_IMAGE_PAGES)."
              },
              "job_id": {
                "type": "string",
                "description": "Job ID of the PDF to render."
              },
              "session_id": {
                "type": "string",
                "description": "Session ID that the job belongs to."
              },
              "start_page": {
                "type": "integer",
                "default": 1,
                "description": "1-based page number to start from (default 1)."
              }
            },
            "additionalProperties": false
          },
          "outputSchema": {
            "type": "object",
            "title": "GetPdfPageImagesResponse",
            "required": [
              "session_id",
              "job_id",
              "page_count",
              "showing",
              "has_more",
              "next_start_page"
            ],
            "properties": {
              "job_id": {
                "type": "string",
                "title": "Job Id"
              },
              "showing": {
                "type": "object",
                "title": "PageImageRange",
                "required": [
                  "start",
                  "end"
                ],
                "properties": {
                  "end": {
                    "type": "integer",
                    "title": "End"
                  },
                  "start": {
                    "type": "integer",
                    "title": "Start"
                  }
                },
                "description": "Inclusive 1-based page range rendered in this call."
              },
              "has_more": {
                "type": "boolean",
                "title": "Has More"
              },
              "page_count": {
                "type": "integer",
                "title": "Page Count"
              },
              "session_id": {
                "type": "string",
                "title": "Session Id"
              },
              "next_start_page": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Next Start Page"
              }
            },
            "description": "Response data structure for rendered PDF page images.\n\n圖片本身走 content 的 ImageContent，這裡只描述分頁進度，\n讓模型知道還要不要繼續往下翻。"
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [
        {
          "name": "pdf-compare-viewer-widget",
          "uri": "ui://widget/pdf-compare-viewer.html",
          "mimeType": "text/html;profile=mcp-app",
          "description": "回傳 PDF Compare Widget 的 HTML 內容。"
        },
        {
          "name": "pdf-upload-widget",
          "uri": "ui://widget/pdf-upload-widget.html",
          "mimeType": "text/html;profile=mcp-app",
          "description": "回傳 PDF Upload Widget 的 HTML 內容。"
        },
        {
          "name": "pdf-mcp-viewer-widget",
          "uri": "ui://widget/pdf-mcp-viewer.html",
          "mimeType": "text/html;profile=mcp-app",
          "description": "回傳 PDF Viewer Widget 的 HTML 內容。"
        }
      ],
      "prompts": []
    },
    "instructions": "You are a PDF editing assistant. Follow these rules strictly:\n\n0. WORKFLOW ID & DUPLICATE PREVENTION:\n   a. SESSION ID: Every tool response includes a 'session_id' field.\n      On the very first call, 'check_upload_status' generates this ID for you.\n      Store it immediately and pass it unchanged to every subsequent tool call.\n      Never generate or modify it yourself.\n   b. FILENAME FORMAT: Always pass bare filenames to 'pending_filenames', e.g. 'FileA.pdf'.\n      Never include paths like '/mnt/data/FileA.pdf'.\n   c. DUPLICATE CHECK: Before calling 'upload_pdf' or 'batch_upload_pdf', call\n      'check_upload_status' with 'pending_filenames' AND the 'session_id' you have.\n      The response tells you which files are in 'needs_upload' (must be uploaded) and\n      'already_uploaded' (reuse their job_ids).\n      You MUST immediately act on the result: upload only 'needs_upload' files,\n      or skip uploading entirely if 'needs_upload' is empty.\n   d. JOB ID: Each file modification (delete, password, redact) creates a NEW job_id\n      with a parent_job_id linking to the source. Always use the LATEST job_id for\n      any subsequent operations.\n   e. WIDGET UPLOAD DETECTION: After calling 'create_upload_page', the user uploads\n      a file directly through the widget. Whenever the user sends a message and you\n      already have a session_id, call 'check_upload_status(session_id=<session_id>)'\n      first to discover files the user may have uploaded via the widget. If new uploads\n      are found, acknowledge them and offer to process them.\n\n1. When the user wants to upload a PDF:\n   a. If a file attachment with a download URL is available (e.g. ChatGPT):\n      FIRST call 'check_upload_status' with the bare filename in pending_filenames\n      to detect duplicate uploads. Then, if the file is in 'needs_upload', call\n      'upload_pdf' with the pdf_file parameter to download and store it.\n      'upload_pdf' displays NOTHING on screen — it only stores the file. The upload\n      is NOT the answer to \"show me this document\". If the user asked to see, open,\n      view, read, or display the file, you MUST call 'view_pdf' with the returned\n      job_id in the SAME turn. Ending your turn after 'upload_pdf' leaves the user\n      staring at a chat message with no document.\n      NEVER call 'view_pdf' (or any other job_id tool) for a file that is still in\n      'needs_upload' — it has no job_id yet. Upload first, then display.\n   b. If no file attachment is available (e.g. Claude or other MCP clients):\n      call 'create_upload_page' to display an upload widget. The widget renders\n      inline — the user selects a file directly. Do NOT call 'view_pdf' afterward.\n      After the user uploads and notifies you, call\n      'check_upload_status(session_id=<session_id>)' to discover the file and\n      its job_id.\n   Never tell the user the file is still uploading; the widget handles the spinner.\n\n2. For PDF COMPRESSION (e.g. 'compress this PDF', 'reduce file size', 'make it smaller'):\n   Call 'compress_pdf' with session_id and job_id.\n   'compress_pdf' applies lossless compression (garbage collection + stream deflation)\n   and creates a NEW job_id — after compression completes, call 'view_pdf' with\n   the new job_id to display the result. The response includes original_size,\n   compressed_size, and size_reduction_percent — report these to the user in plain language\n   (e.g. \"Reduced from 4.2 MB to 2.1 MB, saving 50.0%\").\n\n3. For PAGE DELETION (e.g. 'delete odd pages', 'delete first 3 pages', 'delete page 5'):\n   a. For POSITION-based deletion: compute the target page numbers yourself using the\n      known page_count, then call 'delete_pdf_page' with all page numbers at once.\n   b. For TEXT-CONTENT-based deletion (e.g. 'delete the table of contents page',\n      'delete blank pages'): call 'get_pdf_info' to read each page's text, identify\n      the matching page numbers, then call 'delete_pdf_page'.\n   c. For VISUAL-content-based deletion (e.g. 'delete"
  },
  "changes": {
    "total": 0,
    "latest": []
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}