@slack/radar-mcp 1.23.0 → 1.25.0
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 +14 -7
- package/dist/mcp/dashboard-identity.d.ts +10 -0
- package/dist/mcp/dashboard-identity.js +20 -0
- package/dist/mcp/debug-package-reset.d.ts +5 -0
- package/dist/mcp/debug-package-reset.js +28 -0
- package/dist/mcp/flags-tools.d.ts +2 -0
- package/dist/mcp/flags-tools.js +10 -2
- package/dist/mcp/index.js +74 -54
- package/dist/mcp/radar-http.js +3 -1
- package/dist/mcp/session-enable.d.ts +1 -0
- package/dist/mcp/session-enable.js +52 -8
- package/dist/mcp/switchboard-tools.d.ts +5 -2
- package/dist/mcp/switchboard-tools.js +18 -12
- package/dist/mcp/tools.js +69 -169
- package/dist/mcp/web-child-env.js +2 -1
- package/dist/shared/android.d.ts +74 -10
- package/dist/shared/android.js +344 -103
- package/dist/shared/constants.d.ts +17 -5
- package/dist/shared/constants.js +59 -5
- package/dist/shared/db.d.ts +1 -1
- package/dist/shared/db.js +21 -14
- package/dist/shared/debug-log.js +2 -4
- package/dist/shared/enable-diagnosis.d.ts +27 -1
- package/dist/shared/enable-diagnosis.js +73 -0
- package/dist/shared/feature-flags.d.ts +11 -0
- package/dist/shared/feature-flags.js +18 -4
- package/dist/shared/log-session.d.ts +2 -1
- package/dist/shared/prefs.js +4 -5
- package/dist/shared/radar-request-raw.js +3 -1
- package/dist/shared/switchboard-note.d.ts +19 -0
- package/dist/shared/switchboard-note.js +76 -0
- package/dist/shared/switchboard-report.js +40 -4
- package/dist/shared/switchboard.d.ts +2 -1
- package/dist/shared/switchboard.js +17 -3
- package/dist/shared/transport.d.ts +24 -0
- package/dist/shared/wire.d.ts +2 -0
- package/dist/web/install-app-cli.d.ts +2 -0
- package/dist/web/install-app-cli.js +60 -0
- package/dist/web/install-app.d.ts +16 -7
- package/dist/web/install-app.js +92 -39
- package/dist/web/macapp/RadarApp.swift +12 -11
- package/dist/web/public/index.html +4 -2
- package/dist/web/public/next/feature-flags.js +33 -0
- package/dist/web/public/next/feed.js +13 -2
- package/dist/web/public/next/flags.js +15 -3
- package/dist/web/public/next/registry.js +4 -4
- package/dist/web/public/next/store.js +89 -3
- package/dist/web/public/next/switchboard-note.js +76 -0
- package/dist/web/public/next/voice-model.js +196 -14
- package/dist/web/public/next/voice.js +68 -10
- package/dist/web/server.d.ts +17 -0
- package/dist/web/server.js +180 -35
- package/dist/web/spec.d.ts +1 -1
- package/dist/web/spec.js +1 -1
- package/package.json +1 -1
package/dist/mcp/tools.js
CHANGED
|
@@ -5,8 +5,6 @@ export const SERVER_INSTRUCTIONS = [
|
|
|
5
5
|
"",
|
|
6
6
|
"SESSION STATE:",
|
|
7
7
|
"Radar starts DISABLED each session. ping, list_profiles, and open_radar_dashboard work before enabling; other tools return an error until enabled.",
|
|
8
|
-
"export_switchboard_session also works after an auto-disable if this process streamed the call",
|
|
9
|
-
"live. It builds the report from the live stream copy, no device call needed.",
|
|
10
8
|
"Use /radar-enable to activate, /radar-disable to deactivate.",
|
|
11
9
|
"",
|
|
12
10
|
"AUTO-ENABLE: When the user asks an obvious device question, call the radar tool straight away.",
|
|
@@ -18,133 +16,27 @@ export const SERVER_INSTRUCTIONS = [
|
|
|
18
16
|
"",
|
|
19
17
|
"TIMEOUT: The device-side radar auto-shuts down after idle. On tool call failure,",
|
|
20
18
|
"the session flips to disabled and the tool says Radar is not active or Session disabled. The AUTO-ENABLE rule applies.",
|
|
19
|
+
"ping(timeout_minutes=N) extends a session; watch remaining_minutes.",
|
|
21
20
|
"",
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
'- "watch what happens when I..." -> clear_buffers then wait_for_events (DO NOT filter unless the user specifies a type)',
|
|
27
|
-
'- "did that clog fire" / "check analytics" -> get_recent_clogs(name="...")',
|
|
28
|
-
'- "why is this slow" / "how long did X take" / "show me the traces" / "check performance" -> get_recent_traces(name="...") then get_trace_detail',
|
|
29
|
-
'- "what API call was that" -> get_recent_network_calls then get_network_call_detail',
|
|
30
|
-
'- "did I get X" / "did X happen" -> search(query="X") across ALL buffers, not just one',
|
|
31
|
-
'- "everything since I enabled" / "the whole session" / "what did I miss" -> query_session',
|
|
32
|
-
'- "what happened in the voice session" / "why did playback stutter" / "did the mic open" -> get_switchboard_sessions then get_switchboard_session(id, kind=...): player for stutter, state for mic and connection, phase for slow start',
|
|
33
|
-
'- "did the turns get saved" / "why is a turn missing from the DM" -> get_switchboard_session(id, kind=saved_turn): outcome is applied, no_line (no subtitle line still held the item, still kept), or why a turn was dropped; the summary\'s saved_turn_counts counts each outcome (absent on an older device build means not counted, not zero). A server resend counts again under applied or no_line, so their sum can run above the finals and is not a lost turn. Every turn other_session with a null server_session_id usually means session.ready named no session (a ready record with a null id) or never arrived (no ready record).',
|
|
34
|
-
'- "export this voice session" / "save the switchboard session" / "hand this voice session to someone else" -> export_switchboard_session(id=...)',
|
|
35
|
-
'- "check the debug logs" -> get_recent_logs (tag is OPTIONAL: pass tag="SlackRadar" to filter, or omit it for all recent lines)',
|
|
36
|
-
'- "is flag X on?" / "what is the effective value of X" / "what feature flags does the app have" -> get_feature_flag(key="X") / search_feature_flags(query="X") / list_feature_flags. This is the LIVE effective state (override if set, else server value), requires a debug build with the feature-flag Radar plugin.',
|
|
37
|
-
'- "what feature-flag overrides are set?" / "check debug_features" -> search_prefs(query="X") or get_prefs(file="debug_features_...xml"). This shows MANUAL OVERRIDES only, not effective flag state: debug_features_*.xml holds only flags the debug menu overrode, and an override is deleted once it matches the server value. A flag missing from this file can still be ON server-side -- absence means "no override," never "disabled." Prefer get_feature_flag/list_feature_flags/search_feature_flags for the actual live value; use this route only when the manual-override history itself is what is being asked about.',
|
|
38
|
-
'- "what did the app remember" / "what is cached in prefs" / "what team_prefs are set" -> list_prefs then get_prefs',
|
|
39
|
-
'- "save this" / "file this as a bug" / "share this" / "bundle this" / "attach to ticket" / "give me a repro" / "snapshot this" / "preserve this" / "hold this state" / "save what you just saw" -> capture_snapshot',
|
|
40
|
-
'- "how does the app handle N events a second" / "replay RTM" / "stress the message handler" -> run_test_case(case, repeat, rate_per_second) then get_test_run(run_id, wait_seconds) until settled. A 409 with "ms left" means wait that long and retry, a 409 "active" names the run to wait for or stop',
|
|
21
|
+
"Routes: screen -> screenshot; what just happened -> get_recent_network_calls + get_recent_rtm_events; slow -> get_recent_traces;",
|
|
22
|
+
"clog fired -> get_recent_clogs; did X happen -> search; whole session -> query_session; watch -> clear_buffers + wait_for_events;",
|
|
23
|
+
"flag on -> get_feature_flag; prefs -> list_prefs; bug or share -> capture_snapshot; replay or stress RTM -> run_test_case; logs -> get_recent_logs;",
|
|
24
|
+
"voice session -> get_switchboard_sessions, get_switchboard_session (kind=saved_turn for saved or missing turns), export_switchboard_session.",
|
|
41
25
|
"",
|
|
42
|
-
"
|
|
26
|
+
"Habits:",
|
|
43
27
|
"- Network/RTM buffers clear on shutdown. Clogs persist from app start.",
|
|
44
28
|
"- If ping fails, do NOT retry. Tell the user and fall back to code-only analysis.",
|
|
45
29
|
"- Fetch details eagerly. When results reveal interesting events, get their detail immediately.",
|
|
46
|
-
"-
|
|
47
|
-
"-
|
|
48
|
-
"
|
|
49
|
-
"-
|
|
50
|
-
" build can run on more than one user (personal=0, plus a work profile or secondary user),",
|
|
51
|
-
" and only the first to bind the socket wins. If events seem to come from the wrong app, tell",
|
|
52
|
-
" the user which profile is bound and use list_profiles + activate_for_user to switch.",
|
|
53
|
-
"- MULTIPLE DEVICES: with more than one device attached, enable fails and returns the list of",
|
|
54
|
-
" attached serials. Retry _radar_session_enable with device_serial set to one of them. When the",
|
|
55
|
-
" intent is unclear (you cannot tell which device the user means), ask which device before retrying;",
|
|
56
|
-
" do not guess. The enable success response names the bound device via device_label, so confirm it",
|
|
57
|
-
" matches what the user expected. The picked device applies to every tool for the whole session. Do",
|
|
58
|
-
" not confuse this with profiles: profiles are separate users on ONE device (personal vs work), while",
|
|
59
|
-
" devices are separate hardware.",
|
|
60
|
-
"- Screenshots default to 720px. Use full_res=true only when detail matters.",
|
|
30
|
+
"- To watch a flow, clear_buffers then wait_for_events with no filter unless the user names a type; use idle_timeout_ms, not polling.",
|
|
31
|
+
"- Flag values: get_feature_flag / search_feature_flags / list_feature_flags. debug_features_*.xml (get_prefs / search_prefs) holds",
|
|
32
|
+
" manual overrides only; a flag missing there means no override, never off.",
|
|
33
|
+
"- Live screen mirroring needs ffmpeg: give the user the install command, never run it.",
|
|
61
34
|
"- Setup: /slack-radar-setup",
|
|
62
|
-
"- Manual enable (no skill): adb shell am broadcast -a slack.debug.ENABLE_RADAR --ei timeout_minutes 5 -p com.Slack.internal.debug",
|
|
63
|
-
" Then: adb forward tcp:8099 localabstract:slack-radar (prefix adb -s <serial> when multiple devices are attached)",
|
|
64
|
-
" This starts Radar in open mode (no radar_token extra, so the device accepts any caller). Use it only when /radar-enable cannot run; /radar-enable sends the token.",
|
|
65
35
|
"",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"plus the Database/Preferences/Feature Flags browsers.",
|
|
71
|
-
"Launched via the /radar-ui skill, which runs",
|
|
72
|
-
"`npx @slack/radar-mcp web` (a global install also exposes it as `slack-radar`).",
|
|
73
|
-
"",
|
|
74
|
-
"PROACTIVELY offer the dashboard when it would help — do not wait to be asked. The moment a",
|
|
75
|
-
"device session turns visual or multi-step, say so and offer to open it, e.g.: \"This is",
|
|
76
|
-
"easier to watch live — want me to open the Radar dashboard?\" Offer (once per thread) when:",
|
|
77
|
-
'- User says "watch", "monitor", "let me see", "show me live" about device traffic',
|
|
78
|
-
"- User wants to share traffic with a colleague, pair, or teammate",
|
|
79
|
-
"- User is doing a multi-minute investigation and the transcript is getting noisy",
|
|
80
|
-
'- User explicitly asks about a GUI, UI, browser view, or dashboard',
|
|
81
|
-
"",
|
|
82
|
-
"OFFER, then open ONLY AFTER THE USER AGREES — opening a browser window is a user-visible",
|
|
83
|
-
"action; never pop one unbidden. On a yes, run the /radar-ui skill (or tell them to run",
|
|
84
|
-
"`npx @slack/radar-mcp web`) and hand over the URL. Nudge, do not auto-open.",
|
|
85
|
-
"DO NOT offer for single-query debugging or when the user is happy reading results in the",
|
|
86
|
-
"transcript. Offer when visual inspection adds real value.",
|
|
87
|
-
"",
|
|
88
|
-
"SCREEN OVERLAY (in the dashboard):",
|
|
89
|
-
"The dashboard has a '▣ Screen' button that mirrors the LIVE device screen in a side panel,",
|
|
90
|
-
"plus a full-resolution screenshot and screen recording. It is OFF by default and opens to a",
|
|
91
|
-
"consent notice first, because it shows real on-screen content (open DMs, messages). The live",
|
|
92
|
-
"mirror needs ffmpeg on the user's machine; the screenshot does not. If the user wants the live",
|
|
93
|
-
"screen and ffmpeg is missing, tell them plainly that live mirroring needs ffmpeg and give the",
|
|
94
|
-
"platform install command (mac: `brew install ffmpeg`; debian/ubuntu: `sudo apt install ffmpeg`;",
|
|
95
|
-
"windows: `winget install ffmpeg`), and note the screenshot works without it. NEVER run the",
|
|
96
|
-
"install for them. The dashboard's /health response reports screen.ffmpeg / screen.liveCast /",
|
|
97
|
-
"screen.installHint, so you can check before suggesting.",
|
|
98
|
-
"",
|
|
99
|
-
"CUSTOM DASHBOARD (open_radar_dashboard):",
|
|
100
|
-
"The pre-built tabs (Live/Network/RTM/Clogs/Traces/Logs/Switchboard, plus the Database/Preferences/Feature Flags",
|
|
101
|
-
"browsers) cover the common cases. When the user",
|
|
102
|
-
"describes a live view the tabs do not show, SUGGEST building it; invoke open_radar_dashboard",
|
|
103
|
-
"only after they agree or explicitly ask for a custom view/dashboard (same discipline as",
|
|
104
|
-
"/radar-ui). To build, translate their words into a spec and call the tool; it renders your",
|
|
105
|
-
"spec as a 'Custom' tab on the dashboard (default http://localhost:8100) and returns the URL",
|
|
106
|
-
"for you to share. Cases worth suggesting it for:",
|
|
107
|
-
'- "graph calls per second vs average response time and flag the slow ones"',
|
|
108
|
-
'- "count every DM I receive and beep when one arrives"',
|
|
109
|
-
'- "show only RTM events on channel C... and let me click each for its payload"',
|
|
110
|
-
'- "watch network calls whose body contains <substring>"',
|
|
111
|
-
'- "show me only the <Tag> logs, DEBUG and up, without the noisy lines": a constrained log view,',
|
|
112
|
-
" e.g. {source: \"log\", match: {package: \"com.Slack.internal.debug\", tag: \"<Tag>\"}, minLevel: \"DEBUG\",",
|
|
113
|
-
" exclude: [\"noisy term\"]}. It lands as a Custom tab, gone on a page refresh unless pushed again;",
|
|
114
|
-
" exclude terms are remembered in the browser only on the pre-built tabs, not on Custom. One",
|
|
115
|
-
" phrase per exclude term, no commas or line breaks.",
|
|
116
|
-
"Authoring rules:",
|
|
117
|
-
"- source is one of network/rtm/clog/trace/log/switchboard/all ('all' = one unified timeline).",
|
|
118
|
-
"- match filters on SUMMARY fields only, by source: network=url/method/status_code,",
|
|
119
|
-
" rtm=event_type/direction/channel, clog=event_name, trace=trace_name/span_name,",
|
|
120
|
-
" log=tag/level/message/pid/package (iOS also: subsystem/process),",
|
|
121
|
-
" switchboard=kind/session_id/direction/frame_type/state_kind/phase/event/clock/outcome.",
|
|
122
|
-
" NEVER invent a field; a match on a field the stream does not carry silently matches",
|
|
123
|
-
" nothing. To filter on body text use bodyContains (network/all only), which fetches detail.",
|
|
124
|
-
"- viz composes counter/rate/sparkline/feed/inspector/graph/voice. graph needs a series array",
|
|
125
|
-
" (1-2 entries; metric ratePerSec/count/avg/errorRate; avg needs a field like duration_ms).",
|
|
126
|
-
" voice is the Switchboard tab's session panel and draws only for source switchboard.",
|
|
127
|
-
"- highlight {field, op, value} flags rows breaching a numeric threshold; alert {sound,flash,",
|
|
128
|
-
" say, at} fires on each live match (or once at the Nth). Author an honest one-line `summary`.",
|
|
129
|
-
"Calling it again replaces/refines the live custom dashboard. The dashboard reads a connected",
|
|
130
|
-
"device, so Radar must be armed to show data (it has its own Reconnect button). Debug builds",
|
|
131
|
-
"only; local only. Does not open a browser window for you; surface the returned URL to the user.",
|
|
132
|
-
"",
|
|
133
|
-
"CAPTURE_SNAPSHOT OUTPUT:",
|
|
134
|
-
"When capture_snapshot returns, tell the user:",
|
|
135
|
-
" 1. The result.zip_path if non-null (the single shareable file). Fall back to",
|
|
136
|
-
" result.path (a directory) if zip_path is null.",
|
|
137
|
-
" 2. A one-line summary of counts (network/rtm/clogs/traces/log_lines/screenshot).",
|
|
138
|
-
" 3. Print this EXACT sentence as the privacy line, verbatim — no paraphrase, no",
|
|
139
|
-
" compression, no skipping even under time pressure:",
|
|
140
|
-
' "Privacy: bundle.json contains raw API request/response bodies (including auth headers), RTM message content, user IDs, clog payloads, and performance trace spans. Review before sharing externally."',
|
|
141
|
-
" 4. If result.log_lines_truncated is true, say: 'you got fewer log lines than",
|
|
142
|
-
" requested because the 1 MB read cap was the limiting factor.'",
|
|
143
|
-
" 5. If the user's original ask was 'file this as a bug' / 'attach to ticket' /",
|
|
144
|
-
" similar, offer to attach result.zip_path via the Jira MCP or Slack MCP as",
|
|
145
|
-
" the next step. Do NOT invoke the attach without asking. Just offer.",
|
|
146
|
-
" 6. If result.errors is non-empty, enumerate which parts failed so the user",
|
|
147
|
-
" knows what is missing before they ship the bundle.",
|
|
36
|
+
"DASHBOARD: offer the /radar-ui browser dashboard (http://localhost:8100, or SLACK_RADAR_WEB_PORT) once per thread when a session turns visual, live or",
|
|
37
|
+
"multi-step, or the user wants to share or asks for a UI; not for single-query debugging. Open it ONLY AFTER THE USER AGREES, never",
|
|
38
|
+
"unbidden: run /radar-ui (or `npx @slack/radar-mcp web`) and hand over the URL.",
|
|
39
|
+
"open_radar_dashboard builds a custom tab under the same consent.",
|
|
148
40
|
].join("\n");
|
|
149
41
|
/**
|
|
150
42
|
* The instructions the model actually receives, for the platform this session resolved to.
|
|
@@ -161,17 +53,14 @@ export function serverInstructions(platform) {
|
|
|
161
53
|
return SERVER_INSTRUCTIONS;
|
|
162
54
|
if (platform === "ios") {
|
|
163
55
|
return [
|
|
164
|
-
"PLATFORM: iOS Simulator (NOT Android over adb).",
|
|
165
|
-
"
|
|
166
|
-
"-
|
|
167
|
-
"
|
|
168
|
-
"-
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
" activate_for_user. Treat their supported-platform error as a capability gap.",
|
|
173
|
-
"- Unified-log capture begins when the Radar session is enabled; it cannot backfill logs",
|
|
174
|
-
" emitted before that point. Leave tag unset for all Slack-authored categories.",
|
|
56
|
+
"PLATFORM: iOS Simulator (NOT Android over adb). Overrides Android advice below or in a tool description:",
|
|
57
|
+
"- Radar enables a booted Simulator's app listener directly; ignore adb, profiles and package names.",
|
|
58
|
+
"- Available: ping, network calls, RTM events, clogs, traces, search, query_session, wait_for_events,",
|
|
59
|
+
" clear_buffers, feature flags, capture_snapshot, get_recent_logs, screenshot, record_screen, open_radar_dashboard.",
|
|
60
|
+
"- Not available: get_app_state, database tools, preferences tools, list_profiles, activate_for_user;",
|
|
61
|
+
" treat their supported-platform error as a capability gap.",
|
|
62
|
+
"- Unified-log capture begins when the Radar session is enabled; it cannot backfill logs.",
|
|
63
|
+
" Leave tag unset for all Slack-authored categories.",
|
|
175
64
|
"- Physical iOS devices are not supported yet.",
|
|
176
65
|
"",
|
|
177
66
|
SERVER_INSTRUCTIONS,
|
|
@@ -180,32 +69,30 @@ export function serverInstructions(platform) {
|
|
|
180
69
|
if (platform === "webapp") {
|
|
181
70
|
return [
|
|
182
71
|
"PLATFORM: webapp (a local Slack webapp dev server, NOT an Android device over adb).",
|
|
183
|
-
"
|
|
184
|
-
"- There is no adb and no device.
|
|
185
|
-
"-
|
|
186
|
-
"
|
|
187
|
-
"-
|
|
188
|
-
"
|
|
189
|
-
" open_radar_dashboard. They return a clean 'not supported on platform webapp'.",
|
|
190
|
-
"- Available and behaving as documented below: ping, network calls, RTM events, clogs,",
|
|
191
|
-
" traces, search, query_session, wait_for_events, clear_buffers, capture_snapshot",
|
|
192
|
-
" (without a screenshot), and the feature-flag tools.",
|
|
72
|
+
"Overrides device advice below or in a tool description:",
|
|
73
|
+
"- There is no adb and no device. Radar is plain HTTP on localhost, so enable cannot fail for a device-arming reason.",
|
|
74
|
+
"- NOT available, do not call: screenshot, record_screen, get_app_state, get_recent_logs, the database tools,",
|
|
75
|
+
" the preferences tools, open_radar_dashboard. They return 'not supported on platform webapp'.",
|
|
76
|
+
"- Available: ping, network calls, RTM events, clogs, traces, search, query_session, wait_for_events,",
|
|
77
|
+
" clear_buffers, capture_snapshot (without a screenshot), feature-flag tools.",
|
|
193
78
|
"",
|
|
194
79
|
SERVER_INSTRUCTIONS,
|
|
195
80
|
].join("\n");
|
|
196
81
|
}
|
|
197
82
|
return [
|
|
198
|
-
`PLATFORM: ${platform}. Anything below that assumes an Android device over adb may not apply.`,
|
|
83
|
+
`PLATFORM: ${platform}. Anything below or in a tool description that assumes an Android device over adb may not apply.`,
|
|
199
84
|
"A tool with no implementation on this platform returns a clean 'not supported' error rather",
|
|
200
85
|
"than failing; treat that as a capability gap, not a fault to retry.",
|
|
201
86
|
"",
|
|
202
87
|
SERVER_INSTRUCTIONS,
|
|
203
88
|
].join("\n");
|
|
204
89
|
}
|
|
90
|
+
// Shared by the three flag tools so their wording cannot drift apart.
|
|
91
|
+
const SESSION_VALUE_NOTE = "Rows carry session_enabled (the flag's own value the app runs now: the first-read value for a flag already read this session, or the value a read returns now for one not yet read) and restart_note when it differs from `enabled`; a row where session_enabled or enabled is absent or not a boolean is not known, never a match; only when both are booleans does a missing restart_note mean they match.";
|
|
205
92
|
export const TOOL_DEFINITIONS = [
|
|
206
93
|
{
|
|
207
94
|
name: "ping",
|
|
208
|
-
description: "Check if Slack Radar is running. Returns uptime, buffer sizes, remaining session time, stream status, the Radar MCP tool version (mcp_version), and which app/profile is bound: android_user_id (0 = personal, non-zero = a secondary user such as a work profile), profile ('personal'/'secondary'), and package. If the result has a warning field, show it to the user verbatim.",
|
|
95
|
+
description: "Check if Slack Radar is running. Returns uptime, buffer sizes, remaining session time, stream status, the Radar MCP tool version (mcp_version), dashboard_url (the URL the Radar web dashboard uses for this server, from SLACK_RADAR_WEB_PORT with default 8100, not a check that the dashboard is up), and which app/profile is bound: android_user_id (0 = personal, non-zero = a secondary user such as a work profile), profile ('personal'/'secondary'), and package. If the result has a warning field, show it to the user verbatim. The debug build can run on more than one user and only the first to bind wins; if events look like the wrong app, say which profile is bound and use list_profiles + activate_for_user.",
|
|
209
96
|
inputSchema: {
|
|
210
97
|
type: "object",
|
|
211
98
|
properties: {
|
|
@@ -219,7 +106,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
219
106
|
},
|
|
220
107
|
{
|
|
221
108
|
name: "get_recent_network_calls",
|
|
222
|
-
description: "Get recent HTTP network calls captured from the Slack Android app.",
|
|
109
|
+
description: "Get recent HTTP network calls captured from the Slack Android app. Use when the user asks 'what just happened' / 'what's going on' (with get_recent_rtm_events), 'why isn't this loading' / 'this is broken' (with a screenshot, and status_code 400 or 500), or 'what API call was that' (then get_network_call_detail).",
|
|
223
110
|
inputSchema: {
|
|
224
111
|
type: "object",
|
|
225
112
|
properties: {
|
|
@@ -244,7 +131,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
244
131
|
},
|
|
245
132
|
{
|
|
246
133
|
name: "get_recent_rtm_events",
|
|
247
|
-
description: "Get recent RTM (Real Time Messaging) event summaries.",
|
|
134
|
+
description: "Get recent RTM (Real Time Messaging) event summaries. Use when the user asks 'what just happened' / 'what's going on' (with get_recent_network_calls). Event types use subtypes when there is one (message_changed, not message).",
|
|
248
135
|
inputSchema: {
|
|
249
136
|
type: "object",
|
|
250
137
|
properties: {
|
|
@@ -270,7 +157,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
270
157
|
},
|
|
271
158
|
{
|
|
272
159
|
name: "get_recent_clogs",
|
|
273
|
-
description: "Get recent clog (analytics) event summaries. Returns event name and timestamp. Use get_clog_detail for the full JSON payload.",
|
|
160
|
+
description: "Get recent clog (analytics) event summaries. Returns event name and timestamp. Use get_clog_detail for the full JSON payload. Use when the user asks 'did that clog fire' / 'check analytics'; pass name.",
|
|
274
161
|
inputSchema: {
|
|
275
162
|
type: "object",
|
|
276
163
|
properties: {
|
|
@@ -294,7 +181,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
294
181
|
},
|
|
295
182
|
{
|
|
296
183
|
name: "get_recent_traces",
|
|
297
|
-
description: "Get recent performance trace summaries (one row per completed span from the app's telemetry pipeline). Returns trace name, span name, and duration. Use get_trace_detail for the full span, including its tags and the parent/trace ids.",
|
|
184
|
+
description: "Get recent performance trace summaries (one row per completed span from the app's telemetry pipeline). Returns trace name, span name, and duration. Use get_trace_detail for the full span, including its tags and the parent/trace ids. Use when the user asks 'why is this slow' / 'how long did X take' / 'show me the traces' / 'check performance'; pass name.",
|
|
298
185
|
inputSchema: {
|
|
299
186
|
type: "object",
|
|
300
187
|
properties: {
|
|
@@ -318,11 +205,11 @@ export const TOOL_DEFINITIONS = [
|
|
|
318
205
|
},
|
|
319
206
|
{
|
|
320
207
|
name: "wait_for_events",
|
|
321
|
-
description: "Wait for matching events to arrive in real-time via the SSE stream.",
|
|
208
|
+
description: "Wait for matching events to arrive in real-time via the SSE stream. Use when the user asks 'watch what happens when I...': clear_buffers first, then wait. Leave event_type and channel unset unless the user names one. Use idle_timeout_ms, never a polling loop.",
|
|
322
209
|
inputSchema: {
|
|
323
210
|
type: "object",
|
|
324
211
|
properties: {
|
|
325
|
-
event_type: { type: "string", description: "RTM event type to wait for" },
|
|
212
|
+
event_type: { type: "string", description: "RTM event type to wait for. The match is exact, so use the subtype when there is one (message_changed, not message)." },
|
|
326
213
|
channel: { type: "string", description: "Filter by channel ID" },
|
|
327
214
|
source: { type: "string", description: "Limit to one stream: network, rtm, clog, log, trace, or switchboard (default: all). During a Slackbot voice session switchboard emits several records a second, so an unscoped wait fills with them; scope to the source you want or shorten timeout_ms." },
|
|
328
215
|
timeout_ms: { type: "number", description: "Max time to wait in ms (default: 30000)" },
|
|
@@ -333,7 +220,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
333
220
|
},
|
|
334
221
|
{
|
|
335
222
|
name: "search",
|
|
336
|
-
description: "Search across all captured network calls, RTM events, clogs, and performance traces.",
|
|
223
|
+
description: "Search across all captured network calls, RTM events, clogs, and performance traces. Use when the user asks 'did I get X' / 'did X happen'; it searches every buffer, not just one.",
|
|
337
224
|
inputSchema: {
|
|
338
225
|
type: "object",
|
|
339
226
|
properties: {
|
|
@@ -346,20 +233,20 @@ export const TOOL_DEFINITIONS = [
|
|
|
346
233
|
},
|
|
347
234
|
{
|
|
348
235
|
name: "get_switchboard_sessions",
|
|
349
|
-
description: "List the Slackbot voice (switchboard) sessions the device still holds, at most 8, newest first. A session is one voice conversation attempt, from the controller starting (before any socket opens) to it ending. Each entry carries session_id, team_id, began_at, ended_at (null live), total_captured, frames {incoming, outgoing}, last_state (newest connection/mic/speaking state, absent before the first state record), levels (newest level tick, or null), server_session_id (null until named), turns ({count, last_response_ms, last_clock}, null before the first timed turn) and saved_turn_counts (per outcome), all absent on an older build. last_response_ms can be a gap between reply chunks when last_clock is resumed_from_server_answer. session_id restarts at 1 with the app process; go by began_at. A session already running when radar was enabled lists from its first seen record, team_id null. get_switchboard_session(id) has the records.",
|
|
236
|
+
description: "List the Slackbot voice (switchboard) sessions the device still holds, at most 8, newest first. A session is one voice conversation attempt, from the controller starting (before any socket opens) to it ending. Each entry carries session_id, team_id, began_at, ended_at (null live), total_captured, frames {incoming, outgoing}, last_state (newest connection/mic/speaking state, absent before the first state record), levels (newest level tick, or null), server_session_id (null until named), turns ({count, last_response_ms, last_clock}, null before the first timed turn) and saved_turn_counts (per outcome), all absent on an older build. last_response_ms can be a gap between reply chunks when last_clock is resumed_from_server_answer. saved_turn_counts counts each outcome, and absent on an older device build means not counted, not zero. A server resend counts again under applied or no_line, so their sum can run above the finals and is not a lost turn. session_id restarts at 1 with the app process; go by began_at. A session already running when radar was enabled lists from its first seen record, team_id null. get_switchboard_session(id) has the records.",
|
|
350
237
|
inputSchema: { type: "object", properties: {} },
|
|
351
238
|
annotations: { readOnlyHint: true },
|
|
352
239
|
},
|
|
353
240
|
{
|
|
354
241
|
name: "get_switchboard_session",
|
|
355
|
-
description: "Get one voice session's summary plus the newest `limit` of its records (events), oldest first; events is only the page. Record kinds: state = connection, mic and speaking transitions (state_kind, from, to, cause); frame = control frames in and out (direction, frame_type, bytes), audio frames carry frame_type audio and a byte count, never the audio; player = playback events rearm, jitter_trim, read_stall
|
|
242
|
+
description: "Get one voice session's summary plus the newest `limit` of its records (events), oldest first; events is only the page. Record kinds: state = connection, mic and speaking transitions (state_kind, from, to, cause) with Server:<code> causes; frame = control frames in and out (direction, frame_type, bytes), audio frames carry frame_type audio and a byte count, never the audio; player = playback events rearm, jitter_trim, hold_refuse, reply_hold, reply_unhold, read_stall, pre_ready_drop with gap_ms, bytes_queued; phase = startup phase durations (phase, duration_ms); session = begin, end, ready (server_session_id), config (mic_encoding); levels = one meter-tick batch (started_at, sample_count, offsets_ms, mic/playback rms+peak arrays, 0..1); turn = response_ms (end of speech to first reply audio) and clock (no_card, resumed_from_tap, resumed_from_server_answer); saved_turn = outcome (applied, no_line, missing_field, other_session), has_thread; reconnect_try = trigger (restart, drop, settings), try, outcome (ready, retry, refused, gave_up, where try counts tries made and 0 means the budget was already spent); a Reconnecting state's cause is its trigger; card = card_kind (tool_approval, auth_prompt), event (shown, answered, refused, declined, closed, replaced, expired, cleared, carried), by (tap, server), card_id; a card shown or carried with no later record was still up at the session's last record. Summary server_session_ids lists ready ids. For saved_turn, no_line means no subtitle line still held the item and the turn is still kept; every turn other_session with a null server_session_id usually means session.ready named no session (a ready record with a null id) or never arrived (no ready record). Pass kind to narrow (player for stutter, state for mic and connection, phase for slow start, levels for meter history); the limit applies after the kind filter; total_captured counts every kind. This is a single page, not the whole session; for that use export_switchboard_session or query_session under source switchboard.",
|
|
356
243
|
inputSchema: {
|
|
357
244
|
type: "object",
|
|
358
245
|
properties: {
|
|
359
246
|
id: { type: "number", description: "The session_id from get_switchboard_sessions" },
|
|
360
247
|
kind: {
|
|
361
248
|
type: "string",
|
|
362
|
-
enum: ["session", "state", "frame", "phase", "player", "levels", "turn", "saved_turn"],
|
|
249
|
+
enum: ["session", "state", "frame", "phase", "player", "levels", "turn", "saved_turn", "card", "reconnect_try"],
|
|
363
250
|
description: "Only records of this kind (default: every kind)",
|
|
364
251
|
},
|
|
365
252
|
limit: {
|
|
@@ -375,7 +262,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
375
262
|
},
|
|
376
263
|
{
|
|
377
264
|
name: "export_switchboard_session",
|
|
378
|
-
description: "Write one Slackbot voice (switchboard) session's summary and its records to a plain-text file. Pages the device (up to 2000 per request, paged with before_id), then merges in this process's own live stream copy (read from its session event spool), so a call the device ring has since evicted can still show up if this MCP was connected while it happened. The export can stop early (for example an old device build that does not page, the 32 MB size cap, the page limit, or the device stopping answering), and the report notes say why anything is missing; the spool itself rotates at 100 MB across every event kind it captures, not just switchboard, so an unusually long or chatty session could in principle rotate away a call's own early records before the device ring would have evicted them. Writes it as a readable report (server_session_id, summary, then one line per record, oldest first) under ~/.slack-radar/exports/<file>, permissions 0700/0600 like capture_snapshot. Defaults to the newest session when id is omitted. Returns the file path, a short summary, and notes. An unknown id (404, unreachable, or a reply too large to read) errors unless this process streamed the call live, then the report comes from the live stream copy alone, whichever process ran the export, since this MCP server and the web dashboard each keep their own. Still works right after Radar auto-disables, from the live stream copy alone with no device call; an explicit /radar-disable or clear_buffers wipes that copy.",
|
|
265
|
+
description: "Write one Slackbot voice (switchboard) session's summary and its records to a plain-text file. Pages the device (up to 2000 per request, paged with before_id), then merges in this process's own live stream copy (read from its session event spool), so a call the device ring has since evicted can still show up if this MCP was connected while it happened. The export can stop early (for example an old device build that does not page, the 32 MB size cap, the page limit, or the device stopping answering), and the report notes say why anything is missing; the spool itself rotates at 100 MB across every event kind it captures, not just switchboard, so an unusually long or chatty session could in principle rotate away a call's own early records before the device ring would have evicted them. Writes it as a readable report (server_session_id, summary, then one line per record, oldest first) under ~/.slack-radar/exports/<file>, permissions 0700/0600 like capture_snapshot. Defaults to the newest session when id is omitted. Returns the file path, a short summary, and notes. An unknown id (404, unreachable, or a reply too large to read) errors unless this process streamed the call live, then the report comes from the live stream copy alone, whichever process ran the export, since this MCP server and the web dashboard each keep their own. Still works right after Radar auto-disables, from the live stream copy alone with no device call; an explicit /radar-disable or clear_buffers wipes that copy. Use when the user asks to export or save a voice session, or to hand it to someone else.",
|
|
379
266
|
inputSchema: {
|
|
380
267
|
type: "object",
|
|
381
268
|
properties: {
|
|
@@ -411,7 +298,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
411
298
|
},
|
|
412
299
|
{
|
|
413
300
|
name: "activate_for_user",
|
|
414
|
-
description: "Activate Slack Radar on a specific Android user profile. Use after list_profiles to switch between the personal user and a secondary user (such as a work profile). Switching profiles restarts log capture with a new session-scoped file and reconnects the SSE event stream so events come from the newly activated profile; old captures remain on disk for up to 7 days. Call this when already connected and only the target profile needs to change.",
|
|
301
|
+
description: "Activate Slack Radar on a specific Android user profile. Use after list_profiles to switch between the personal user and a secondary user (such as a work profile). Switching profiles restarts log capture with a new session-scoped file and reconnects the SSE event stream so events come from the newly activated profile; old captures remain on disk for up to 7 days. Call this when already connected and only the target profile needs to change. If the result has token_via_argv, the token had to go over the command line, and the field says why.",
|
|
415
302
|
inputSchema: {
|
|
416
303
|
type: "object",
|
|
417
304
|
properties: {
|
|
@@ -430,7 +317,8 @@ export const TOOL_DEFINITIONS = [
|
|
|
430
317
|
},
|
|
431
318
|
{
|
|
432
319
|
name: "capture_snapshot",
|
|
433
|
-
description: "Bundle the current Radar state into a single on-disk artifact for sharing. Writes four files to ~/.slack-radar/snapshots/snapshot-<ts>/: bundle.json (network + RTM + clog + trace buffers, up to 1000 items each — a bulk export, much larger than point queries like get_network_call_detail), logcat.tail.log (last N lines of the active capture), screenshot.png (current screen), and README.txt (receiver-facing explainer). Switchboard voice sessions are not bundled; keep them with get_switchboard_session or query_session(source=switchboard). Use when the user says 'save this', 'file this as a bug', 'share this', 'bundle this up', 'attach to a ticket', 'make me a repro', or otherwise wants a shareable reproducible handoff. PRIVACY: bundle.json contains raw API request/response bodies including auth headers, RTM message content, user/team/channel IDs, clog payloads, and performance trace spans — review before sharing externally."
|
|
320
|
+
description: "Bundle the current Radar state into a single on-disk artifact for sharing. Writes four files to ~/.slack-radar/snapshots/snapshot-<ts>/: bundle.json (network + RTM + clog + trace buffers, up to 1000 items each — a bulk export, much larger than point queries like get_network_call_detail), logcat.tail.log (last N lines of the active capture), screenshot.png (current screen), and README.txt (receiver-facing explainer). Switchboard voice sessions are not bundled; keep them with get_switchboard_session or query_session(source=switchboard). Use when the user says 'save this', 'file this as a bug', 'share this', 'bundle this up', 'attach to a ticket', 'make me a repro', or otherwise wants a shareable reproducible handoff. PRIVACY: bundle.json contains raw API request/response bodies including auth headers, RTM message content, user/team/channel IDs, clog payloads, and performance trace spans — review before sharing externally. " +
|
|
321
|
+
"When it returns, tell the user: result.zip_path (the single shareable file), else result.path; a one-line summary of the counts; \"Privacy: \" followed by result.privacy_notice word for word, verbatim and never paraphrased, even under time pressure; if result.log_lines_truncated is true, that the 1 MB read cap cut the log lines; if result.errors is non-empty, which parts failed. If they asked to file it as a bug or attach it to a ticket, offer to attach result.zip_path through the Jira or Slack MCP; do not attach without asking.",
|
|
434
322
|
inputSchema: {
|
|
435
323
|
type: "object",
|
|
436
324
|
properties: {
|
|
@@ -454,7 +342,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
454
342
|
},
|
|
455
343
|
{
|
|
456
344
|
name: "screenshot",
|
|
457
|
-
description: "Capture a screenshot from the connected Android device.",
|
|
345
|
+
description: "Capture a screenshot from the connected Android device. Use when the user asks 'what am I looking at' / 'what screen is this'. Defaults to 720px; pass full_res only when detail matters.",
|
|
458
346
|
inputSchema: {
|
|
459
347
|
type: "object",
|
|
460
348
|
properties: {
|
|
@@ -482,7 +370,9 @@ export const TOOL_DEFINITIONS = [
|
|
|
482
370
|
},
|
|
483
371
|
{
|
|
484
372
|
name: "_radar_session_enable",
|
|
485
|
-
description: "Enable Slack Radar for this session. Sets up ADB forwarding, activates the device-side server, and connects the SSE stream. Called by /radar-enable skill. Safe to repeat: on an already enabled session it checks the device first and returns the current status with already_enabled: true. It runs the full setup again when that check fails or the last activation did not land, the device, token or profile changed, the timeout changes, or Radar is in open mode. For a clean reset run /radar-disable, then /radar-enable. If the
|
|
373
|
+
description: "Enable Slack Radar for this session. Sets up ADB forwarding, activates the device-side server, and connects the SSE stream. Called by /radar-enable skill. Safe to repeat: on an already enabled session it checks the device first and returns the current status with already_enabled: true. It runs the full setup again when that check fails or the last activation did not land, the device, token or profile changed, the timeout changes, or Radar is in open mode. For a clean reset run /radar-disable, then /radar-enable. If it has token_via_argv, the token had to go over the command line, and the field says why. " +
|
|
374
|
+
"With more than one device attached, enable fails and returns the list of attached serials. Retry with device_serial set to one of them. When you cannot tell which device the user means, ask which device before retrying; do not guess. The success response names the bound device in device_label, so confirm it matches what the user expected. The picked device applies to every tool for the whole session. Profiles are separate users on ONE device (personal vs work); devices are separate hardware. " +
|
|
375
|
+
"If the result has a warning field, show it to the user verbatim.",
|
|
486
376
|
inputSchema: {
|
|
487
377
|
type: "object",
|
|
488
378
|
properties: {
|
|
@@ -507,9 +397,13 @@ export const TOOL_DEFINITIONS = [
|
|
|
507
397
|
"Suggest this when the user describes a live view the pre-built tabs (Live/Network/RTM/Clogs/Traces/Logs/Switchboard, plus the Database, Preferences and Feature Flags browsers) do not cover " +
|
|
508
398
|
"(e.g. 'graph calls per second vs response time and flag slow ones', 'beep when I get a DM'); invoke it once they agree. " +
|
|
509
399
|
"Translate the request into the spec fields below and call this tool; it ensures the web dashboard is " +
|
|
510
|
-
"running (default http://localhost:8100) and renders your spec as a 'Custom' tab, then returns the URL to share. " +
|
|
400
|
+
"running (default http://localhost:8100, or the port set in SLACK_RADAR_WEB_PORT) and renders your spec as a 'Custom' tab, then returns the URL to share. " +
|
|
511
401
|
"Calling again replaces/refines it. Does not open a browser window for the user. The dashboard reads a connected " +
|
|
512
|
-
"device, so Radar must be armed to show data (the dashboard has its own Reconnect button). Debug builds only, local only."
|
|
402
|
+
"device, so Radar must be armed to show data (the dashboard has its own Reconnect button). Debug builds only, local only. " +
|
|
403
|
+
"Each pre-built tab has a filterable feed and a payload inspector, a live rate on most, a graph on Network and Traces. " +
|
|
404
|
+
"Screen overlay: the dashboard has a Screen button that mirrors the live device screen in a side panel, plus a full-resolution screenshot and screen recording. It is off by default and opens to a consent notice first, because it shows real on-screen content (open DMs, messages). The live mirror needs ffmpeg on the user's machine; the screenshot does not. If the user wants the live screen and ffmpeg is missing, say so plainly, give the install command (mac: `brew install ffmpeg`; debian/ubuntu: `sudo apt install ffmpeg`; windows: `winget install ffmpeg`) and note the screenshot works without it. NEVER run the install for them. The dashboard's /health response reports screen.ffmpeg / screen.liveCast / screen.installHint, so you can check first. " +
|
|
405
|
+
"Constrained log view example: {source: \"log\", match: {package: \"<the debug package ping reports>\", tag: \"<Tag>\"}, minLevel: \"DEBUG\", exclude: [\"noisy term\"]}. It lands as a Custom tab, gone on a page refresh unless pushed again; exclude terms are remembered in the browser only on the pre-built tabs, not on Custom. " +
|
|
406
|
+
"The voice viz is the Switchboard tab's session panel and draws only for source switchboard.",
|
|
513
407
|
inputSchema: {
|
|
514
408
|
type: "object",
|
|
515
409
|
properties: {
|
|
@@ -521,13 +415,13 @@ export const TOOL_DEFINITIONS = [
|
|
|
521
415
|
source: {
|
|
522
416
|
type: "string",
|
|
523
417
|
enum: [...SOURCES],
|
|
524
|
-
description: "Which device stream to read. 'all' is a unified timeline mixing network, RTM, clog, trace, log, and switchboard. 'switchboard' is the Slackbot voice transport's own records (kind: session|state|frame|phase|player|levels|turn|saved_turn).",
|
|
418
|
+
description: "Which device stream to read. 'all' is a unified timeline mixing network, RTM, clog, trace, log, and switchboard. 'switchboard' is the Slackbot voice transport's own records (kind: session|state|frame|phase|player|levels|turn|saved_turn|card|reconnect_try).",
|
|
525
419
|
},
|
|
526
420
|
match: {
|
|
527
421
|
type: "object",
|
|
528
422
|
description: "Case-insensitive substring filter on SUMMARY fields, keyed by source. network: url/method/status_code; " +
|
|
529
423
|
"rtm: event_type/direction/channel; clog: event_name; trace: trace_name/span_name; " +
|
|
530
|
-
"log: tag/level/message/pid/package (iOS also: subsystem/process); switchboard: kind/session_id/direction/frame_type/state_kind/phase/event/clock/outcome. NEVER invent a field " +
|
|
424
|
+
"log: tag/level/message/pid/package (iOS also: subsystem/process); switchboard: kind/session_id/direction/frame_type/state_kind/phase/event/clock/outcome/trigger/card_kind/card_id. NEVER invent a field " +
|
|
531
425
|
"(a match on an absent field silently matches nothing). For body text use bodyContains instead; for a log level floor use minLevel, not match.level.",
|
|
532
426
|
},
|
|
533
427
|
bodyContains: {
|
|
@@ -635,7 +529,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
635
529
|
cursor: { type: "string", description: "An OPAQUE paging token returned by a prior truncated result; pass it back verbatim to get the next older page across all sources. It is NOT an event id and NOT a count; do not construct or modify it. A token from before a spool rotation or a re-enable is rejected with a note, and you start paging from the newest page again." },
|
|
636
530
|
url_filter: { type: "string", description: "Keep frames whose url contains this substring." },
|
|
637
531
|
status_code: { type: "number", description: "Keep frames with this exact HTTP status code." },
|
|
638
|
-
event_type: { type: "string", description: "Keep frames with this exact event_type (RTM)." },
|
|
532
|
+
event_type: { type: "string", description: "Keep frames with this exact event_type (RTM). The match is case-sensitive, so use the subtype in lower case when there is one (message_changed, not message)." },
|
|
639
533
|
channel: { type: "string", description: "Keep frames with this exact channel id (RTM)." },
|
|
640
534
|
name: { type: "string", description: "Keep frames whose name contains this substring (clog/trace)." },
|
|
641
535
|
text: { type: "string", description: "Keep frames whose serialized JSON contains this substring anywhere (searches the whole frame, including clog detail)." },
|
|
@@ -647,7 +541,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
647
541
|
},
|
|
648
542
|
{
|
|
649
543
|
name: "list_prefs",
|
|
650
|
-
description: "List the app's SharedPreferences XML files (including feature-flag files like debug_features_*.xml, which holds manual overrides, and easy_features_*.xml, the persisted server snapshot), with file sizes and the Android user they were read from.",
|
|
544
|
+
description: "List the app's SharedPreferences XML files (including feature-flag files like debug_features_*.xml, which holds manual overrides, and easy_features_*.xml, the persisted server snapshot), with file sizes and the Android user they were read from. Use when the user asks 'what did the app remember' / 'what is cached in prefs' / 'what team_prefs are set'; then get_prefs.",
|
|
651
545
|
inputSchema: {
|
|
652
546
|
type: "object",
|
|
653
547
|
properties: {
|
|
@@ -697,7 +591,9 @@ export const TOOL_DEFINITIONS = [
|
|
|
697
591
|
},
|
|
698
592
|
{
|
|
699
593
|
name: "list_feature_flags",
|
|
700
|
-
description: "List every feature flag the app knows about right now, with its EFFECTIVE value (local override if set, else the server value) and whether that value is a local override. One key appears once per scope and once per signed-in org, each row carrying its own value (plus an org_id on authenticated rows, when the device build reports one), so total_rows counts rows while total_flags counts distinct flags.
|
|
594
|
+
description: "List every feature flag the app knows about right now, with its EFFECTIVE value (local override if set, else the server value) and whether that value is a local override. One key appears once per scope and once per signed-in org, each row carrying its own value (plus an org_id on authenticated rows, when the device build reports one), so total_rows counts rows while total_flags counts distinct flags. `enabled` is the latest value. " +
|
|
595
|
+
SESSION_VALUE_NOTE +
|
|
596
|
+
" Unlike get_prefs/search_prefs on debug_features_*.xml, which shows only manual overrides. Requires a debug build with the feature-flag Radar plugin; older builds report a clear error instead of the list.",
|
|
701
597
|
inputSchema: {
|
|
702
598
|
type: "object",
|
|
703
599
|
properties: {
|
|
@@ -708,7 +604,9 @@ export const TOOL_DEFINITIONS = [
|
|
|
708
604
|
},
|
|
709
605
|
{
|
|
710
606
|
name: "search_feature_flags",
|
|
711
|
-
description: "Case-insensitive substring search on feature flag names, against the same live effective-value list as list_feature_flags. One key can match several rows, one per scope and per signed-in org, so matched_rows counts rows and matched_flags counts distinct flags.
|
|
607
|
+
description: "Case-insensitive substring search on feature flag names, against the same live effective-value list as list_feature_flags. One key can match several rows, one per scope and per signed-in org, so matched_rows counts rows and matched_flags counts distinct flags. " +
|
|
608
|
+
SESSION_VALUE_NOTE +
|
|
609
|
+
" Use this instead of search_prefs when you need a flag's latest value, not just whether it has a manual override.",
|
|
712
610
|
inputSchema: {
|
|
713
611
|
type: "object",
|
|
714
612
|
properties: {
|
|
@@ -720,7 +618,9 @@ export const TOOL_DEFINITIONS = [
|
|
|
720
618
|
},
|
|
721
619
|
{
|
|
722
620
|
name: "get_feature_flag",
|
|
723
|
-
description: "Look up one feature flag by its exact key (case-sensitive) and return its effective value and override status.
|
|
621
|
+
description: "Look up one feature flag by its exact key (case-sensitive) and return its latest effective value and override status. " +
|
|
622
|
+
SESSION_VALUE_NOTE +
|
|
623
|
+
" Always returns rows: an array, because one key resolves along two axes. Scope (authenticated = the value for a signed-in user, unauthenticated = a visitor who has not signed in yet), and org: each signed-in workspace resolves its own value, so a flag can be ON in one workspace and OFF in another and each gets its own row with an org_id. A bare lookup returns one row per (scope, org), so read every row rather than the first one, and pass scope and/or org_id to narrow. On builds that report it, rows also carry timestamp, the device clock when that row was written, which tells an older row from a newer one. Use list_feature_flags or search_feature_flags first if you are not sure of the exact key.",
|
|
724
624
|
inputSchema: {
|
|
725
625
|
type: "object",
|
|
726
626
|
properties: {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// here makes the boundary assertable without importing a server.
|
|
8
8
|
import { RADAR_PORT } from "../shared/constants.js";
|
|
9
9
|
export function webChildEnv(initialSpec, target) {
|
|
10
|
-
|
|
10
|
+
const env = {
|
|
11
11
|
...process.env,
|
|
12
12
|
...(target ? { SLACK_RADAR_PLATFORM: target.platform } : {}),
|
|
13
13
|
...(target?.platform === "ios" && target.serial
|
|
@@ -35,4 +35,5 @@ export function webChildEnv(initialSpec, target) {
|
|
|
35
35
|
// and a lost race leaves the Live preset showing after the Custom tab was reported live.
|
|
36
36
|
...(initialSpec ? { SLACK_RADAR_INITIAL_SPEC: JSON.stringify(initialSpec) } : {}),
|
|
37
37
|
};
|
|
38
|
+
return env;
|
|
38
39
|
}
|