@battlegrid/mcp-server 32.0.28 → 32.0.29
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/skills/EXPORT.json +7 -7
- package/skills/battlegrid-agent-management/SKILL.md +9 -3
- package/skills/battlegrid-arena-play/SKILL.md +8 -2
- package/skills/battlegrid-radar-deployment/SKILL.md +10 -2
- package/skills/battlegrid-strategy-doctor/SKILL.md +8 -5
- package/skills/battlegrid-trade-analysis/SKILL.md +22 -6
- package/skills/battlegrid-trade-proposal/SKILL.md +5 -0
package/dist/index.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ import { Client, StreamableHTTPClientTransport } from '@modelcontextprotocol/cli
|
|
|
47
47
|
* being asked. Move it for a change to THIS package — a proxy fix, a dependency bump, a docs
|
|
48
48
|
* correction. Never move it to track the server.
|
|
49
49
|
*/
|
|
50
|
-
export declare const PACKAGE_VERSION = "32.0.
|
|
50
|
+
export declare const PACKAGE_VERSION = "32.0.29";
|
|
51
51
|
export declare const DEFAULT_URL = "https://mcp.battlegrid.trade/mcp";
|
|
52
52
|
export interface EnvConfig {
|
|
53
53
|
apiKeys: string[];
|
package/dist/index.js
CHANGED
|
@@ -49,7 +49,7 @@ import { Client, SdkHttpError, StreamableHTTPClientTransport } from '@modelconte
|
|
|
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 const PACKAGE_VERSION = '32.0.
|
|
52
|
+
export const PACKAGE_VERSION = '32.0.29';
|
|
53
53
|
export const DEFAULT_URL = 'https://mcp.battlegrid.trade/mcp';
|
|
54
54
|
const MAX_RETRIES = 3;
|
|
55
55
|
const RETRY_DELAYS_MS = [2000, 4000, 8000];
|
package/package.json
CHANGED
package/skills/EXPORT.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generator": "battlegrid-app/server/scripts/export-mcp-skills.mjs",
|
|
3
|
-
"contractVersion": "
|
|
3
|
+
"contractVersion": "132.0.0",
|
|
4
4
|
"files": {
|
|
5
|
-
"battlegrid-agent-management/SKILL.md": "
|
|
5
|
+
"battlegrid-agent-management/SKILL.md": "91d1be4de1e33d54e1852c970af66ad176068fd16c30b4326e49053b7a35eb32",
|
|
6
6
|
"battlegrid-agent-management/references/agent-stage-examples.md": "dffcc353d61dfc7b5bb6a2b3077fc6bf8c760a34c287cafb3b59b99306f24195",
|
|
7
|
-
"battlegrid-arena-play/SKILL.md": "
|
|
7
|
+
"battlegrid-arena-play/SKILL.md": "fdaabcd2e5ce3946ee96e553ce2e1931a822b84f91b0c94ce86a8bde0cc1d50f",
|
|
8
8
|
"battlegrid-arena-play/references/entry-stage-examples.md": "0223f3743171ff213e943789d27590b2f65648398e85e10cd24938d5eb6af665",
|
|
9
9
|
"battlegrid-market-analysis/SKILL.md": "fcbe98e30e1edce39bb170c224cdf20181934f62b5f3a26b293787c70eeb6229",
|
|
10
10
|
"battlegrid-officers/SKILL.md": "3fd59ec301d1492c956fbdb4368fef61f29abd137f02f49a6172351c7a563309",
|
|
11
11
|
"battlegrid-officers/references/officer-stage-examples.md": "ef46ba26f4b36c9964b5bde95fdf98e5952c3786b77be5f136056cac792f0aec",
|
|
12
|
-
"battlegrid-radar-deployment/SKILL.md": "
|
|
12
|
+
"battlegrid-radar-deployment/SKILL.md": "42900772033d799ce8eeeea9a433d76dd54fb5b153c83951753f73859dcfc021",
|
|
13
13
|
"battlegrid-radar-deployment/references/arena-stage-examples.md": "d27cfed1f4663f267c4a7ecebe4a6e65a450fc74bd14ce8987fb61af5bbf2ca5",
|
|
14
14
|
"battlegrid-radar-deployment/references/radar-stage-examples.md": "13fc3f55d91d3da9754e1ed7fb27493b7b7ba4d40a6a7e8d1ee0365f90ea10de",
|
|
15
15
|
"battlegrid-strategy-authoring/SKILL.md": "39cfa46b1f640e6800edb7e85a8f2c4b6b8786cddf71bb8244d172a44fc11d75",
|
|
16
16
|
"battlegrid-strategy-authoring/references/strategy-stage-examples.md": "f10ecdc91f3660a708eee7a7bacefce2acbb46c9cf7e0ac1454bd54f839f39fd",
|
|
17
|
-
"battlegrid-strategy-doctor/SKILL.md": "
|
|
17
|
+
"battlegrid-strategy-doctor/SKILL.md": "24c2208cf6832f1fc34e1b1c52acd8dae10f56b9860aaf27b450a62a9fb74634",
|
|
18
18
|
"battlegrid-strategy-examples/SKILL.md": "9d18bf0e4bf85a28508e2881a4cdf77b823ec831e7cec5d82f82dc251402f41c",
|
|
19
19
|
"battlegrid-strategy-examples/references/playbooks.md": "a9464789df2e762faf9dbd7845101564bc1847cd193f709f8ac4b6bff08f09dd",
|
|
20
20
|
"battlegrid-strategy-examples/references/recipes.md": "806aae0b4842408f6e6ed3e108293073f4f31d1c27fa419ad57df9e1134f23e7",
|
|
21
21
|
"battlegrid-strategy-examples/references/tradingview-ports.md": "c62ce72b741abe5a92e1dec6615f26b19a54959aa1d29542518cd9a189390b98",
|
|
22
|
-
"battlegrid-trade-analysis/SKILL.md": "
|
|
23
|
-
"battlegrid-trade-proposal/SKILL.md": "
|
|
22
|
+
"battlegrid-trade-analysis/SKILL.md": "140d847f24e98845736d4f0c2e72b318a4d235413f72f072d2fe6d0daa5f64db",
|
|
23
|
+
"battlegrid-trade-proposal/SKILL.md": "bf8f3794478cdecc989020bd775c3c91744f72b440b1a90f88f6700c9a61ca24"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -95,7 +95,11 @@ places, against the order floor, and whether that is `feasible`. Then one confir
|
|
|
95
95
|
strategy, the model, and the budget posture** — the capital ceiling and stops the trading
|
|
96
96
|
configuration will carry, or that it will take the platform seed, with the smallest order against
|
|
97
97
|
the floor — and on the player's explicit pick call `commit_agent_draft` with the `agentId`, that
|
|
98
|
-
read's `draftVersion
|
|
98
|
+
read's `draftVersion`, `expectedRevision: null` and the `teamId` of the team the agent is created on.
|
|
99
|
+
**The team is the commit's, never the draft's**: read `get_account_state`, which lists the player's
|
|
100
|
+
`teams`, name the team in the confirmation — the agent trades on that team's wallet and spends its
|
|
101
|
+
balance — and default to the Main team unless the player names another. A create commit without a
|
|
102
|
+
team is refused. A reading with `feasible: false` is a create the
|
|
99
103
|
commit will refuse: say so, and stage a larger ceiling or a looser configuration first. Where the player has the create screen open, their own Create is the
|
|
100
104
|
other way to commit it.
|
|
101
105
|
|
|
@@ -136,7 +140,9 @@ mid-edit in their form**, and every change you make joins it. Then:
|
|
|
136
140
|
- **Commit** through step 4: read the draft with `get_agent_draft`, state the radius from its diff
|
|
137
141
|
and impact, confirm, and on the player's explicit pick call `commit_agent_draft` with the
|
|
138
142
|
`agentId` and exactly the `draftVersion` and, as `expectedRevision`, the `committedRevision` that
|
|
139
|
-
read returned
|
|
143
|
+
read returned, and `teamId: null`: a commit never moves an agent to another team, and an edit
|
|
144
|
+
commit naming a team is refused. Moving an agent between teams is the player's step in the web
|
|
145
|
+
app, allowed only once the agent is drained. The commit publishes every axis the draft holds — the player's own unsaved edits
|
|
140
146
|
included — so the confirmation reads out the whole diff, not only your proposal. Where their form
|
|
141
147
|
is open, their own Save is the other way to commit it.
|
|
142
148
|
- **Discard** only on the player's word. `get_agent_draft` is the read of what a discard destroys:
|
|
@@ -159,7 +165,7 @@ again only on their word.
|
|
|
159
165
|
|
|
160
166
|
Every one of a draft commit (an edit or a rebind), halt, resume, activate and archive runs this
|
|
161
167
|
shape. The reads (`get_agent_budget`, `list_user_active_positions`, `get_agent_automation_status`,
|
|
162
|
-
`get_agent_performance`, `
|
|
168
|
+
`get_agent_performance`, `list_agent_market_grid_decisions`) need no confirm and
|
|
163
169
|
cost nothing but a call — do them first, always.
|
|
164
170
|
|
|
165
171
|
State the blast radius **from server fields, as numbers**, before the confirm form:
|
|
@@ -29,7 +29,12 @@ fee. The grid you commit is the one that gets scored, and there is no undo.
|
|
|
29
29
|
### 1. Account state first
|
|
30
30
|
|
|
31
31
|
`get_account_state`. It carries the balance, the rank, and **`mcpWagerEnabled`** — a served
|
|
32
|
-
projection of the player's Server-Signed Wagers signer consent
|
|
32
|
+
projection of the player's Server-Signed Wagers signer consent on **Main**, the team that pays the
|
|
33
|
+
player's own entry. `balance` is Main's too; the total across every team is `allTeamsBalance`.
|
|
34
|
+
|
|
35
|
+
An **agent's** entry is paid by the agent's own team, never by Main on its behalf. For an agent
|
|
36
|
+
entry, read that team's row in `teams` — `teams[].readiness.canPayArena` is the served verdict —
|
|
37
|
+
instead of `mcpWagerEnabled`.
|
|
33
38
|
|
|
34
39
|
- **False** ⇒ a **definite refusal**, before any submission. Say so up front, name the enablement
|
|
35
40
|
path (Profile → Wallet tab → enable Agent Wagers), and continue **read-only**: sessions, market
|
|
@@ -151,7 +156,8 @@ player's, and the attribution is part of what was scored.
|
|
|
151
156
|
`reasoning` is null when no record describes the current picks — say that rather than
|
|
152
157
|
reconstructing one, and a pick missing from `reasoning.picks` is one the player chose.
|
|
153
158
|
`list_my_market_grid_entries` is the history across sessions. An agent's decisions are a different
|
|
154
|
-
record, `
|
|
159
|
+
record, `list_agent_market_grid_decisions`: each arena decision the agent's model reached, with its
|
|
160
|
+
session — a stand-down before any model call is only in `get_agent_activity_feed`.
|
|
155
161
|
|
|
156
162
|
## On the arena's session page
|
|
157
163
|
|
|
@@ -257,10 +257,18 @@ the reason — and **names what the change does to the stored policy**, read fro
|
|
|
257
257
|
|
|
258
258
|
Then:
|
|
259
259
|
|
|
260
|
-
- **Radar** → `commit_radar_deployment_draft({ coinId, draftVersion, expectedRevision })`,
|
|
260
|
+
- **Radar** → `commit_radar_deployment_draft({ coinId, draftVersion, expectedRevision, teamId })`,
|
|
261
261
|
naming exactly the `draftVersion` and `committedRevision` your draft read returned — the version
|
|
262
262
|
your preview resolved. Ask with `ask_user` first and commit only after an explicit confirming pick.
|
|
263
263
|
The axes it published leave the draft.
|
|
264
|
+
`teamId` is the team the deployment trades on, and a team is never drafted. For a deployed coin,
|
|
265
|
+
pass the `teamId` its `list_radar_deployments` (or `get_radar_deployment`) row carries: a
|
|
266
|
+
deployment keeps its team for life, and another team is a CONFLICT naming the stored one. For a
|
|
267
|
+
first deployment, choose one of the player's teams from `get_account_state.teams` (ask when there
|
|
268
|
+
is more than one) and name it in the confirmation. Every slot agent must trade on that team. A
|
|
269
|
+
platform agent trades on Main, so it fits only a Main deployment. A slot agent of another team is a
|
|
270
|
+
VALIDATION_ERROR naming the agent and its team. The draft read reports it beforehand for a deployed
|
|
271
|
+
coin, and for a first deployment it reports slot agents that trade on different teams.
|
|
264
272
|
- **Arena** → `commit_deployment_policy_draft({ presetId, draftVersion, expectedRevision })`,
|
|
265
273
|
the same way.
|
|
266
274
|
|
|
@@ -420,7 +428,7 @@ whose outcome you did not see.
|
|
|
420
428
|
## `test_generate_deployment_grid`
|
|
421
429
|
|
|
422
430
|
This one runs a **billed LLM generation** against the player's intelligence credits and writes
|
|
423
|
-
|
|
431
|
+
decision and activity records. It is a composition aid for tuning an Arena deployment — say that it
|
|
424
432
|
is billed **before** invoking it, and only invoke it when the player is actually iterating on slots
|
|
425
433
|
and wants to see what the resolved agent would produce. It is never a diagnostic read.
|
|
426
434
|
|
|
@@ -57,9 +57,11 @@ Three reads, and they are not interchangeable:
|
|
|
57
57
|
— they describe different stages and merging them invents a cause.
|
|
58
58
|
- Render every code through its display meta. A raw `NO_ENTRY_CONDITION` or `OPEN_POSITION_CONFLICT` on
|
|
59
59
|
screen is a system identifier leaking into an explanation.
|
|
60
|
-
- **`get_agent_decision_context` reads the decision behind an OPEN position.** It is keyed by
|
|
61
|
-
and answers only for the agent position open
|
|
62
|
-
it never explains a trade that did not happen.
|
|
60
|
+
- **`get_agent_decision_context` reads the decision behind an OPEN position.** It is keyed by team
|
|
61
|
+
and coin and answers only for the agent position open there; for a coin with nothing open on that
|
|
62
|
+
team it is `null`, so it never explains a trade that did not happen. Without a `teamId` it reads
|
|
63
|
+
Main, so pass the position's team: the `teamId` of its `list_user_active_positions` row, or the
|
|
64
|
+
agent's `tradingTeamId` on `get_agents_hub`, or a `list_radar_deployments` row's `teamId`. For "why did nothing happen on SOL", read
|
|
63
65
|
`list_gate_blocks` for the pre-model refusals on that coin, and for a Radar coin
|
|
64
66
|
`get_radar_activity_summary` for its causes, then `get_radar_close_decisions` for the bars it
|
|
65
67
|
decided.
|
|
@@ -89,7 +91,8 @@ Three reads, and they are not interchangeable:
|
|
|
89
91
|
- `list_signal_logs` narrowed by `agentId` when the question is whether the signals fired, as
|
|
90
92
|
distinct from whether the trades made money: its `summary` counts the evaluations and entries, and a
|
|
91
93
|
failed row's `rejection` names why its order was refused. `list_agent_trades` narrowed by `agentId`,
|
|
92
|
-
`
|
|
94
|
+
`list_agent_market_grid_decisions` and `get_agent_activity_feed` for what did happen, and
|
|
95
|
+
`get_signal_log`'s `thesisReasoning` for why a trade was taken.
|
|
93
96
|
- **`get_agent_conviction_calibration` honours `readiness`.** An `INSUFFICIENT_DATA` calibration
|
|
94
97
|
carries no win rate — report that there is not yet enough history, never a rate derived from a
|
|
95
98
|
handful of trades.
|
|
@@ -162,7 +165,7 @@ it is undetermined.
|
|
|
162
165
|
## Negatives
|
|
163
166
|
|
|
164
167
|
- **Never call `test_generate_deployment_grid`.** It runs a billed LLM generation against the
|
|
165
|
-
player's intelligence credits and writes
|
|
168
|
+
player's intelligence credits and writes decision and activity records. It is the deployment
|
|
166
169
|
flow's composition aid for tuning a draft — it is not a diagnostic read, and running it as one
|
|
167
170
|
charges the player to answer a question the journals already answer.
|
|
168
171
|
- **Never name a strategy write tool, even to forbid it.** Reading a rule is not authority to change
|
|
@@ -34,14 +34,22 @@ Not "what were its returns" — whether it did *the thing it was told to do*.
|
|
|
34
34
|
by rules it is not running.
|
|
35
35
|
- `get_agent_performance` and `list_agent_trades` narrowed by `agentId` — judge against that mandate. Its
|
|
36
36
|
`summary` and `resultSummary` cover the agent's whole scope on the player's account, not the page.
|
|
37
|
+
- `get_agent_profile` when the question names a period or a signal source — "how did Falcon do this
|
|
38
|
+
week", "how are its radar trades doing". Pass `timeframe` (`1D`, `7D`, `30D` or `LIFETIME`) and
|
|
39
|
+
`signalSource`, and quote its KPIs as served — win rate, net P&L, best and worst trade, entry
|
|
40
|
+
rate, average conviction and risk/reward, durations — recomputing none. `get_agent_performance`
|
|
41
|
+
measures from the budget baseline, not over a period. A `{ profile: null }` result is
|
|
42
|
+
**UNDETERMINED** for that agent: the read serves the player's own private agents only. The fixed
|
|
43
|
+
Decision Quality window and its regime, hour, weekday and coin slices are
|
|
44
|
+
`get_agent_review_analytics`'s, not this read's.
|
|
37
45
|
- `get_trade_outcome_by_decision` (a trade row's `decisionId`) / `get_trade_chart` when a specific trade
|
|
38
46
|
needs explaining: the outcome carries the fills, fees, slippage, leverage, duration and exit label. A
|
|
39
47
|
measurable trade's `tradeExcursion` reads in R: `mfeR` and `maeR` (the best and worst it reached),
|
|
40
48
|
`exitR`, and `giveBackR` (what it surrendered between its peak and the close). `exitEfficiency` is
|
|
41
49
|
a union — branch on its `state` before reading `efficiencyPercent`. All of them are gross of
|
|
42
50
|
costs; `netPnl` is the after-fee figure.
|
|
43
|
-
- The record around the trades: `
|
|
44
|
-
trade's
|
|
51
|
+
- The record around the trades: `list_agent_market_grid_decisions` (an agent's arena decisions),
|
|
52
|
+
`get_signal_log` (a trade's pipeline, its thesis as `thesisReasoning`), `list_my_market_grid_entries` / `get_my_market_grid_entry` (an
|
|
45
53
|
arena entry's reasoning — `agentId` for one agent's entries, none for every entry),
|
|
46
54
|
`get_agent_activity_feed` (what happened), and `get_agent_explorer` for where the agent stands
|
|
47
55
|
among public agents.
|
|
@@ -93,13 +101,21 @@ reading a clean report about a messy account learns nothing.
|
|
|
93
101
|
|
|
94
102
|
- `list_user_active_positions` for everything at once: it carries the live mark and P&L
|
|
95
103
|
(`markPrice`, `unrealizedPnlUsd`, `roePct`) — check `pricingStatus` and `generatedAtMs` before
|
|
96
|
-
calling a mark current. Every position is served once, in `positions`, naming its `agentId
|
|
97
|
-
`marketGridSessionId
|
|
104
|
+
calling a mark current. Every position is served once, in `positions`, naming its `agentId`,
|
|
105
|
+
`marketGridSessionId` and `teamId` — the team whose wallet it trades on; `agents` carries each
|
|
106
|
+
agent's group figures.
|
|
98
107
|
- For each open position, report its protections **and how far the live mark sits from each
|
|
99
108
|
trigger** — a stop is a number the player cannot act on; "3.1% from the stop" is one they can.
|
|
100
109
|
- `list_agent_open_orders` is the platform's record of each agent order, naming its `decisionId` and
|
|
101
|
-
the venue's `exchangeOrderId` and `cloid`. `get_open_orders` reads
|
|
102
|
-
|
|
110
|
+
the venue's `exchangeOrderId` and `cloid`. `get_open_orders` reads one team's wallet on the
|
|
111
|
+
exchange directly — Main unless you pass a `teamId`, taken from a `list_user_active_positions`,
|
|
112
|
+
`get_agents_hub` (`tradingTeamId`) or `list_radar_deployments` row; read each team you report on.
|
|
113
|
+
It is slower, and it fails when the exchange is unreachable; report that as UNDETERMINED, never as
|
|
114
|
+
no orders.
|
|
115
|
+
- `list_user_fills` is what the venue filled on one team's wallet, newest first — Main unless you
|
|
116
|
+
pass a `teamId` — every agent's and every manual order's alike, attributed to no agent or decision.
|
|
117
|
+
One trade's fills are `get_trade_outcome_by_decision`'s, on the trade's `decisionId` from
|
|
118
|
+
`list_agent_trades`; never assign an account fill to an agent by its coin and time.
|
|
103
119
|
- `get_deployment_policy` / `get_radar_deployment` when the protection state comes from standing
|
|
104
120
|
policy rather than the position itself. `list_gate_blocks` when something looks like it should
|
|
105
121
|
have fired and did not.
|
|
@@ -82,6 +82,11 @@ close executes.
|
|
|
82
82
|
the whole transcript in stored order — the queued card, the agent's reasoning, its thesis and
|
|
83
83
|
setups, the entry card naming the decision and the position it placed, a no-trade with its reason
|
|
84
84
|
and next coins, or a close answer.
|
|
85
|
+
- When the player asks about an earlier request and its `conversationId` is not in this
|
|
86
|
+
conversation, find it with `list_trade_conversations`: narrow by the agent's `agentId`, and by
|
|
87
|
+
`window` (or `since` / `until`) when the player names a period. Open the matching row with
|
|
88
|
+
`get_trade_conversation`, passing the row's `id` as `conversationId`. Never queue a new request to
|
|
89
|
+
learn what an earlier one decided.
|
|
85
90
|
- `get_entry_request` re-reads a request until it is answered — including while its close has fired
|
|
86
91
|
and the decision is being composed, and past its deadline until its overdue answer lands.
|
|
87
92
|
`cancel_entry_request` withdraws it only while it still awaits its close; once the close has fired
|