@homespunapps/mcp 1.6.57 → 1.6.58

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/dist/tools.js CHANGED
@@ -336,6 +336,13 @@ const getRowShape = {
336
336
  collection: z.string().min(1).describe("The collection name."),
337
337
  key: z.string().min(1).describe("The key of the row to fetch."),
338
338
  };
339
+ const countRowsShape = {
340
+ app_id: z.string().min(1).describe("The app id."),
341
+ collection: z
342
+ .string()
343
+ .min(1)
344
+ .describe("The collection name declared in the app's manifest."),
345
+ };
339
346
  const upsertRowShape = {
340
347
  app_id: z.string().min(1).describe("The app id."),
341
348
  collection: z.string().min(1).describe("The collection name."),
@@ -1140,6 +1147,24 @@ export const TOOLS = [
1140
1147
  }
1141
1148
  },
1142
1149
  },
1150
+ {
1151
+ name: "count_rows",
1152
+ description: "The live row count of a v2 app's collection (spec B4, issue #1056), a whole-scope total with no filter and no paging. Gated by the collection's countRead opt-in, independent of its read list: a collection that opted in returns its count even to a caller who cannot list the rows (the '3 spots left' shape), and a collection that never opted in refuses with collection_count_forbidden even for a caller who could otherwise list. Returns { count }.",
1153
+ inputSchema: countRowsShape,
1154
+ annotations: {
1155
+ title: "Count Rows",
1156
+ readOnlyHint: true,
1157
+ openWorldHint: false,
1158
+ },
1159
+ handler: async (client, args) => {
1160
+ try {
1161
+ return jsonResult(await client.countAppRows(String(args["app_id"]), String(args["collection"])));
1162
+ }
1163
+ catch (e) {
1164
+ return errorResult(e);
1165
+ }
1166
+ },
1167
+ },
1143
1168
  {
1144
1169
  name: "get_row",
1145
1170
  description: "Fetch a single row by its key from a v2 app collection, through a dedicated relay route rather than a client-side scan. Returns { row }, or an isError row_not_found.",
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.6.57";
1
+ export declare const VERSION = "1.6.58";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Single source of the package version, reported in the MCP server's
2
2
  // serverInfo. Kept in sync with package.json by the release tooling.
3
- export const VERSION = "1.6.57";
3
+ export const VERSION = "1.6.58";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@homespunapps/mcp",
3
3
  "mcpName": "dev.homespun/homespun",
4
- "version": "1.6.57",
4
+ "version": "1.6.58",
5
5
  "description": "Model Context Protocol (stdio) server for Homespun: lets any MCP client (Claude Desktop, Cursor, …) deploy a multi-user web app with hosting, auth, a shared database and permissions included.",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@modelcontextprotocol/sdk": "^1.30.0",
49
- "@homespunapps/core": "^1.6.57",
49
+ "@homespunapps/core": "^1.6.58",
50
50
  "zod": "^4.4.3"
51
51
  },
52
52
  "devDependencies": {
package/server.json CHANGED
@@ -3,14 +3,14 @@
3
3
  "name": "dev.homespun/homespun",
4
4
  "title": "Homespun",
5
5
  "description": "Deploy a multi-user web app from your agent: hosting, auth, database, and permissions.",
6
- "version": "1.6.57",
6
+ "version": "1.6.58",
7
7
  "websiteUrl": "https://homespun.dev",
8
8
  "packages": [
9
9
  {
10
10
  "registryType": "npm",
11
11
  "registryBaseUrl": "https://registry.npmjs.org",
12
12
  "identifier": "@homespunapps/mcp",
13
- "version": "1.6.57",
13
+ "version": "1.6.58",
14
14
  "transport": {
15
15
  "type": "stdio"
16
16
  },