@cloudgrid-io/mcp 0.5.2 → 0.5.3
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/README.md +3 -1
- package/package.json +1 -1
- package/src/tools.js +64 -5
package/README.md
CHANGED
|
@@ -79,7 +79,9 @@ also work in the web edition where no CLI exists. `cloudgrid_login` writes the s
|
|
|
79
79
|
| `cloudgrid_logout` | `cloudgrid logout` | Sign out and clear local credentials. Destructive. |
|
|
80
80
|
| `cloudgrid_status` | `cloudgrid status` | Org dashboard or entity detail. Read-only. |
|
|
81
81
|
| `cloudgrid_info` | `cloudgrid info` | Entity metadata. Read-only. |
|
|
82
|
-
| `
|
|
82
|
+
| `cloudgrid_get` | `cloudgrid get grids\|entities\|spaces` | List grids, entities, or spaces. Read-only. |
|
|
83
|
+
| `cloudgrid_describe_grid` | `cloudgrid describe grid <slug>` | Grid detail. Read-only. |
|
|
84
|
+
| `cloudgrid_pickup` | `cloudgrid pickup <name>` | Download an entity's source and bind the folder. |
|
|
83
85
|
| `cloudgrid_rename` | `cloudgrid rename` | Rename an entity's display name. |
|
|
84
86
|
| `cloudgrid_unplug` | `cloudgrid unplug` | Take an entity off the grid. Destructive; requires confirm. |
|
|
85
87
|
| `cloudgrid_delete` | `cloudgrid delete entity` | Archive an inspiration. Destructive; requires confirm. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudgrid-io/mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "MCP server for CloudGrid. Three editions: a local stdio server (full toolset), a hosted web server (light, CLI-free toolset), and a public docs server (search_cloudgrid_documentation) over MCP Streamable HTTP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/tools.js
CHANGED
|
@@ -94,7 +94,9 @@ export const CLI_TOOL_VERBS = {
|
|
|
94
94
|
cloudgrid_logout: ["logout"],
|
|
95
95
|
cloudgrid_status: ["status"],
|
|
96
96
|
cloudgrid_info: ["info"],
|
|
97
|
-
|
|
97
|
+
cloudgrid_get: ["get"],
|
|
98
|
+
cloudgrid_describe_grid: ["describe"],
|
|
99
|
+
cloudgrid_pickup: ["pickup"],
|
|
98
100
|
cloudgrid_rename: ["rename"],
|
|
99
101
|
cloudgrid_unplug: ["unplug"],
|
|
100
102
|
cloudgrid_delete: ["delete"],
|
|
@@ -1103,12 +1105,69 @@ export function registerTools(server, ctx) {
|
|
|
1103
1105
|
}),
|
|
1104
1106
|
);
|
|
1105
1107
|
|
|
1108
|
+
// cloudgrid_get is the single canonical lister for grids, entities, and spaces
|
|
1109
|
+
// (wraps `cloudgrid get <resource> --json`). It replaces the former
|
|
1110
|
+
// cloudgrid_grid (which wrapped only `get entities`) — retired here so there is
|
|
1111
|
+
// exactly one way to list entities. resource="entities" reproduces the old
|
|
1112
|
+
// cloudgrid_grid behaviour with `grid` mapping to the CLI's `--grid` flag.
|
|
1106
1113
|
server.tool(
|
|
1107
|
-
"
|
|
1108
|
-
"List entities
|
|
1109
|
-
{
|
|
1114
|
+
"cloudgrid_get",
|
|
1115
|
+
"List CloudGrid grids, entities, or spaces. Wraps `cloudgrid get <grids|entities|spaces> --json`.",
|
|
1116
|
+
{
|
|
1117
|
+
resource: z.enum(["grids", "entities", "spaces"]).describe("What to list: grids, entities, or spaces."),
|
|
1118
|
+
grid: z.string().optional().describe("Grid slug (entities/spaces only). Omit for the active grid."),
|
|
1119
|
+
kind: z.enum(["app", "agent", "inspiration"]).optional().describe("Filter by kind (entities only)."),
|
|
1120
|
+
status: z.enum(["charged", "live", "dark", "archived"]).optional().describe("Filter by status (entities only)."),
|
|
1121
|
+
space: z.string().optional().describe("Only entities scoped to this space slug (entities only)."),
|
|
1122
|
+
archived: z.boolean().optional().describe("Include archived entities (entities only)."),
|
|
1123
|
+
},
|
|
1124
|
+
{ readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
1125
|
+
cliTool(({ resource, grid, kind, status, space, archived }) => {
|
|
1126
|
+
const args = ["get", resource];
|
|
1127
|
+
// --grid applies to entities and spaces; grids has no such flag.
|
|
1128
|
+
if (grid && resource !== "grids") args.push("--grid", grid);
|
|
1129
|
+
if (resource === "entities") {
|
|
1130
|
+
if (kind) args.push("--kind", kind);
|
|
1131
|
+
if (status) args.push("--status", status);
|
|
1132
|
+
if (space) args.push("--space", space);
|
|
1133
|
+
if (archived) args.push("--archived");
|
|
1134
|
+
}
|
|
1135
|
+
args.push("--json");
|
|
1136
|
+
return args;
|
|
1137
|
+
}),
|
|
1138
|
+
);
|
|
1139
|
+
|
|
1140
|
+
server.tool(
|
|
1141
|
+
"cloudgrid_describe_grid",
|
|
1142
|
+
"Show a grid's detail: role, members, spaces, tier, wildcard-TLS state. Wraps `cloudgrid describe grid <slug> --json`.",
|
|
1143
|
+
{ grid: z.string().describe("Grid slug to describe.") },
|
|
1110
1144
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
1111
|
-
cliTool(({ grid }) =>
|
|
1145
|
+
cliTool(({ grid }) => ["describe", "grid", grid, "--json"]),
|
|
1146
|
+
);
|
|
1147
|
+
|
|
1148
|
+
server.tool(
|
|
1149
|
+
"cloudgrid_pickup",
|
|
1150
|
+
"Download an entity's source + cloudgrid.yaml and link the folder to it. Overwrites with --force. Wraps `cloudgrid pickup`.",
|
|
1151
|
+
{
|
|
1152
|
+
name: z.string().describe("Entity slug or id to pick up."),
|
|
1153
|
+
target_dir: z.string().optional().describe("Directory to pick up into (relative to cwd). Defaults to the entity name."),
|
|
1154
|
+
grid: z.string().optional().describe("Grid to resolve the entity in. Defaults to the active grid."),
|
|
1155
|
+
version: z.string().optional().describe("Pick up an older version's source instead of HEAD."),
|
|
1156
|
+
force: z.boolean().optional().describe("Pick up into a non-empty directory."),
|
|
1157
|
+
no_bind: z.boolean().optional().describe("Download source only — skip cloudgrid.yaml and the link."),
|
|
1158
|
+
cwd: z.string().optional().describe("Working directory the CLI runs in. The download lands here; pass an explicit, writable directory."),
|
|
1159
|
+
},
|
|
1160
|
+
{ readOnlyHint: false, destructiveHint: true, openWorldHint: true },
|
|
1161
|
+
cliTool(({ name, target_dir, grid, version, force, no_bind }) => {
|
|
1162
|
+
const args = ["pickup", name];
|
|
1163
|
+
if (target_dir) args.push(target_dir);
|
|
1164
|
+
// The CLI's pickup --help exposes `--org <slug>` (legacy naming) for the grid.
|
|
1165
|
+
if (grid) args.push("--org", grid);
|
|
1166
|
+
if (version) args.push("--version", version);
|
|
1167
|
+
if (force) args.push("--force");
|
|
1168
|
+
if (no_bind) args.push("--no-bind");
|
|
1169
|
+
return args;
|
|
1170
|
+
}, { cwdParam: true }),
|
|
1112
1171
|
);
|
|
1113
1172
|
|
|
1114
1173
|
server.tool(
|