cnhkmcp 1.3.0__py3-none-any.whl → 1.3.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.
cnhkmcp/__init__.py CHANGED
@@ -50,7 +50,7 @@ from .untracked.forum_functions import (
50
50
  read_full_forum_post
51
51
  )
52
52
 
53
- __version__ = "1.3.0"
53
+ __version__ = "1.3.1"
54
54
  __author__ = "CNHK"
55
55
  __email__ = "cnhk@example.com"
56
56
 
@@ -2502,6 +2502,49 @@ async def get_daily_and_quarterly_payment(email: str = "", password: str = "") -
2502
2502
  except Exception as e:
2503
2503
  return {"error": f"Error retrieving payment information: {str(e)}"}
2504
2504
 
2505
+
2506
+
2507
+ # New MCP tool: get_error_message_fromAlphaLocation
2508
+ from typing import Sequence
2509
+ @mcp.tool()
2510
+ async def get_error_message_fromAlphaLocation(locations: Sequence[str]) -> dict:
2511
+ """
2512
+ Fetch and parse error/status from multiple simulation locations (URLs).
2513
+ Args:
2514
+ locations: List of simulation result URLs (e.g., /simulations/{id})
2515
+ Returns:
2516
+ List of dicts with location, error message, and raw response
2517
+ """
2518
+ results = []
2519
+ for loc in locations:
2520
+ try:
2521
+ resp = brain_client.session.get(loc)
2522
+ if resp.status_code != 200:
2523
+ results.append({
2524
+ "location": loc,
2525
+ "error": f"HTTP {resp.status_code}",
2526
+ "raw": resp.text
2527
+ })
2528
+ continue
2529
+ data = resp.json() if resp.text else {}
2530
+ # Try to extract error message or status
2531
+ error_msg = data.get("error") or data.get("message")
2532
+ # If alpha ID is missing, include that info
2533
+ if not data.get("alpha"):
2534
+ error_msg = error_msg or "Simulation did not get through, if you are running a multisimulation, check the other children location in your request"
2535
+ results.append({
2536
+ "location": loc,
2537
+ "error": error_msg,
2538
+ "raw": data
2539
+ })
2540
+ except Exception as e:
2541
+ results.append({
2542
+ "location": loc,
2543
+ "error": str(e),
2544
+ "raw": None
2545
+ })
2546
+ return {"results": results}
2547
+
2505
2548
  if __name__ == "__main__":
2506
2549
  print("🧠 WorldQuant BRAIN MCP Server Starting...", file=sys.stderr)
2507
2550
  mcp.run()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cnhkmcp
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: A comprehensive Model Context Protocol (MCP) server for quantitative trading platform integration
5
5
  Home-page: https://github.com/cnhk/cnhkmcp
6
6
  Author: CNHK
@@ -1,4 +1,4 @@
1
- cnhkmcp/__init__.py,sha256=edsfYLRLB5aJIywqE8QzvfhumiHYFvn0fWUstOxP0ws,2758
1
+ cnhkmcp/__init__.py,sha256=2M0F7IcH-45MEmGw1XQoHxuJn8DQ_geIVWy9TZcevbg,2758
2
2
  cnhkmcp/untracked/BRAIN_6_Tips_Datafield_Exploration_Guide.md,sha256=YyMX1MIsDTJTduxulY-fYipNHvRihshQy9Q2j6Zxg2Q,9123
3
3
  cnhkmcp/untracked/BRAIN_Alpha_Test_Requirements_and_Tips.md,sha256=W4dtQrqoTN72UyvIsvkGRF0HFOJLHSDeeSlbR3gqQg0,17133
4
4
  cnhkmcp/untracked/Dataset_Exploration_Expert_Manual.md,sha256=-C4fWdaBe9UzA5BDZz0Do2z8RaPWLslb6D0nTz6fqk4,24403
@@ -6,12 +6,12 @@ cnhkmcp/untracked/arXiv_API_Tool_Manual.md,sha256=I3hvI5mpmIjBuWptufoVSWFnuhyUc6
6
6
  cnhkmcp/untracked/arxiv_api.py,sha256=-E-Ub9K-DXAYaCjrbobyfQ9H97gaZBc7pL6xPEyVHec,9020
7
7
  cnhkmcp/untracked/daily_report_workflow.md,sha256=SbPZqmIgt8tlRS2NevYQ0t1rvC8uiOqeXorh6nxiXZc,9104
8
8
  cnhkmcp/untracked/forum_functions.py,sha256=QW-CplAsqDkw-Wcwq-1tuZBq48dEO-vXZ8xw7X65EuE,42303
9
- cnhkmcp/untracked/platform_functions.py,sha256=_q9wyQME1gK0ZH5P3YW9t_neJv3CK2XsLnG6UBSDU4c,105466
9
+ cnhkmcp/untracked/platform_functions.py,sha256=RO56IFBJ1Vf3B8Wq5GONhDX3OQ_Exp4gHvDGODHALtU,107024
10
10
  cnhkmcp/untracked/sample_mcp_config.json,sha256=QSFvZ086bxUQsvmLjcE6pL9ObzKn4FGnt9npWPo7Eps,1044
11
11
  cnhkmcp/untracked/user_config.json,sha256=_INn1X1qIsITrmEno-BRlQOAGm9wnNCw-6B333DEvnk,695
12
- cnhkmcp-1.3.0.dist-info/licenses/LICENSE,sha256=QLxO2eNMnJQEdI_R1UV2AOD-IvuA8zVrkHWA4D9gtoc,1081
13
- cnhkmcp-1.3.0.dist-info/METADATA,sha256=nxM7rtzPrGA4uFzvfOIQ8JxpZrNeTBiQUUnrcNchKX4,5171
14
- cnhkmcp-1.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- cnhkmcp-1.3.0.dist-info/entry_points.txt,sha256=lTQieVyIvjhSMK4fT-XwnccY-JBC1H4vVQ3V9dDM-Pc,70
16
- cnhkmcp-1.3.0.dist-info/top_level.txt,sha256=x--ibUcSgOS9Z_RWK2Qc-vfs7DaXQN-WMaaxEETJ1Bw,8
17
- cnhkmcp-1.3.0.dist-info/RECORD,,
12
+ cnhkmcp-1.3.1.dist-info/licenses/LICENSE,sha256=QLxO2eNMnJQEdI_R1UV2AOD-IvuA8zVrkHWA4D9gtoc,1081
13
+ cnhkmcp-1.3.1.dist-info/METADATA,sha256=UAid6my74Lj66XkJpGDAoMjOUdMpfK9jiWMhVet6j74,5171
14
+ cnhkmcp-1.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ cnhkmcp-1.3.1.dist-info/entry_points.txt,sha256=lTQieVyIvjhSMK4fT-XwnccY-JBC1H4vVQ3V9dDM-Pc,70
16
+ cnhkmcp-1.3.1.dist-info/top_level.txt,sha256=x--ibUcSgOS9Z_RWK2Qc-vfs7DaXQN-WMaaxEETJ1Bw,8
17
+ cnhkmcp-1.3.1.dist-info/RECORD,,