Skip to content

Commit 6b808f7

Browse files
committed
feat: v2 rewrite - streamline tools and add enriched data support
BREAKING CHANGE: Major API redesign with the following changes: Tools Consolidation: - Reduce tools from 20+ to 16 focused capabilities - Merge timeline/alerts into query_incidents for single-call retrieval - Remove flashduty_ prefix from all tool names New Features: - Add Status Page toolset (query_status_pages, list_status_changes, etc.) - Add Changes toolset (query_changes) - Add Users toolset (query_members, query_teams) - Add Fields toolset (query_fields) - Add Enrichment support for human-readable output (IDs auto-resolved to names) Removed: - Remove assign_incident, add_responder, snooze_incident, merge_incident - Remove impact/resolution/root_cause fields from update_incident - Remove raw package (no longer needed) Code Changes: - Rewrite incidents.go with enriched data responses - Add channels.go with escalation rules support - Add new files: changes.go, statuspage.go, users.go, fields.go, enrichment.go, format.go, types.go - Update README documentation for v2 API
1 parent 0dc0eff commit 6b808f7

30 files changed

Lines changed: 3089 additions & 2216 deletions

README.md

Lines changed: 75 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,14 @@ Here is an example of configuring the remote service, specifying toolsets and re
145145
{
146146
"mcpServers": {
147147
"flashduty": {
148-
"url": "https://mcp.flashcat.cloud/flashduty?toolsets=flashduty_incidents,flashduty_teams&read_only=true",
148+
"url": "https://mcp.flashcat.cloud/flashduty?toolsets=incidents,users&read_only=true",
149149
"authorization_token": "Bearer <your_flashduty_app_key>"
150150
}
151151
}
152152
}
153153
```
154154

155-
- `toolsets=...`: Use a comma-separated list to specify the toolsets to enable.
155+
- `toolsets=...`: Use a comma-separated list to specify the toolsets to enable (e.g., `incidents,users,channels`).
156156
- `read_only=true`: Enables read-only mode.
157157

158158
### Local Server Configuration
@@ -168,6 +168,7 @@ This is the most common method for local configuration, especially in a Docker e
168168
| `FLASHDUTY_APP_KEY` | Flashduty APP key || - |
169169
| `FLASHDUTY_TOOLSETS` | Toolsets to enable (comma-separated) || All toolsets |
170170
| `FLASHDUTY_READ_ONLY` | Restrict to read-only operations (`1` or `true`) || `false` |
171+
| `FLASHDUTY_OUTPUT_FORMAT` | Output format for tool results (`json` or `toon`) || `json` |
171172
| `FLASHDUTY_BASE_URL` | Flashduty API base URL || `https://api.flashcat.cloud` |
172173
| `FLASHDUTY_LOG_FILE` | Log file path || stderr |
173174
| `FLASHDUTY_ENABLE_COMMAND_LOGGING` | Enable command logging || `false` |
@@ -177,7 +178,7 @@ This is the most common method for local configuration, especially in a Docker e
177178
```bash
178179
docker run -i --rm \
179180
-e FLASHDUTY_APP_KEY=<your-app-key> \
180-
-e FLASHDUTY_TOOLSETS="flashduty_incidents,flashduty_teams" \
181+
-e FLASHDUTY_TOOLSETS="incidents,users,channels" \
181182
-e FLASHDUTY_READ_ONLY=1 \
182183
registry.flashcat.cloud/public/flashduty-mcp-server
183184
```
@@ -189,22 +190,54 @@ If you build and run the binary directly from the source, you can use command-li
189190
```bash
190191
./flashduty-mcp-server stdio \
191192
--app-key your_app_key_here \
192-
--toolsets flashduty_incidents,flashduty_teams \
193+
--toolsets incidents,users,channels \
193194
--read-only
194195
```
195196

196197
Available command-line arguments:
197198
- `--app-key`: Flashduty APP key (alternative to `FLASHDUTY_APP_KEY` environment variable)
198199
- `--toolsets`: Comma-separated list of toolsets to enable
199200
- `--read-only`: Enable read-only mode
201+
- `--output-format`: Output format for tool results (`json` or `toon`)
200202
- `--base-url`: Flashduty API base URL
201203
- `--log-file`: Path to log file
202204
- `--enable-command-logging`: Enable command logging
203205
- `--export-translations`: Save translations to a JSON file
204206

