kl-mcp-client 1.1.0__py3-none-any.whl → 1.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -177,3 +177,26 @@ class MCPTools:
177
177
  "importCookies", {"sessionId": sessionId, "cookies": cookies}
178
178
  )
179
179
  return res.get("structuredContent", {})
180
+
181
+ async def parse_html_by_prompt(self, html: str, prompt: str) -> Dict[str, Any]:
182
+ """
183
+ Parse HTML content using AI with dynamic prompt-defined structure.
184
+
185
+ Args:
186
+ html: Raw HTML string (client-provided)
187
+ prompt: Instruction that defines what to extract and output structure
188
+ Example:
189
+ - "Hãy lấy nội dung bài viết, struct trả về { content }"
190
+ - "Hãy lấy số lượng like, share, comment, trả JSON { like, share, comment }"
191
+
192
+ Returns:
193
+ structuredContent (dynamic JSON defined by prompt)
194
+ """
195
+ res = await self.client.call_tool(
196
+ "parseHTMLByPrompt",
197
+ {
198
+ "html": html,
199
+ "prompt": prompt,
200
+ },
201
+ )
202
+ return res.get("structuredContent", {})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kl-mcp-client
3
- Version: 1.1.0
3
+ Version: 1.2.1
4
4
  Summary: MCP Client for Python
5
5
  Author-email: Kyle <hngan.it@gmail.com>
6
6
  License: MIT
@@ -4,8 +4,8 @@ kl_mcp_client/client.py,sha256=3NN18vvrxV32hkKFGuWqfeZLZ303jl5m8atpe14U69Q,4543
4
4
  kl_mcp_client/tools.py,sha256=kcxg4Cw1sAf8QmPCF6DW7pET55hZs64ztQxBDoe27go,9350
5
5
  kl_mcp_client/asyncio/__init__.py,sha256=pdJdBcEH5HaRuHSe2B7VUyRgH5ad3u1dDc4euZMDRMY,106
6
6
  kl_mcp_client/asyncio/client.py,sha256=giOz_h8x_RoO5wA1ebiWBy1eU7owU_YOxXAFV2Z_MCk,4439
7
- kl_mcp_client/asyncio/tools.py,sha256=98L9JM5QM1jST-ICFACNc5Uwekaj6Y60ZU51-fRfaaY,6785
8
- kl_mcp_client-1.1.0.dist-info/METADATA,sha256=vHJLyAbXs2VkSQsvzzONvM0UURGb4pOnkBo_aYWOALo,4443
9
- kl_mcp_client-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- kl_mcp_client-1.1.0.dist-info/top_level.txt,sha256=wd_HFFyGjiKavwACuj8Ny0svtVyNsrxCSVU48EkoQ7c,14
11
- kl_mcp_client-1.1.0.dist-info/RECORD,,
7
+ kl_mcp_client/asyncio/tools.py,sha256=tCeHUc4ao99Hu4ck0BmvDo95vmTtG1ChvwHamaIx_zE,7655
8
+ kl_mcp_client-1.2.1.dist-info/METADATA,sha256=esY6TK0IYq653_MAS4_U-bojUxeuf7BbP45-8kvm3Dk,4443
9
+ kl_mcp_client-1.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ kl_mcp_client-1.2.1.dist-info/top_level.txt,sha256=wd_HFFyGjiKavwACuj8Ny0svtVyNsrxCSVU48EkoQ7c,14
11
+ kl_mcp_client-1.2.1.dist-info/RECORD,,