Skip to content

Add QR code decoding functionality#5

Open
noboru-i wants to merge 4 commits intomainfrom
add-qr-code-decoding
Open

Add QR code decoding functionality#5
noboru-i wants to merge 4 commits intomainfrom
add-qr-code-decoding

Conversation

@noboru-i
Copy link
Owner

@noboru-i noboru-i commented Apr 15, 2025

Fixes #4

Add functionality to decode QR code images and extract text.

  • operations/qr.ts:

    • Add decodeQRCode function to decode QR code images using jsQR library.
    • Export QRCodeDecodeSchema for input validation using zod.
  • index.ts:

    • Add decode_qr_code tool to the list of tools in ListToolsRequestSchema handler.
    • Add a new case for decode_qr_code in the CallToolRequestSchema handler.
    • Parse arguments using QRCodeDecodeSchema and call decodeQRCode function.
  • package.json:

    • Add jsQR library as a dependency for QR code decoding.
  • README.md:

    • Document the new decode_qr_code tool in the list of tools.

For more details, open the Copilot Workspace session.

Fixes #4

Add functionality to decode QR code images and extract text.

* **`operations/qr.ts`**:
  - Add `decodeQRCode` function to decode QR code images using `jsQR` library.
  - Export `QRCodeDecodeSchema` for input validation using `zod`.

* **`index.ts`**:
  - Add `decode_qr_code` tool to the list of tools in `ListToolsRequestSchema` handler.
  - Add a new case for `decode_qr_code` in the `CallToolRequestSchema` handler.
  - Parse arguments using `QRCodeDecodeSchema` and call `decodeQRCode` function.

* **`package.json`**:
  - Add `jsQR` library as a dependency for QR code decoding.

* **`README.md`**:
  - Document the new `decode_qr_code` tool in the list of tools.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/noboru-i/web-development-toolbox/issues/4?shareId=XXXX-XXXX-XXXX-XXXX).
- Resolved conflicts from monorepo restructuring
- Added missing jsqr and pngjs dependencies for QR decoding
- Updated server handlers to include decode_qr_code tool
- Preserved QR code decoding functionality from the branch
@noboru-i
Copy link
Owner Author

decodeQRCode の中身を空っぽにしたら、
VS Code 1.101で、base64のインプットを受け取れることが確認できた。

QRコード読み取りライブラリ周りを、上手く利用できていない?
まずは、VS CodeでMCPサーバーをデバッグ出来るようにセットアップするのが良さそう?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert QR image to Text

1 participant