@pmxt/mcp 2.30.1 → 2.30.4
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.
- package/dist/generated/tools.js +11 -11
- package/dist/server.js +12 -4
- package/package.json +1 -1
package/dist/generated/tools.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// AUTO-GENERATED by mcp/scripts/generate-tools.js -- DO NOT EDIT
|
|
2
|
-
// Generated from core/src/server/openapi.yaml (2026-04-
|
|
2
|
+
// Generated from core/src/server/openapi.yaml (2026-04-13)
|
|
3
3
|
export const TOOLS = [
|
|
4
4
|
{
|
|
5
5
|
"name": "buildOrder",
|
|
@@ -394,7 +394,7 @@ export const TOOLS = [
|
|
|
394
394
|
"name": "params",
|
|
395
395
|
"kind": "object",
|
|
396
396
|
"optional": true,
|
|
397
|
-
"flatten":
|
|
397
|
+
"flatten": true
|
|
398
398
|
}
|
|
399
399
|
]
|
|
400
400
|
},
|
|
@@ -555,7 +555,7 @@ export const TOOLS = [
|
|
|
555
555
|
"name": "params",
|
|
556
556
|
"kind": "object",
|
|
557
557
|
"optional": true,
|
|
558
|
-
"flatten":
|
|
558
|
+
"flatten": true
|
|
559
559
|
}
|
|
560
560
|
]
|
|
561
561
|
},
|
|
@@ -644,13 +644,13 @@ export const TOOLS = [
|
|
|
644
644
|
"name": "params",
|
|
645
645
|
"kind": "object",
|
|
646
646
|
"optional": true,
|
|
647
|
-
"flatten":
|
|
647
|
+
"flatten": true
|
|
648
648
|
}
|
|
649
649
|
]
|
|
650
650
|
},
|
|
651
651
|
{
|
|
652
652
|
"name": "fetchEvents",
|
|
653
|
-
"description": "
|
|
653
|
+
"description": "Start here for discovery and search. Events are the top-level grouping in the data model: Event -> Market -> Outcome. An event is a broad topic (e.g., \"Who will win the 2028 presidential election?\"), a market is a specific tradeable question within that event (e.g., \"Will Kamala Harris win the 2028 presidential election?\"), and an outcome is the side you buy (e.g., \"Yes\" or \"No\"). When a user asks to \"find\", \"search for\", or \"look up\" a market, use this tool — they almost always mean the event-level topic. Each returned event includes its child markets. Supports optional keyword search, filtering, and pagination.",
|
|
654
654
|
"inputSchema": {
|
|
655
655
|
"type": "object",
|
|
656
656
|
"properties": {
|
|
@@ -733,7 +733,7 @@ export const TOOLS = [
|
|
|
733
733
|
"name": "params",
|
|
734
734
|
"kind": "object",
|
|
735
735
|
"optional": true,
|
|
736
|
-
"flatten":
|
|
736
|
+
"flatten": true
|
|
737
737
|
}
|
|
738
738
|
]
|
|
739
739
|
},
|
|
@@ -838,13 +838,13 @@ export const TOOLS = [
|
|
|
838
838
|
"name": "params",
|
|
839
839
|
"kind": "object",
|
|
840
840
|
"optional": true,
|
|
841
|
-
"flatten":
|
|
841
|
+
"flatten": true
|
|
842
842
|
}
|
|
843
843
|
]
|
|
844
844
|
},
|
|
845
845
|
{
|
|
846
846
|
"name": "fetchMarkets",
|
|
847
|
-
"description": "Fetch markets
|
|
847
|
+
"description": "Fetch individual tradeable contracts (markets). A market is a specific question like \"Will Kamala Harris win the 2028 presidential election?\" — for general discovery or search, prefer fetchEvents instead, which returns the higher-level topic (e.g., \"Who will win the 2028 presidential election?\") with all its markets grouped together. When users say \"search for a market\" they almost always mean an event. Use fetchMarkets when you need a specific contract by ID/slug, or when you already have an eventId and want its child markets. Always hits the exchange API — results reflect the live state at the time of the call.",
|
|
848
848
|
"inputSchema": {
|
|
849
849
|
"type": "object",
|
|
850
850
|
"properties": {
|
|
@@ -943,7 +943,7 @@ export const TOOLS = [
|
|
|
943
943
|
"name": "params",
|
|
944
944
|
"kind": "object",
|
|
945
945
|
"optional": true,
|
|
946
|
-
"flatten":
|
|
946
|
+
"flatten": true
|
|
947
947
|
}
|
|
948
948
|
]
|
|
949
949
|
},
|
|
@@ -990,7 +990,7 @@ export const TOOLS = [
|
|
|
990
990
|
"name": "params",
|
|
991
991
|
"kind": "object",
|
|
992
992
|
"optional": true,
|
|
993
|
-
"flatten":
|
|
993
|
+
"flatten": true
|
|
994
994
|
}
|
|
995
995
|
]
|
|
996
996
|
},
|
|
@@ -1084,7 +1084,7 @@ export const TOOLS = [
|
|
|
1084
1084
|
"name": "params",
|
|
1085
1085
|
"kind": "object",
|
|
1086
1086
|
"optional": true,
|
|
1087
|
-
"flatten":
|
|
1087
|
+
"flatten": true
|
|
1088
1088
|
}
|
|
1089
1089
|
]
|
|
1090
1090
|
},
|
package/dist/server.js
CHANGED
|
@@ -14,6 +14,12 @@ Same methods, same response shape, regardless of venue.
|
|
|
14
14
|
|
|
15
15
|
SETUP: Get an API key at pmxt.dev/dashboard. Set PMXT_API_KEY in your environment.
|
|
16
16
|
|
|
17
|
+
DATA MODEL (Event -> Market -> Outcome):
|
|
18
|
+
- Event: a broad topic, e.g. "Who will win the 2028 presidential election?"
|
|
19
|
+
- Market: a specific tradeable question within an event, e.g. "Will Kamala Harris win the 2028 presidential election?"
|
|
20
|
+
- Outcome: the side you buy or sell, e.g. "Yes" (she wins) or "No" (she does not win).
|
|
21
|
+
When users say "market" they almost always mean an event. Use fetchEvents for discovery and search.
|
|
22
|
+
|
|
17
23
|
IMPORTANT RULES:
|
|
18
24
|
- NEVER place orders (createOrder, submitOrder) without explicit user confirmation. \
|
|
19
25
|
These spend real money. Always show the user the order details (venue, market, side, price, amount) and wait for approval.
|
|
@@ -22,10 +28,12 @@ These spend real money. Always show the user the order details (venue, market, s
|
|
|
22
28
|
- Venue credentials (privateKey, apiKey) are sensitive. Never log or display them.
|
|
23
29
|
|
|
24
30
|
WORKFLOW:
|
|
25
|
-
1. Use
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
1. Use fetchEvents to discover and search for topics (use the "query" param). This is the right starting point \
|
|
32
|
+
even when the user says "market" -- they almost always mean an event. Each event includes its child markets.
|
|
33
|
+
2. Use fetchMarkets only when you need a specific contract by ID/slug, or to list markets within a known event.
|
|
34
|
+
3. Use fetchOrderBook to check liquidity and prices.
|
|
35
|
+
4. Use getExecutionPrice to quote a trade before placing it.
|
|
36
|
+
5. Use buildOrder to preview, then submitOrder to execute (with user approval).
|
|
29
37
|
|
|
30
38
|
The "exchange" param is required on every call. Options: polymarket, kalshi, limitless, probable, etc.`;
|
|
31
39
|
export function createServer(config) {
|