Twinkle HubTwinkle Hub
로그인

📌 2026-06-30 추가: 🎓 Teacher exam dual corpus — 12,731 qualification questions + 2,421 recruitment questions (519개 데이터셋)

전체 changelog 보기 →

抽 PDF 內文

twtools-extract_pdf_text

범용MIT

提取 PDF 內文(pymupdf-based, born-digital only)。

Args:
    source: PDF URL 或 base64-encoded PDF 內容。
    max_pages: 最多處理幾頁(None = 全部)。

Returns: text + per-page list + is_scanned flag。

**行為說明(重要,client agents 請注意)**:
- 對 born-digital PDF(含可選取文字):正常回 text + pages
- 對 scanned / image-only PDF:**這不是錯誤**,會優雅降級回
  `{is_scanned: true, reason: "OCR required, ..."}`,無 `error` 欄位、
  也不丟例外。掃描件 OCR 屬高階方案 call_agent 範圍,本 tool 不處理。
- 下游 agent 看到 `is_scanned: true` 應該當作「PDF 不適合此 tool」而非
  「呼叫失敗」,可改走 OCR 或請使用者重供 born-digital 版本。

입력 스키마

{
  "properties": {
    "source": {
      "title": "Source",
      "type": "string"
    },
    "max_pages": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Max Pages"
    }
  },
  "required": [
    "source"
  ],
  "title": "extract_pdf_textArguments",
  "type": "object"
}

호출 방법

Twinkle Hub MCP 클라이언트가 설정되면 에이전트는 twtools-extract_pdf_text을 봅니다. 호출을 요청하기만 하면 — 예시:

# Ask Claude / any MCP client:
請用 twtools-extract_pdf_text 處理 "…"。

# It will call:
twtools-extract_pdf_text(input="…")

아직 클라이언트를 설정하지 않으셨나요?

Claude Desktop은 3 분이면 연결 — .mcpb 다운로드 후 더블 클릭, 다른 클라이언트는 docs 참조.

사용자 문서 보기