205207
> Note: Command-line arguments take precedence over environment variables. For toolsets configuration, if both `FLASHDUTY_TOOLSETS` environment variable and `--toolsets` argument are set, the command-line argument takes priority.
206208
207-
#### 3. i18n / Overriding Descriptions (Local-Only)
209+
#### 3. Output Format (TOON)
210+
211+
The server supports [TOON (Token-Oriented Object Notation)](https://github.com/toon-format/toon) format for tool results, which can significantly reduce token usage (30-50%) when working with LLMs.
212+
213+
**JSON output** (default):
214+
```json
215+
{"members":[{"person_id":1,"person_name":"Alice"},{"person_id":2,"person_name":"Bob"}],"total":2}
216+
```
217+
218+
**TOON output** (compact):
219+
```
220+
members[2]{person_id,person_name}:
221+
1,Alice
222+
2,Bob
223+
total: 2
224+
```
225+
226+
To enable TOON format:
227+
228+
**Via Environment Variable:**
229+
```bash
230+
export FLASHDUTY_OUTPUT_FORMAT=toon
231+
```
232+
233+
**Via Command-line:**
234+
```bash
235+
./flashduty-mcp-server stdio --output-format toon
236+
```
237+
238+
> **Note:** TOON format is particularly effective for arrays of objects with uniform fields (e.g., member lists, incident lists). Most modern LLMs can parse TOON format naturally.
239+
240+
#### 4. i18n / Overriding Descriptions (Local-Only)
208241

209242
The feature to override tool descriptions is only available for local deployments. You can achieve this by creating a `flashduty-mcp-server-config.json` file or by setting environment variables.
210243

@@ -230,49 +263,48 @@ export FLASHDUTY_MCP_TOOL_CREATE_INCIDENT_DESCRIPTION="an alternative descriptio
230263

231264
The following toolsets are available (all are on by default). You can also use `all` to enable all toolsets.
232265

233-
| Toolset | Description |
234-
| ----------------------- | ------------------------------------------------------------- |
235-
| `flashduty_incidents` | Flashduty incident management tools |
236-
| `flashduty_members` | Flashduty member management tools |
237-
| `flashduty_teams` | Flashduty team management tools |
238-
| `flashduty_channels` | Flashduty collaboration channel management tools |
266+
| Toolset | Description | Tools |
267+
| -------------- | ------------------------------------------------ | ----- |
268+
| `incidents` | Incident lifecycle management | 6 |
269+
| `changes` | Change record query | 1 |
270+
| `status_page` | Status page management | 4 |
271+
| `users` | Member and team query | 2 |
272+
| `channels` | Collaboration space and escalation rules | 2 |
273+
| `fields` | Custom field definitions | 1 |
274+
275+
**Total: 16 tools**
239276

240277
---
241278

242279
## Tools
243280

244-
The server provides the following toolsets based on Flashduty API:
245-
246-
### `flashduty_members` - Member Management Tools
247-
- `flashduty_member_infos` - Get member information by person IDs
248-
249-
### `flashduty_teams` - Team Management Tools
250-
- `flashduty_teams_infos` - Get team information by team IDs
251-
252-
### `flashduty_channels` - Channel Management Tools
253-
- `flashduty_channels_infos` - Get collaboration space information by channel IDs
254-
255-
### `flashduty_incidents` - Incident Management Tools
256-
- `flashduty_incidents_infos` - Get incident information by incident IDs
257-
- `flashduty_list_incidents` - List incidents with comprehensive filters
258-
- `flashduty_list_past_incidents` - List similar historical incidents
259-
- `flashduty_get_incident_timeline` - Get incident timeline and feed
260-
- `flashduty_get_incident_alerts` - Get alerts associated with incidents
261-
- `flashduty_create_incident` - Create a new incident
262-
- `flashduty_ack_incident` - Acknowledge incidents
263-
- `flashduty_resolve_incident` - Resolve incidents
264-
- `flashduty_assign_incident` - Assign incidents to people or escalation rules
265-
- `flashduty_add_responder` - Add responders to incidents
266-
- `flashduty_snooze_incident` - Snooze incidents for a period
267-
- `flashduty_merge_incident` - Merge multiple incidents into one
268-
- `flashduty_comment_incident` - Add comments to incidents
269-
- `flashduty_update_incident_title` - Update incident title
270-
- `flashduty_update_incident_description` - Update incident description
271-
- `flashduty_update_incident_impact` - Update incident impact
272-
- `flashduty_update_incident_root_cause` - Update incident root cause
273-
- `flashduty_update_incident_resolution` - Update incident resolution
274-
- `flashduty_update_incident_severity` - Update incident severity
275-
- `flashduty_update_incident_fields` - Update custom fields
281+
### `incidents` - Incident Lifecycle Management (6 tools)
282+
- `query_incidents` - Query incidents with enriched data (timeline, alerts, responders)
283+
- `create_incident` - Create a new incident
284+
- `update_incident` - Update incident (title, description, severity, custom_fields)
285+
- `ack_incident` - Acknowledge incidents
286+
- `close_incident` - Close (resolve) incidents
287+
- `list_similar_incidents` - Find similar historical incidents
288+
289+
### `changes` - Change Record Query (1 tool)
290+
- `query_changes` - Query change records with filters
291+
292+
### `status_page` - Status Page Management (4 tools)
293+
- `query_status_pages` - Query status pages with full configuration
294+
- `list_status_changes` - List change events on status page
295+
- `create_status_incident` - Create incident on status page
296+
- `create_change_timeline` - Add timeline update to status change
297+
298+
### `users` - Member and Team Query (2 tools)
299+
- `query_members` - Query members with optional filters
300+
- `query_teams` - Query teams with member details
301+
302+
### `channels` - Collaboration Space and Escalation Rules (2 tools)
303+
- `query_channels` - Query collaboration spaces
304+
- `query_escalation_rules` - Query escalation rules for a channel
305+
306+
### `fields` - Custom Field Definitions (1 tool)
307+
- `query_fields` - Query custom field definitions
276308

277309
---
278310

0 commit comments

Comments
 (0)