@battlegrid/mcp-server 31.2.11 → 31.2.13

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/README.md CHANGED
@@ -1041,7 +1041,7 @@ Nine skills ship from this repo, all inside the npm tarball (`SKILL.md`, `skills
1041
1041
  **`battlegrid`** (repo root) is the connection skill and is authored here: how to connect, the
1042
1042
  `{ account, request }` envelope, the two scopes, and where to go for everything else.
1043
1043
 
1044
- The eight `skills/battlegrid-*` are **exported from BattleGrid's server repository** — they are the
1044
+ The nine `skills/battlegrid-*` are **exported from BattleGrid's server repository** — they are the
1045
1045
  same instructions BattleGrid's own in-app Commander runs on, which is why they name the same tools
1046
1046
  you reach over MCP:
1047
1047
 
@@ -1055,6 +1055,7 @@ you reach over MCP:
1055
1055
  | `battlegrid-strategy-doctor` | Diagnose an agent that is not doing what was expected — why it has not traded, why it stopped, whether it is healthy — from typed fields, then rank the fixes with the exact lever each needs |
1056
1056
  | `battlegrid-strategy-examples` | Full-surface composition patterns: custom report sections and header grammar, benchmark sections, condition trees with verdicts and enforcement gates, tiered signal weights and the aggregate gate math, routing gates, ATR trade levels, position management, plus validated desk-grade playbooks and TradingView process ports |
1057
1057
  | `battlegrid-trade-analysis` | Read your own trading position: where the money is, whether each agent is doing its job, what is open and how close it sits to its protections, and whether the automation is actually running |
1058
+ | `battlegrid-trade-proposal` | Find and stage a trade for one of your agents: check what is already held, scan every active coin against the agent's own gates, propose on one through the agent's own conversational turn, present the outcome with its conviction, and approve or decline only on your word |
1058
1059
 
1059
1060
  > **`skills/battlegrid-*` is generated — do not edit it here.** It is written by
1060
1061
  > `server/scripts/export-mcp-skills.mjs` in `playbattlegrid/battlegrid-app` and arrives by pull
package/SKILL.md CHANGED
@@ -7,10 +7,10 @@ description: MCP skill for BattleGrid — play crypto prediction games (Market G
7
7
 
8
8
  BattleGrid is a real-time cryptocurrency prediction gaming and trading platform. This MCP server gives AI agents access to play games, author trading strategies, and run strategy-bound intelligence agents.
9
9
 
10
- ## The other eight skills
10
+ ## The other nine skills
11
11
 
12
12
  This skill covers **connection**: how to reach BattleGrid, the request envelope, and what each scope
13
- grants. Everything about *using* the platform lives in the eight skills installed beside it, exported
13
+ grants. Everything about *using* the platform lives in the nine skills installed beside it, exported
14
14
  from BattleGrid's own server so they name exactly the tools you reach here:
15
15
 
16
16
  | For | Activate |
@@ -22,9 +22,10 @@ from BattleGrid's own server so they name exactly the tools you reach here:
22
22
  | Putting an agent on standing duty (Radar, Arena presets) | `battlegrid-radar-deployment` |
23
23
  | Reading the market — regime, funding, leaders, a coin deep-dive | `battlegrid-market-analysis` |
24
24
  | Reading your own position, agents, and open trades | `battlegrid-trade-analysis` |
25
+ | Finding and staging a trade for one of your agents — scan its coins, propose on one, approve or decline on your word | `battlegrid-trade-proposal` |
25
26
  | Working out why an agent has not traded or has stopped | `battlegrid-strategy-doctor` |
26
27
 
27
- Those eight carry the working arcs and the exact contracts. What follows here is the minimum needed
28
+ Those nine carry the working arcs and the exact contracts. What follows here is the minimum needed
28
29
  to connect and to know which one to open.
29
30
 
30
31
  ## Discover the live surface first
package/dist/index.d.ts CHANGED
@@ -49,7 +49,7 @@ import { type Implementation, type Prompt, type Resource } from '@modelcontextpr
49
49
  * being asked. Move it for a change to THIS package — a proxy fix, a dependency bump, a docs
50
50
  * correction. Never move it to track the server.
51
51
  */
52
- export declare const PACKAGE_VERSION = "31.2.11";
52
+ export declare const PACKAGE_VERSION = "31.2.13";
53
53
  export declare const DEFAULT_URL = "https://mcp.battlegrid.trade/mcp";
54
54
  export interface EnvConfig {
55
55
  apiKeys: string[];
package/dist/index.js CHANGED
@@ -52,7 +52,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema, ListPromptsRequestSchema
52
52
  * being asked. Move it for a change to THIS package — a proxy fix, a dependency bump, a docs
53
53
  * correction. Never move it to track the server.
54
54
  */
55
- export const PACKAGE_VERSION = '31.2.11';
55
+ export const PACKAGE_VERSION = '31.2.13';
56
56
  export const DEFAULT_URL = 'https://mcp.battlegrid.trade/mcp';
57
57
  const MAX_RETRIES = 3;
58
58
  const RETRY_DELAYS_MS = [2000, 4000, 8000];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@battlegrid/mcp-server",
3
- "version": "31.2.11",
3
+ "version": "31.2.13",
4
4
  "description": "BattleGrid MCP server — play crypto prediction games from AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,6 +12,7 @@
12
12
  "battlegrid-strategy-examples/references/playbooks.md": "35c543c090d00ba19e4bcf0a80502afac7a4954643fc535de0b24381c91ecbf4",
13
13
  "battlegrid-strategy-examples/references/recipes.md": "53887daece17995543e7d3fe1bf2577fc41a6254c291acacde48d7de63853641",
14
14
  "battlegrid-strategy-examples/references/tradingview-ports.md": "1ff63367de1f9a9fbbcd7ecd5367137800373df47aaeb1d61fb1298d3a1924f4",
15
- "battlegrid-trade-analysis/SKILL.md": "32573a67e55d735e6ee4e36b3b48c815694102704bc453c4d1c13db39551b3da"
15
+ "battlegrid-trade-analysis/SKILL.md": "32573a67e55d735e6ee4e36b3b48c815694102704bc453c4d1c13db39551b3da",
16
+ "battlegrid-trade-proposal/SKILL.md": "0a4586f660f605281c7775523c9e41422c6e52646ce52bf0688254af4619e46c"
16
17
  }
17
18
  }
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: battlegrid-trade-proposal
3
+ description: Find and stage a trade for one of the player's agents, for the player to approve. Activate whenever the player asks which coins fit an agent right now, wants a trade found or proposed for an agent, asks the agent to evaluate a coin, or wants to approve or decline a proposal it made. The scan is the agent's own gates over every active coin; the proposal is the agent's own conversational turn; approval is always the player's word.
4
+ ---
5
+
6
+ # Trade Proposal
7
+
8
+ You are finding and staging a trade for an agent the player configured — never placing one. Every
9
+ step below reads what the server decided and puts it to the player in their terms; nothing here
10
+ re-sorts a list, re-derives a verdict, or approves on the player's behalf.
11
+
12
+ ## 0. What is already held — before anything else
13
+
14
+ - `list_pending_approvals` and `list_user_active_positions` first, every time.
15
+ - A proposal holds the player's live-position slot for that coin across **all** their agents until
16
+ it is accepted, cancelled or expires. **Never propose on a coin the player already holds a pending
17
+ or live position on** — say why, and name the decision or position that holds it.
18
+
19
+ ## 1. Which coins fit the agent right now
20
+
21
+ - `scan_agent_coins` for the agent. The rows arrive server-ranked: qualifying coins first by score,
22
+ then the rest with their first failing gate, then coins that could not be scored with the reason.
23
+ - Read the rows **as written**: the rank, the verdict, the first failing gate, the unscorable
24
+ label. Never re-sort them and never re-derive a verdict from its numbers — the server's ranking
25
+ is the answer.
26
+ - A refused scan (`RATE_LIMITED`) is a refusal: say the scan was refused and when it can be retried
27
+ (`retryAfterSeconds`). Never say "nothing fits".
28
+
29
+ ## 2. Propose
30
+
31
+ - `propose_entry_decision` **only** on the coins the player named, or on the top qualifying row
32
+ when they asked for the best fit. One coin per call.
33
+ - `userMessage` is the player's own words for the turn. Mint a **fresh UUID** `idempotencyKey` per
34
+ proposal; a retry with the same key replays the recorded result and never runs a second turn.
35
+ - The call is synchronous and may take the turn's full LLM latency. Do not retry while it is in
36
+ flight; a same-key call during that time is refused with `CONFLICT`.
37
+
38
+ ## 3. Report the outcome in the player's terms
39
+
40
+ - `type: "recommendation"` — the PROPOSED decision, awaiting approval. State the direction, the
41
+ entry, stop and take-profit levels, the position size, the **`convictionPercent`**, and the
42
+ expiry (`expiresAt`). No conviction floor was applied on this surface: the conviction is the
43
+ agent's own reading, and the player judges it.
44
+ - `type: "no_trade"` — the reason (`reasonCode`) and the next coins worth asking about.
45
+ - `type: "error"` — the engine's block or a post-billing failure, with its remedy:
46
+ `OPEN_POSITION_CONFLICT` means a position already holds the slot (see step 0);
47
+ `LLM_CREDITS_EXHAUSTED` means top up when `topupAvailable` is true; a `SURFACE` / `LLM_FAILURE`
48
+ means the model was billed and produced nothing usable — retry **with a new key**, since the
49
+ same key replays this failure.
50
+ - A refused proposal (`RATE_LIMITED`) is a refusal with its retry-after. Never "nothing to do".
51
+
52
+ ## 4. Approve or decline — only on the player's word
53
+
54
+ - Present the decision and **ask**. `accept_entry_decision` only after the player explicitly
55
+ approves; `cancel_entry_decision` only after they explicitly decline.
56
+ - Never accept because the conviction reads high, because the scan ranked the coin first, or
57
+ because the player asked you to "find a trade" — finding is not approving. `get_entry_decision`
58
+ re-reads the row if the conversation moved on before they answered.