@ateam-ai/mcp 0.4.46 → 0.4.47

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools.js +14 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.4.46",
3
+ "version": "0.4.47",
4
4
  "mcpName": "io.github.ariekogan/ateam-mcp",
5
5
  "description": "A-Team MCP Server — build, validate, and deploy multi-agent solutions from any AI environment",
6
6
  "type": "module",
package/src/tools.js CHANGED
@@ -2168,6 +2168,20 @@ function _scaffoldConnectorFiles({ connectorId, displayName, uiCapable }) {
2168
2168
  //
2169
2169
  // Fill in your real tools below (see TOOLS + the tools/call dispatch). The
2170
2170
  // JSON-RPC framing, actor isolation, stdio loop${uiCapable ? ", and ui-dist plugin discovery" : ""} are template-provided.
2171
+ //
2172
+ // ⚠️ NEVER SWALLOW A FAILURE. If something this tool depends on fails — a fetch,
2173
+ // a platform call, a store read — RETURN THE ERROR. Do not catch it and answer
2174
+ // with empty data:
2175
+ //
2176
+ // BAD: try { rows = await load(); } catch { rows = []; } // renders 0.00 forever
2177
+ // GOOD: try { rows = await load(); }
2178
+ // catch (e) { return toText({ ok: false, error: String(e.message || e) }); }
2179
+ //
2180
+ // A tool that returns ok:true with an empty result when its dependency is broken
2181
+ // is INDISTINGUISHABLE from one that genuinely has no data — to the widget, to
2182
+ // the person reading the screen, and to the agent trying to fix it. That exact
2183
+ // shape cost a full day: a connector caught a 401, returned an empty ledger, and
2184
+ // the dashboard showed 0.00 while every check reported success.
2171
2185
  ${uiCapable ? `
2172
2186
  import { readdirSync, readFileSync, existsSync } from "node:fs";
2173
2187
  import { fileURLToPath } from "node:url";