@ateam-ai/mcp 0.3.7 → 0.3.9
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/package.json +1 -1
- package/src/api.js +7 -7
- package/src/tools.js +31 -0
package/package.json
CHANGED
package/src/api.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
const BASE_URL = process.env.ADAS_API_URL || "https://api.ateam-ai.com";
|
|
14
|
-
|
|
14
|
+
// CORE_URL removed — all requests now route through BASE_URL (skill-validator)
|
|
15
15
|
const ENV_TENANT = process.env.ADAS_TENANT || "";
|
|
16
16
|
const ENV_API_KEY = process.env.ADAS_API_KEY || "";
|
|
17
17
|
|
|
@@ -441,20 +441,20 @@ export async function del(path, sessionId, opts) {
|
|
|
441
441
|
}
|
|
442
442
|
|
|
443
443
|
/**
|
|
444
|
-
* List all active tenants
|
|
445
|
-
*
|
|
444
|
+
* List all active tenants (requires master key).
|
|
445
|
+
* Routes through the skill-validator's /deploy/tenants endpoint,
|
|
446
|
+
* which proxies to Core. This works with any BASE_URL (including
|
|
447
|
+
* public domains without explicit ports).
|
|
446
448
|
*/
|
|
447
449
|
export async function listTenants(sessionId) {
|
|
448
450
|
const session = sessionId ? sessions.get(sessionId) : null;
|
|
449
451
|
if (!session?.masterKey) throw new Error("listTenants requires master key auth");
|
|
450
452
|
|
|
451
|
-
// Resolve Core URL: env var > derive from Builder URL > fallback
|
|
452
|
-
const coreUrl = CORE_URL || BASE_URL.replace(/:\d+$/, ":4000");
|
|
453
453
|
const controller = new AbortController();
|
|
454
454
|
const timeout = setTimeout(() => controller.abort(), REQUEST_TIMEOUT_MS);
|
|
455
455
|
|
|
456
456
|
try {
|
|
457
|
-
const res = await fetch(`${
|
|
457
|
+
const res = await fetch(`${BASE_URL}/deploy/tenants`, {
|
|
458
458
|
method: "GET",
|
|
459
459
|
headers: {
|
|
460
460
|
"Content-Type": "application/json",
|
|
@@ -464,7 +464,7 @@ export async function listTenants(sessionId) {
|
|
|
464
464
|
});
|
|
465
465
|
if (!res.ok) {
|
|
466
466
|
const text = await res.text().catch(() => "");
|
|
467
|
-
throw new Error(`
|
|
467
|
+
throw new Error(`Tenant list error: GET /deploy/tenants returned ${res.status} — ${text}`);
|
|
468
468
|
}
|
|
469
469
|
const data = await res.json();
|
|
470
470
|
return data.tenants || [];
|
package/src/tools.js
CHANGED
|
@@ -674,6 +674,34 @@ export const tools = [
|
|
|
674
674
|
required: ["solution_id", "skill_id", "job_id"],
|
|
675
675
|
},
|
|
676
676
|
},
|
|
677
|
+
{
|
|
678
|
+
name: "ateam_test_connector",
|
|
679
|
+
core: true,
|
|
680
|
+
description:
|
|
681
|
+
"Call a tool on a running connector and get the result. Use this to test individual connector tools (e.g., triggers.list, entities.list, google.command) without deploying to a client. The connector must be connected and running.",
|
|
682
|
+
inputSchema: {
|
|
683
|
+
type: "object",
|
|
684
|
+
properties: {
|
|
685
|
+
solution_id: {
|
|
686
|
+
type: "string",
|
|
687
|
+
description: "The solution ID",
|
|
688
|
+
},
|
|
689
|
+
connector_id: {
|
|
690
|
+
type: "string",
|
|
691
|
+
description: "The connector ID (e.g., 'home-assistant-mcp', 'google-home-mcp')",
|
|
692
|
+
},
|
|
693
|
+
tool: {
|
|
694
|
+
type: "string",
|
|
695
|
+
description: "The tool name to call (e.g., 'triggers.list', 'entities.list', 'google.devices')",
|
|
696
|
+
},
|
|
697
|
+
args: {
|
|
698
|
+
type: "object",
|
|
699
|
+
description: "Optional: arguments to pass to the tool",
|
|
700
|
+
},
|
|
701
|
+
},
|
|
702
|
+
required: ["solution_id", "connector_id", "tool"],
|
|
703
|
+
},
|
|
704
|
+
},
|
|
677
705
|
{
|
|
678
706
|
name: "ateam_get_connector_source",
|
|
679
707
|
core: true,
|
|
@@ -1709,6 +1737,9 @@ const handlers = {
|
|
|
1709
1737
|
ateam_solution_chat: async ({ solution_id, message }, sid) =>
|
|
1710
1738
|
post(`/deploy/solutions/${solution_id}/chat`, { message }, sid),
|
|
1711
1739
|
|
|
1740
|
+
ateam_test_connector: async ({ solution_id, connector_id, tool, args }, sid) =>
|
|
1741
|
+
post(`/deploy/solutions/${solution_id}/connectors/${connector_id}/call`, { tool, args }, sid, { timeoutMs: 30_000 }),
|
|
1742
|
+
|
|
1712
1743
|
// ─── Developer Tools ────────────────────────────────────────────
|
|
1713
1744
|
|
|
1714
1745
|
ateam_get_execution_logs: async ({ solution_id, skill_id, job_id, limit }, sid) => {
|