@insforge/mcp 1.1.3-dev.1 → 1.1.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.
@@ -1337,11 +1337,52 @@ ${JSON.stringify(metadata, null, 2)}`
1337
1337
  }
1338
1338
  })
1339
1339
  );
1340
+ server.tool(
1341
+ "get-container-logs",
1342
+ "Get latest logs from a specific container/service. Use this to help debug problems with your app.",
1343
+ {
1344
+ apiKey: z14.string().optional().describe("API key for authentication (optional if provided via --api_key)"),
1345
+ source: z14.enum(["insforge.logs", "postgREST.logs", "postgres.logs", "function.logs"]).describe("Log source to retrieve"),
1346
+ limit: z14.number().optional().default(20).describe("Number of logs to return (default: 20)")
1347
+ },
1348
+ withUsageTracking("get-container-logs", async ({ apiKey, source, limit }) => {
1349
+ try {
1350
+ const actualApiKey = getApiKey(apiKey);
1351
+ const queryParams = new URLSearchParams();
1352
+ if (limit) queryParams.append("limit", limit.toString());
1353
+ const response = await fetch2(`${API_BASE_URL}/api/logs/analytics/${source}?${queryParams}`, {
1354
+ method: "GET",
1355
+ headers: {
1356
+ "x-api-key": actualApiKey
1357
+ }
1358
+ });
1359
+ const result = await handleApiResponse(response);
1360
+ return await addBackgroundContext({
1361
+ content: [
1362
+ {
1363
+ type: "text",
1364
+ text: formatSuccessMessage(`Latest logs from ${source}`, result)
1365
+ }
1366
+ ]
1367
+ });
1368
+ } catch (error) {
1369
+ const errMsg = error instanceof Error ? error.message : "Unknown error occurred";
1370
+ return await addBackgroundContext({
1371
+ content: [
1372
+ {
1373
+ type: "text",
1374
+ text: `Error retrieving container logs: ${errMsg}`
1375
+ }
1376
+ ],
1377
+ isError: true
1378
+ });
1379
+ }
1380
+ })
1381
+ );
1340
1382
  return {
1341
1383
  apiKey: GLOBAL_API_KEY,
1342
1384
  apiBaseUrl: API_BASE_URL,
1343
- toolCount: 13
1344
- // Total number of tools registered
1385
+ toolCount: 14
1345
1386
  };
1346
1387
  }
1347
1388
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerInsforgeTools
4
- } from "./chunk-2NLTYZLX.js";
4
+ } from "./chunk-5MTS2H7O.js";
5
5
 
6
6
  // src/http/server.ts
7
7
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerInsforgeTools
4
- } from "./chunk-2NLTYZLX.js";
4
+ } from "./chunk-5MTS2H7O.js";
5
5
 
6
6
  // src/stdio/index.ts
7
7
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insforge/mcp",
3
- "version": "1.1.3-dev.1",
3
+ "version": "1.1.3",
4
4
  "description": "MCP (Model Context Protocol) server for Insforge backend-as-a-service",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",