zyntry 0.2.0 → 0.3.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.
Files changed (2) hide show
  1. package/index.mjs +171 -52
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -613,91 +613,210 @@ const MCP_TOOLS = [
613
613
  model: { type: "string", description: "Optional model id (e.g. gpt-4o-mini). Defaults to the runtime's routed model." },
614
614
  project_id: { type: "string", description: "Optional project id; defaults to the zyntry.yaml project in the working directory." },
615
615
  runtime_id: { type: "string", description: "Optional runtime id; defaults to the project's routing." },
616
+ end_user_id: { type: "string", description: "Optional end-user id for metering and quota enforcement." },
616
617
  },
617
618
  required: ["prompt"],
618
619
  },
619
620
  },
620
- {
621
- name: "list_projects",
622
- description: "List the developer's Zyntry projects with plan and environment.",
623
- inputSchema: { type: "object", properties: {} },
624
- },
625
- {
626
- name: "list_runtimes",
627
- description: "List the runtimes of a Zyntry project (defaults to the zyntry.yaml project in the working directory).",
628
- inputSchema: { type: "object", properties: { project_id: { type: "string" } } },
629
- },
630
- {
631
- name: "list_security_groups",
632
- description: "List the enforced security groups of a Zyntry project, with their rules.",
633
- inputSchema: { type: "object", properties: { project_id: { type: "string" } } },
634
- },
635
- {
636
- name: "quota",
637
- description: "Check the project's rate plans (end-user metering configuration).",
638
- inputSchema: { type: "object", properties: { project_id: { type: "string" } } },
639
- },
640
- {
641
- name: "recent_logs",
642
- description: "Recent request logs for a Zyntry project: status, model, provider, latency, errors.",
643
- inputSchema: { type: "object", properties: { project_id: { type: "string" }, limit: { type: "number", description: "Max entries (default 20)." } } },
644
- },
621
+ { name: "list_projects", description: "List the developer's Zyntry projects with plan and environment.", inputSchema: { type: "object", properties: {} } },
622
+ { name: "create_project", description: "Create a new Zyntry project (Free tier; the paid-plan consent flow requires the interactive CLI).", inputSchema: { type: "object", properties: { name: { type: "string" } }, required: ["name"] } },
623
+ { name: "list_runtimes", description: "List the runtimes of a Zyntry project with environment, region, and health.", inputSchema: { type: "object", properties: { project_id: { type: "string" } } } },
624
+ { name: "list_regions", description: "List the deployment regions available to the project's plan.", inputSchema: { type: "object", properties: { project_id: { type: "string" } } } },
625
+ { name: "list_deployments", description: "List a runtime's deployments with region, status, version, and endpoint.", inputSchema: { type: "object", properties: { runtime_id: { type: "string" }, project_id: { type: "string" } } } },
626
+ { name: "redeploy_runtime", description: "Queue a redeployment for a runtime. The new version replaces the active deployment once healthy.", inputSchema: { type: "object", properties: { runtime_id: { type: "string" }, project_id: { type: "string" } } } },
627
+ { name: "recent_logs", description: "Recent request logs for a Zyntry project: status, model, provider, latency, errors.", inputSchema: { type: "object", properties: { project_id: { type: "string" }, limit: { type: "number" } } } },
628
+ { name: "list_traces", description: "Recent request traces with span counts and outcome.", inputSchema: { type: "object", properties: { project_id: { type: "string" }, limit: { type: "number" } } } },
629
+ { name: "usage_summary", description: "Project usage metrics: request volume, success rate, latency percentiles, and cost.", inputSchema: { type: "object", properties: { project_id: { type: "string" }, days: { type: "number", description: "Window in days (1, 7, 30). Default 7." } } } },
630
+ { name: "list_models", description: "The model catalog available to the project's plan: provider, model ids, context windows, and pricing.", inputSchema: { type: "object", properties: { project_id: { type: "string" } } } },
631
+ { name: "list_security_groups", description: "List the enforced security groups of a Zyntry project, with their rules.", inputSchema: { type: "object", properties: { project_id: { type: "string" } } } },
632
+ { name: "security_activity", description: "Recent security activity: blocked requests, quota hits, and group changes.", inputSchema: { type: "object", properties: { project_id: { type: "string" } } } },
633
+ { name: "quota", description: "The project's rate plans (end-user metering configuration).", inputSchema: { type: "object", properties: { project_id: { type: "string" } } } },
634
+ { name: "list_end_users", description: "List the project's end users with their usage.", inputSchema: { type: "object", properties: { project_id: { type: "string" }, search: { type: "string" } } } },
635
+ { name: "upsert_end_user", description: "Add or update an end user (idempotent by external_id). Optionally attach a rate plan.", inputSchema: { type: "object", properties: { external_id: { type: "string" }, display_name: { type: "string" }, email: { type: "string" }, rate_plan_id: { type: "string" }, project_id: { type: "string" } }, required: ["external_id"] } },
636
+ { name: "list_api_keys", description: "List the project's API keys (prefix, scopes, runtime scope, last use — secrets are never returned).", inputSchema: { type: "object", properties: { project_id: { type: "string" } } } },
637
+ { name: "list_webhooks", description: "List the project's webhook endpoints and their subscribed events.", inputSchema: { type: "object", properties: { project_id: { type: "string" } } } },
638
+ { name: "list_backups", description: "List a runtime's backups with status and size.", inputSchema: { type: "object", properties: { runtime_id: { type: "string" }, project_id: { type: "string" } } } },
639
+ { name: "create_backup", description: "Queue a backup for a runtime.", inputSchema: { type: "object", properties: { runtime_id: { type: "string" }, project_id: { type: "string" } } } },
640
+ { name: "product_updates", description: "Recent Zyntry product updates.", inputSchema: { type: "object", properties: {} } },
645
641
  ];
