@pmxt/mcp 2.30.1 → 2.30.2
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 +2 -2
- package/dist/server.js +12 -4
- package/package.json +1 -1
package/dist/generated/tools.js
CHANGED
|
@@ -650,7 +650,7 @@ export const TOOLS = [
|
|
|
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": {
|
|
@@ -844,7 +844,7 @@ export const TOOLS = [
|
|
|
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": {
|
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) {
|