@cloudgrid-io/mcp 0.20.9 → 0.20.10
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/tools/cli.js +10 -2
- package/src/tools/register.js +23 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudgrid-io/mcp",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.10",
|
|
4
4
|
"description": "Use CloudGrid via MCP to brainstorm, build, deploy, and improve apps, games, websites, dashboards, and tools and get a live URL - templates, recipes, managed databases and AI, instant single-page publish, and full-app deploys, for developers and non-technical users. Three editions: local stdio (full toolset), hosted web (light, CLI-free), and a public docs-search server, over MCP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/tools/cli.js
CHANGED
|
@@ -307,11 +307,19 @@ export async function runCloudgrid(args, opts = {}, deps = {}) {
|
|
|
307
307
|
let runtimeHint = null;
|
|
308
308
|
|
|
309
309
|
const extract = (err) => {
|
|
310
|
-
|
|
310
|
+
let detail = [err && err.stdout, err && err.stderr, err && err.message]
|
|
311
311
|
.filter(Boolean)
|
|
312
312
|
.join("\n")
|
|
313
313
|
.trim();
|
|
314
|
-
|
|
314
|
+
// Voice rule (founder directive: the verb is `grid`, only): exec errors
|
|
315
|
+
// embed the raw invocation (a cloudgrid binary path, the cli-shim, or an
|
|
316
|
+
// npx spec). Normalize the displayed command to `grid <verb>` so the model
|
|
317
|
+
// never learns and repeats a deprecated verb from an error message.
|
|
318
|
+
detail = detail.replace(
|
|
319
|
+
/Command failed:[^\n]*?(?= (?:init|plug|logs|status|info|get|describe|pickup|rename|unplug|delete|rollback|versions|env|secrets|scaffold|doctor|open|use|whoami|logout|visibility|feedback|login|dev|recipes|hooks|--)\b)/g,
|
|
320
|
+
"Command failed: grid",
|
|
321
|
+
);
|
|
322
|
+
return new Error(detail || "grid command failed");
|
|
315
323
|
};
|
|
316
324
|
|
|
317
325
|
// 1. Bundled CLI — own node_modules only, version-gated. Runs via
|
package/src/tools/register.js
CHANGED
|
@@ -842,7 +842,7 @@ export function registerTools(server, ctx) {
|
|
|
842
842
|
|
|
843
843
|
regTool(
|
|
844
844
|
"grid_create_project",
|
|
845
|
-
"Register a new CloudGrid app or agent, optionally seeding a web service. Wraps `
|
|
845
|
+
"Register a new CloudGrid app or agent, optionally seeding a web service. Wraps `grid init`.",
|
|
846
846
|
{
|
|
847
847
|
kind: z.enum(["app", "agent"]).describe("Entity kind."),
|
|
848
848
|
name: z.string().describe("Slug: 3-40 lowercase alphanumerics and hyphens."),
|
|
@@ -870,7 +870,7 @@ export function registerTools(server, ctx) {
|
|
|
870
870
|
|
|
871
871
|
regTool(
|
|
872
872
|
"grid_view_logs",
|
|
873
|
-
"Tail recent logs for an entity. Does not stream; returns a snapshot. Wraps `
|
|
873
|
+
"Tail recent logs for an entity. Does not stream; returns a snapshot. Wraps `grid logs`.",
|
|
874
874
|
{
|
|
875
875
|
name: z.string().optional().describe("Entity name. Omit to use the entity linked to the current directory."),
|
|
876
876
|
tail: z.number().int().positive().optional().describe("Number of recent lines. Default 100."),
|
|
@@ -888,7 +888,7 @@ export function registerTools(server, ctx) {
|
|
|
888
888
|
|
|
889
889
|
regTool(
|
|
890
890
|
"grid_share",
|
|
891
|
-
"Set an entity's visibility and print its URL. Defaults to link (anyone with the URL). Wraps `
|
|
891
|
+
"Set an entity's visibility and print its URL. Defaults to link (anyone with the URL). Wraps `grid visibility set`.",
|
|
892
892
|
{
|
|
893
893
|
name: z.string().describe("Entity slug."),
|
|
894
894
|
mode: z.enum(["link", "private", "authenticated", "grid"]).optional().describe("Visibility mode. Default link."),
|
|
@@ -899,7 +899,7 @@ export function registerTools(server, ctx) {
|
|
|
899
899
|
|
|
900
900
|
regTool(
|
|
901
901
|
"grid_feedback",
|
|
902
|
-
"List recent feedback events for the active org. Read-only. Wraps `
|
|
902
|
+
"List recent feedback events for the active org. Read-only. Wraps `grid feedback list`.",
|
|
903
903
|
{
|
|
904
904
|
since: z.string().optional().describe("Only events newer than this, e.g. 24h, 7d."),
|
|
905
905
|
limit: z.number().int().positive().max(200).optional().describe("Number of events. Default 50, max 200."),
|
|
@@ -920,7 +920,7 @@ export function registerTools(server, ctx) {
|
|
|
920
920
|
|
|
921
921
|
regTool(
|
|
922
922
|
"grid_whoami",
|
|
923
|
-
"Show the signed-in user and active org. Wraps `
|
|
923
|
+
"Show the signed-in user and active org. Wraps `grid whoami`.",
|
|
924
924
|
{},
|
|
925
925
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
926
926
|
cliTool(() => ["whoami"]),
|
|
@@ -928,7 +928,7 @@ export function registerTools(server, ctx) {
|
|
|
928
928
|
|
|
929
929
|
regTool(
|
|
930
930
|
"grid_switch_grid",
|
|
931
|
-
"Switch the active org. Wraps `
|
|
931
|
+
"Switch the active org. Wraps `grid use`.",
|
|
932
932
|
{ org: z.string().describe("Org slug to switch to.") },
|
|
933
933
|
{ readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
934
934
|
cliTool(({ org }) => ["use", org]),
|
|
@@ -936,7 +936,7 @@ export function registerTools(server, ctx) {
|
|
|
936
936
|
|
|
937
937
|
regTool(
|
|
938
938
|
"grid_logout",
|
|
939
|
-
"Sign out and clear local credentials. Wraps `
|
|
939
|
+
"Sign out and clear local credentials. Wraps `grid logout`.",
|
|
940
940
|
{},
|
|
941
941
|
{ readOnlyHint: false, destructiveHint: true, openWorldHint: true },
|
|
942
942
|
cliTool(() => ["logout"]),
|
|
@@ -944,7 +944,7 @@ export function registerTools(server, ctx) {
|
|
|
944
944
|
|
|
945
945
|
regTool(
|
|
946
946
|
"grid_status",
|
|
947
|
-
"Org dashboard, entity detail, or deploy snapshot. Wraps `
|
|
947
|
+
"Org dashboard, entity detail, or deploy snapshot. Wraps `grid status`.",
|
|
948
948
|
{ name: z.string().optional().describe("Entity name or trace id. Omit for the org dashboard.") },
|
|
949
949
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
950
950
|
cliTool(({ name }) => (name ? ["status", name] : ["status"])),
|
|
@@ -952,7 +952,7 @@ export function registerTools(server, ctx) {
|
|
|
952
952
|
|
|
953
953
|
regTool(
|
|
954
954
|
"grid_info",
|
|
955
|
-
"Show metadata for a CloudGrid entity. Wraps `
|
|
955
|
+
"Show metadata for a CloudGrid entity. Wraps `grid info`.",
|
|
956
956
|
{ name: z.string().optional().describe("Entity name. Omit for the entity linked to the current directory.") },
|
|
957
957
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
958
958
|
cliTool(({ name }) => {
|
|
@@ -963,13 +963,13 @@ export function registerTools(server, ctx) {
|
|
|
963
963
|
);
|
|
964
964
|
|
|
965
965
|
// grid_get is the single canonical lister for grids, entities, and spaces
|
|
966
|
-
// (wraps `
|
|
966
|
+
// (wraps `grid get <resource> --json`). It replaces the former
|
|
967
967
|
// cloudgrid_grid (which wrapped only `get entities`) — retired here so there is
|
|
968
968
|
// exactly one way to list entities. resource="entities" reproduces the old
|
|
969
969
|
// cloudgrid_grid behaviour with `grid` mapping to the CLI's `--grid` flag.
|
|
970
970
|
regTool(
|
|
971
971
|
"grid_get",
|
|
972
|
-
"List CloudGrid grids, entities, or spaces. Wraps `
|
|
972
|
+
"List CloudGrid grids, entities, or spaces. Wraps `grid get <grids|entities|spaces> --json`.",
|
|
973
973
|
{
|
|
974
974
|
resource: z.enum(["grids", "entities", "spaces"]).describe("What to list: grids, entities, or spaces."),
|
|
975
975
|
grid: z.string().optional().describe("Grid slug (entities/spaces only). Omit for the active grid."),
|
|
@@ -996,7 +996,7 @@ export function registerTools(server, ctx) {
|
|
|
996
996
|
|
|
997
997
|
regTool(
|
|
998
998
|
"grid_describe_grid",
|
|
999
|
-
"Show a grid's detail: role, members, spaces, tier, wildcard-TLS state. Wraps `
|
|
999
|
+
"Show a grid's detail: role, members, spaces, tier, wildcard-TLS state. Wraps `grid describe grid <slug> --json`.",
|
|
1000
1000
|
{ grid: z.string().describe("Grid slug to describe.") },
|
|
1001
1001
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
1002
1002
|
cliTool(({ grid }) => ["describe", "grid", grid, "--json"]),
|
|
@@ -1004,7 +1004,7 @@ export function registerTools(server, ctx) {
|
|
|
1004
1004
|
|
|
1005
1005
|
regTool(
|
|
1006
1006
|
"grid_edit_existing_app",
|
|
1007
|
-
"Download an entity's source + cloudgrid.yaml and link the folder to it. Overwrites with --force. Wraps `
|
|
1007
|
+
"Download an entity's source + cloudgrid.yaml and link the folder to it. Overwrites with --force. Wraps `grid pickup`.",
|
|
1008
1008
|
{
|
|
1009
1009
|
name: z.string().describe("Entity slug or id to pick up."),
|
|
1010
1010
|
target_dir: z.string().optional().describe("Directory to pick up into (relative to cwd). Defaults to the entity name."),
|
|
@@ -1029,7 +1029,7 @@ export function registerTools(server, ctx) {
|
|
|
1029
1029
|
|
|
1030
1030
|
regTool(
|
|
1031
1031
|
"grid_rename",
|
|
1032
|
-
"Rename a CloudGrid entity's display name (slug stays the same). Wraps `
|
|
1032
|
+
"Rename a CloudGrid entity's display name (slug stays the same). Wraps `grid rename`.",
|
|
1033
1033
|
{
|
|
1034
1034
|
name: z.string().describe("Entity slug."),
|
|
1035
1035
|
new_name: z.string().describe("New display name."),
|
|
@@ -1040,7 +1040,7 @@ export function registerTools(server, ctx) {
|
|
|
1040
1040
|
|
|
1041
1041
|
regTool(
|
|
1042
1042
|
"grid_take_offline",
|
|
1043
|
-
"Take an entity off the grid. Destructive. Wraps `
|
|
1043
|
+
"Take an entity off the grid. Destructive. Wraps `grid unplug`.",
|
|
1044
1044
|
{
|
|
1045
1045
|
name: z.string().describe("Entity slug to take down (required)."),
|
|
1046
1046
|
confirm: z.literal(true).describe("Must be true to proceed."),
|
|
@@ -1051,7 +1051,7 @@ export function registerTools(server, ctx) {
|
|
|
1051
1051
|
|
|
1052
1052
|
regTool(
|
|
1053
1053
|
"grid_delete",
|
|
1054
|
-
"Archive a CloudGrid inspiration. Destructive. Wraps `
|
|
1054
|
+
"Archive a CloudGrid inspiration. Destructive. Wraps `grid delete entity`.",
|
|
1055
1055
|
{
|
|
1056
1056
|
name: z.string().describe("Entity slug to delete (required)."),
|
|
1057
1057
|
confirm: z.literal(true).describe("Must be true to proceed."),
|
|
@@ -1062,7 +1062,7 @@ export function registerTools(server, ctx) {
|
|
|
1062
1062
|
|
|
1063
1063
|
regTool(
|
|
1064
1064
|
"grid_rollback_deploy",
|
|
1065
|
-
"Rollback an entity to a previous version. Wraps `
|
|
1065
|
+
"Rollback an entity to a previous version. Wraps `grid rollback`.",
|
|
1066
1066
|
{
|
|
1067
1067
|
name: z.string().describe("Entity slug."),
|
|
1068
1068
|
to: z.string().optional().describe("Target version tag or id. Omit to roll back one version."),
|
|
@@ -1077,7 +1077,7 @@ export function registerTools(server, ctx) {
|
|
|
1077
1077
|
|
|
1078
1078
|
regTool(
|
|
1079
1079
|
"grid_list_versions",
|
|
1080
|
-
"List published versions for an entity. Wraps `
|
|
1080
|
+
"List published versions for an entity. Wraps `grid versions`.",
|
|
1081
1081
|
{ name: z.string().optional().describe("Entity name. Omit for the entity linked to the current directory.") },
|
|
1082
1082
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
1083
1083
|
cliTool(({ name }) => {
|
|
@@ -1089,7 +1089,7 @@ export function registerTools(server, ctx) {
|
|
|
1089
1089
|
|
|
1090
1090
|
regTool(
|
|
1091
1091
|
"grid_set_env",
|
|
1092
|
-
"Manage environment variables for an entity. Wraps `
|
|
1092
|
+
"Manage environment variables for an entity. Wraps `grid env`.",
|
|
1093
1093
|
{
|
|
1094
1094
|
action: z.enum(["get", "set", "list"]).describe("get, set, or list."),
|
|
1095
1095
|
name: z.string().describe("Entity slug."),
|
|
@@ -1113,7 +1113,7 @@ export function registerTools(server, ctx) {
|
|
|
1113
1113
|
|
|
1114
1114
|
regTool(
|
|
1115
1115
|
"grid_set_secret",
|
|
1116
|
-
"Set or list secret names for an entity. Never returns secret values. Wraps `
|
|
1116
|
+
"Set or list secret names for an entity. Never returns secret values. Wraps `grid secrets`.",
|
|
1117
1117
|
{
|
|
1118
1118
|
action: z.enum(["set", "list"]).describe("set or list (names only)."),
|
|
1119
1119
|
name: z.string().describe("Entity slug."),
|
|
@@ -1133,7 +1133,7 @@ export function registerTools(server, ctx) {
|
|
|
1133
1133
|
|
|
1134
1134
|
regTool(
|
|
1135
1135
|
"grid_scaffold",
|
|
1136
|
-
"Scaffold service folders declared in cloudgrid.yaml (idempotent). Wraps `
|
|
1136
|
+
"Scaffold service folders declared in cloudgrid.yaml (idempotent). Wraps `grid scaffold`.",
|
|
1137
1137
|
{
|
|
1138
1138
|
cwd: z.string().optional().describe("Working directory. The CLI runs in this directory. Defaults to the MCP server's working directory."),
|
|
1139
1139
|
},
|
|
@@ -1143,7 +1143,7 @@ export function registerTools(server, ctx) {
|
|
|
1143
1143
|
|
|
1144
1144
|
regTool(
|
|
1145
1145
|
"grid_diagnose",
|
|
1146
|
-
"Run CloudGrid diagnostics on the local environment. Wraps `
|
|
1146
|
+
"Run CloudGrid diagnostics on the local environment. Wraps `grid doctor`.",
|
|
1147
1147
|
{},
|
|
1148
1148
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
1149
1149
|
cliTool(() => ["doctor"]),
|
|
@@ -1151,7 +1151,7 @@ export function registerTools(server, ctx) {
|
|
|
1151
1151
|
|
|
1152
1152
|
regTool(
|
|
1153
1153
|
"grid_get_url",
|
|
1154
|
-
"Return the public URL for an entity. Does not open a browser. Wraps `
|
|
1154
|
+
"Return the public URL for an entity. Does not open a browser. Wraps `grid open --print`.",
|
|
1155
1155
|
{ name: z.string().optional().describe("Entity name. Omit for the entity linked to the current directory.") },
|
|
1156
1156
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
1157
1157
|
cliTool(({ name }) => {
|