642
+
643
+ const say = (text) => ({ content: [{ type: "text", text: String(text) }] });
644
+ const err = (text) => ({ isError: true, content: [{ type: "text", text: String(text) }] });
645
+
646
+ async function resolveRuntimeId(token, projectId, runtimeIdArg) {
647
+ if (runtimeIdArg) return String(runtimeIdArg);
648
+ const result = await api("/api/v1/runtimes?project_id=" + encodeURIComponent(projectId) + "&limit=50", {}, token);
649
+ const runtimes = result.ok ? (result.data.runtimes || result.data.items || []) : [];
650
+ return runtimes.length ? String(runtimes[0].id) : null;
651
+ }
646
652
 
647
653
  async function mcpInvokeTool(name, args) {
648
654
  const token = loadToken();
649
- if (!token) return { isError: true, content: [{ type: "text", text: "Not logged in. The developer must run 'zyntry login' first." }] };
650
- const projectId = args?.project_id || readProjectIdFromYamlOptional();
655
+ if (!token) return err("Not logged in. The developer must run 'zyntry login' first.");
656
+ args = args || {};
657
+ let projectId = args.project_id || readProjectIdFromYamlOptional();
658
+ const needsProject = !["list_projects", "create_project", "product_updates", "invoke"].includes(name);
659
+
651
660
  if (name === "invoke") {
652
- if (!args?.prompt) return { isError: true, content: [{ type: "text", text: "prompt is required" }] };
653
- if (!projectId) return { isError: true, content: [{ type: "text", text: "No project context: pass project_id or run zyntry init in the working directory." }] };
661
+ if (!args.prompt) return err("prompt is required");
662
+ if (!projectId) return err("No project context: pass project_id or run zyntry init in the working directory.");
654
663
  const body = { project_id: projectId, messages: [{ role: "user", content: String(args.prompt) }] };
655
664
  if (args.model) body.model = String(args.model);
656
665
  if (args.runtime_id) body.runtime_id = String(args.runtime_id);
666
+ if (args.end_user_id) body.end_user_id = String(args.end_user_id);
657
667
  const result = await api("/api/v1/invoke", { method: "POST", body: JSON.stringify(body) }, token);
658
668
  if (result.status === 202 && result.data?.status === "approval_required") {
659
- return { content: [{ type: "text", text: "A tool requested approval before running: " + JSON.stringify(result.data.tool_call) + ". The developer can approve by re-running the CLI with --approve <call_id>." }] };
669
+ return say("A tool requested approval before running: " + JSON.stringify(result.data.tool_call) + ". The developer can approve by re-running the CLI with --approve <call_id>.");
660
670
  }
661
- if (!result.ok) return { isError: true, content: [{ type: "text", text: "Invoke failed (" + result.status + "): " + (result.data?.message || result.data?.error || "unknown") }] };
671
+ if (!result.ok) return err("Invoke failed (" + result.status + "): " + (result.data?.message || result.data?.error || "unknown"));
662
672
  const usage = result.data.usage || {};
663
- return { content: [{ type: "text", text: String(result.data.output ?? "") + "\n\n[provider " + (result.data.provider ?? "—") + " · model " + (result.data.model ?? "—") + " · " + (usage.input_tokens ?? 0) + "→" + (usage.output_tokens ?? 0) + " tokens · $" + Number(usage.cost_usd ?? 0).toFixed(6) + " · request " + (result.data.request_id ?? "—") + "]" }] };
673
+ return say(String(result.data.output ?? "") + "\n\n[provider " + (result.data.provider ?? "—") + " · model " + (result.data.model ?? "—") + " · " + (usage.input_tokens ?? 0) + "→" + (usage.output_tokens ?? 0) + " tokens · $" + Number(usage.cost_usd ?? 0).toFixed(6) + " · request " + (result.data.request_id ?? "—") + "]");
664
674
  }
675
+
665
676
  if (name === "list_projects") {
666
677
  const result = await api("/api/v1/projects", {}, token);
667
- if (!result.ok) return { isError: true, content: [{ type: "text", text: "Failed (" + result.status + ")" }] };
668
- const lines = (result.data.projects || []).map((p) => p.name + " [" + (p.plan_code ?? "free") + "/" + (p.environment ?? "—") + "] id=" + p.id);
669
- return { content: [{ type: "text", text: lines.length ? lines.join("\n") : "No projects yet." }] };
678
+ if (!result.ok) return err("Failed (" + result.status + ")");
679
+ const projects = result.data.projects || [];
680
+ return say(projects.length ? projects.map((p) => p.name + " [" + (p.plan_code ?? "free") + "/" + (p.environment ?? "—") + "] id=" + p.id).join("\n") : "No projects yet.");
681
+ }
682
+ if (name === "create_project") {
683
+ if (!args.name) return err("name is required");
684
+ const account = await api("/api/v1/cli/account", {}, token);
685
+ if (!account.ok) return err("Account check failed (" + account.status + ")");
686
+ if (!account.data.free_project_available) return err("Free allowance used; paid plans need the interactive 'zyntry init' consent flow.");
687
+ const init = await api("/api/v1/cli/init", { method: "POST", body: JSON.stringify({ name: String(args.name), plan_code: "free" }) }, token);
688
+ if (!init.ok) return err(init.data?.message || "Creation failed (" + init.status + ")");
689
+ return say("Created project " + init.data.project.name + " (" + init.data.project.id + ")");
690
+ }
691
+ if (name === "product_updates") {
692
+ const result = await api("/api/v1/product-updates", {}, token);
693
+ if (!result.ok) return err("Failed (" + result.status + ")");
694
+ const updates = result.data.items || [];
695
+ return say(updates.length ? updates.map((u) => String(u.published_at ?? "").slice(0, 10) + " — " + u.title).join("\n") : "No product updates yet.");
670
696
  }
671
- if (!projectId) return { isError: true, content: [{ type: "text", text: "No project context: pass project_id or run zyntry init in the working directory." }] };
697
+
698
+ if (needsProject && !projectId) return err("No project context: pass project_id or run zyntry init in the working directory.");
699
+
672
700
  if (name === "list_runtimes") {
673
701
  const result = await api("/api/v1/runtimes?project_id=" + encodeURIComponent(projectId) + "&limit=50", {}, token);
674
- if (!result.ok) return { isError: true, content: [{ type: "text", text: "Failed (" + result.status + ")" }] };
702
+ if (!result.ok) return err("Failed (" + result.status + ")");
675
703
  const runtimes = result.data.runtimes || result.data.items || [];
676
- return { content: [{ type: "text", text: runtimes.length ? runtimes.map((r) => r.name + " [" + (r.environment ?? "—") + "/" + (r.region ?? "automatic") + " · " + String(r.health ?? r.status ?? "?") + "] id=" + r.id).join("\n") : "No runtimes." }] };
704
+ return say(runtimes.length ? runtimes.map((r) => r.name + " [" + (r.environment ?? "—") + "/" + (r.region ?? "automatic") + " · " + String(r.health ?? r.status ?? "?") + "] id=" + r.id).join("\n") : "No runtimes.");
705
+ }
706
+ if (name === "list_regions") {
707
+ const result = await api("/api/v1/regions?project_id=" + encodeURIComponent(projectId), {}, token);
708
+ if (!result.ok) return err("Failed (" + result.status + ")");
709
+ const regions = result.data.regions || result.data.items || [];
710
+ return say(regions.length ? regions.map((r) => r.name + " [" + String(r.status ?? (r.available ? "available" : "plan required")) + "] id=" + r.id).join("\n") : "No regions returned.");
711
+ }
712
+ if (name === "list_deployments") {
713
+ const runtimeId = await resolveRuntimeId(token, projectId, args.runtime_id);
714
+ if (!runtimeId) return err("No runtimes in this project.");
715
+ const result = await api("/api/v1/runtimes/" + encodeURIComponent(runtimeId) + "/deployments", {}, token);
716
+ if (!result.ok) return err("Failed (" + result.status + ")");
717
+ const deployments = result.data.deployments || result.data.items || [];
718
+ return say(deployments.length ? deployments.map((d) => (d.region ?? "automatic") + " [" + String(d.health ?? d.status ?? "?") + "] v" + (d.version ?? "—") + (d.endpoint ? " " + d.endpoint : "")).join("\n") : "No deployments recorded.");
719
+ }
720
+ if (name === "redeploy_runtime") {
721
+ const runtimeId = await resolveRuntimeId(token, projectId, args.runtime_id);
722
+ if (!runtimeId) return err("No runtimes in this project.");
723
+ const result = await api("/api/v1/runtimes/" + encodeURIComponent(runtimeId) + "/deployments", { method: "POST" }, token);
724
+ if (!result.ok) return err("Redeploy failed (" + result.status + "): " + (result.data?.message || result.data?.error || ""));
725
+ return say("Redeployment queued for runtime " + runtimeId + " — the new version replaces the active deployment when healthy.");
726
+ }
727
+ if (name === "recent_logs") {
728
+ const limit = Math.min(Math.max(Number(args.limit) || 20, 1), 50);
729
+ const runtimeId = await resolveRuntimeId(token, projectId, args.runtime_id);
730
+ if (!runtimeId) return say("No runtimes — no logs yet.");
731
+ const result = await api("/api/v1/runtimes/" + encodeURIComponent(runtimeId) + "/logs?limit=" + limit, {}, token);
732
+ if (!result.ok) return err("Logs failed (" + result.status + ")");
733
+ const logs = result.data.logs || result.data.items || [];
734
+ return say(logs.length ? logs.map((l) => (l.created_at ?? "") + " [" + (l.status ?? "?") + "] " + (l.model ?? "—") + "/" + (l.provider ?? "—") + " " + (l.latency_ms ?? "—") + "ms" + (l.error_category ? " err=" + l.error_category : "")).join("\n") : "No logs yet.");
735
+ }
736
+ if (name === "list_traces") {
737
+ const limit = Math.min(Math.max(Number(args.limit) || 20, 1), 100);
738
+ const result = await api("/api/v1/insights/projects/" + encodeURIComponent(projectId) + "/traces?limit=" + limit, {}, token);
739
+ if (!result.ok) return err("Failed (" + result.status + ")");
740
+ const traces = result.data.items || [];
741
+ return say(traces.length ? traces.map((t) => (t.started_at ?? "") + " [" + (t.status ?? "?") + " · " + (t.spans?.length ?? t.span_count ?? 0) + " spans] " + (t.id ?? "")).join("\n") : "No traces yet.");
742
+ }
743
+ if (name === "usage_summary") {
744
+ const days = [1, 7, 30].includes(Number(args.days)) ? Number(args.days) : 7;
745
+ const result = await api("/api/v1/insights/projects/" + encodeURIComponent(projectId) + "/metrics?days=" + days, {}, token);
746
+ if (!result.ok) return err("Failed (" + result.status + ")");
747
+ const m = result.data;
748
+ return say("Requests: " + (m.requests ?? 0) + " · success rate: " + (m.success_rate ?? 0) + "% · p50: " + (m.p50_latency_ms ?? "—") + "ms · p95: " + (m.p95_latency_ms ?? "—") + "ms · cost: $" + Number(m.cost ?? 0).toFixed(4) + " (last " + days + " day" + (days === 1 ? "" : "s") + ")");
749
+ }
750
+ if (name === "list_models") {
751
+ const result = await api("/api/v1/models?project_id=" + encodeURIComponent(projectId), {}, token);
752
+ if (!result.ok) return err("Failed (" + result.status + ")");
753
+ const models = result.data.models || result.data.items || result.data || [];
754
+ const list = Array.isArray(models) ? models : [];
755
+ return say(list.length ? list.map((mm) => (mm.provider ?? "—") + "/" + (mm.id ?? mm.model ?? "—") + " [ctx " + (mm.context_window ?? mm.context ?? "?") + "]").join("\n") : "No models returned.");
677
756
  }
678
757
  if (name === "list_security_groups") {
679
758
  const result = await api("/api/v1/projects/" + encodeURIComponent(projectId) + "/security-groups", {}, token);
680
- if (!result.ok) return { isError: true, content: [{ type: "text", text: "Failed (" + result.status + "): " + (result.data?.message || result.data?.error || "") }] };
759
+ if (!result.ok) return err("Failed (" + result.status + "): " + (result.data?.message || result.data?.error || ""));
681
760
  const groups = result.data.items || [];
682
- return { content: [{ type: "text", text: groups.length ? groups.map((g) => g.name + " [" + (g.enabled ? "enabled" : "disabled") + " · " + (g.rules || []).length + " rules · " + (g.runtime_ids || []).length + " runtimes] id=" + g.id).join("\n") : "No security groups." }] };
761
+ return say(groups.length ? groups.map((g) => g.name + " [" + (g.enabled ? "enabled" : "disabled") + " · " + (g.rules || []).length + " rules · " + (g.runtime_ids || []).length + " runtimes] id=" + g.id).join("\n") : "No security groups.");
762
+ }
763
+ if (name === "security_activity") {
764
+ const result = await api("/api/v1/projects/" + encodeURIComponent(projectId) + "/security-groups/activity", {}, token);
765
+ if (!result.ok) return err("Failed (" + result.status + "): " + (result.data?.message || result.data?.error || ""));
766
+ const events = result.data.items || [];
767
+ return say(events.length ? events.slice(0, 20).map((e) => (e.created_at ?? "") + " " + (e.event_type ?? "?") + (e.data?.reason ? " · " + e.data.reason : "")).join("\n") : "No security activity yet.");
683
768
  }
684
769
  if (name === "quota") {
685
770
  const result = await api("/api/v1/projects/" + encodeURIComponent(projectId) + "/rate-plans", {}, token);
686
- if (!result.ok) return { isError: true, content: [{ type: "text", text: "Failed (" + result.status + ")" }] };
771
+ if (!result.ok) return err("Failed (" + result.status + ")");
687
772
  const plans = result.data.items || result.data.plans || [];
688
- return { content: [{ type: "text", text: plans.length ? JSON.stringify(plans, null, 2) : "No rate plans configured; end-user metering is inactive for this project." }] };
773
+ return say(plans.length ? JSON.stringify(plans, null, 2) : "No rate plans configured; end-user metering is inactive for this project.");
689
774
  }
690
- if (name === "recent_logs") {
691
- const limit = Math.min(Math.max(Number(args?.limit) || 20, 1), 50);
692
- const runtimesResult = await api("/api/v1/runtimes?project_id=" + encodeURIComponent(projectId) + "&limit=50", {}, token);
693
- const runtimes = runtimesResult.ok ? (runtimesResult.data.runtimes || runtimesResult.data.items || []) : [];
694
- if (!runtimes.length) return { content: [{ type: "text", text: "No runtimes — no logs yet." }] };
695
- const logsResult = await api("/api/v1/runtimes/" + encodeURIComponent(runtimes[0].id) + "/logs?limit=" + limit, {}, token);
696
- if (!logsResult.ok) return { isError: true, content: [{ type: "text", text: "Logs failed (" + logsResult.status + ")" }] };
697
- const logs = logsResult.data.logs || logsResult.data.items || [];
698
- return { content: [{ type: "text", text: logs.length ? logs.map((l) => (l.created_at ?? "") + " [" + (l.status ?? "?") + "] " + (l.model ?? "—") + "/" + (l.provider ?? "—") + " " + (l.latency_ms ?? "—") + "ms" + (l.error_category ? " err=" + l.error_category : "")).join("\n") : "No logs yet." }] };
775
+ if (name === "list_end_users") {
776
+ const search = args.search ? "&search=" + encodeURIComponent(String(args.search)) : "";
777
+ const result = await api("/api/v1/projects/" + encodeURIComponent(projectId) + "/end-users?limit=50" + search, {}, token);
778
+ if (!result.ok) return err("Failed (" + result.status + ")");
779
+ const users = result.data.end_users || result.data.items || [];
780
+ return say(users.length ? users.map((u) => (u.external_id ?? u.id) + (u.display_name ? " — " + u.display_name : "") + (u.rate_plan_id ? " [plan " + u.rate_plan_id + "]" : "")).join("\n") : "No end users yet.");
781
+ }
782
+ if (name === "upsert_end_user") {
783
+ if (!args.external_id) return err("external_id is required");
784
+ const body = { external_id: String(args.external_id) };
785
+ if (args.display_name) body.display_name = String(args.display_name);
786
+ if (args.email) body.email = String(args.email);
787
+ if (args.rate_plan_id) body.rate_plan_id = String(args.rate_plan_id);
788
+ const result = await api("/api/v1/projects/" + encodeURIComponent(projectId) + "/end-users", { method: "POST", body: JSON.stringify(body) }, token);
789
+ if (!result.ok) return err("Failed (" + result.status + "): " + (result.data?.message || result.data?.error || ""));
790
+ return say("End user " + (result.data.external_id ?? args.external_id) + " saved.");
791
+ }
792
+ if (name === "list_api_keys") {
793
+ const result = await api("/api/v1/apikeys?project_id=" + encodeURIComponent(projectId), {}, token);
794
+ if (!result.ok) return err("Failed (" + result.status + ")");
795
+ const keys = result.data.api_keys || result.data.items || [];
796
+ return say(keys.length ? keys.map((k) => (k.name ?? "key") + " [" + (k.environment ?? "—") + " · " + (k.status ?? (k.revoked ? "revoked" : "active")) + " · prefix " + (k.prefix ?? k.key_prefix ?? "—") + "]").join("\n") : "No API keys.");
797
+ }
798
+ if (name === "list_webhooks") {
799
+ const result = await api("/api/v1/webhooks?project_id=" + encodeURIComponent(projectId), {}, token);
800
+ if (!result.ok) return err("Failed (" + result.status + ")");
801
+ const webhooks = result.data.items || [];
802
+ return say(webhooks.length ? webhooks.map((w) => (w.url ?? "endpoint") + " [" + (w.events || []).length + " events · " + (w.active ? "active" : "inactive") + "]").join("\n") : "No webhooks.");
803
+ }
804
+ if (name === "list_backups") {
805
+ const runtimeId = await resolveRuntimeId(token, projectId, args.runtime_id);
806
+ if (!runtimeId) return err("No runtimes in this project.");
807
+ const result = await api("/api/v1/insights/runtimes/" + encodeURIComponent(runtimeId) + "/backups", {}, token);
808
+ if (!result.ok) return err("Failed (" + result.status + ")");
809
+ const backups = result.data.items || result.data.backups || [];
810
+ return say(backups.length ? backups.map((b) => (b.created_at ?? "") + " [" + (b.status ?? "?") + (b.size_bytes ? " · " + b.size_bytes + " bytes" : "") + "] " + (b.id ?? "")).join("\n") : "No backups yet.");
811
+ }
812
+ if (name === "create_backup") {
813
+ const runtimeId = await resolveRuntimeId(token, projectId, args.runtime_id);
814
+ if (!runtimeId) return err("No runtimes in this project.");
815
+ const result = await api("/api/v1/insights/runtimes/" + encodeURIComponent(runtimeId) + "/backups", { method: "POST" }, token);
816
+ if (!result.ok) return err("Failed (" + result.status + "): " + (result.data?.message || result.data?.error || ""));
817
+ return say("Backup queued for runtime " + runtimeId + ".");
699
818
  }
700
- return { isError: true, content: [{ type: "text", text: "Unknown tool: " + name }] };
819
+ return err("Unknown tool: " + name);
701
820
  }
702
821
 
703
822
  function commandMcp() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zyntry",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "The Zyntry CLI — run AI inference, manage runtimes, security groups, and end-user metering from the terminal. Ships with a built-in MCP server for Claude Code, Cursor, and Windsurf.",
5
5
  "license": "MIT",
6
6
  "type": "module",