loopctl-mcp-server 1.1.0 → 1.1.1

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.js +14 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -359,10 +359,18 @@ async function reportTokenUsage({ story_id, input_tokens, output_tokens, model_n
359
359
  }
360
360
 
361
361
  async function getCostSummary({ project_id, breakdown }) {
362
- const params = new URLSearchParams({ project_id });
363
- if (breakdown) params.set("breakdown", breakdown);
362
+ let path;
363
+ if (breakdown === "agent") {
364
+ path = `/api/v1/analytics/agents?project_id=${project_id}`;
365
+ } else if (breakdown === "epic") {
366
+ path = `/api/v1/analytics/epics?project_id=${project_id}`;
367
+ } else if (breakdown === "model") {
368
+ path = `/api/v1/analytics/models?project_id=${project_id}`;
369
+ } else {
370
+ path = `/api/v1/analytics/projects/${project_id}`;
371
+ }
364
372
 
365
- const result = await apiCall("GET", `/api/v1/projects/${project_id}/cost-summary?${params}`);
373
+ const result = await apiCall("GET", path);
366
374
  return toContent(result);
367
375
  }
368
376
 
@@ -840,7 +848,8 @@ const TOOLS = [
840
848
  },
841
849
  phase: {
842
850
  type: "string",
843
- description: "Optional: phase of work (e.g. implement, review, verify).",
851
+ enum: ["planning", "implementing", "reviewing", "other"],
852
+ description: "Optional: phase of work.",
844
853
  },
845
854
  skill_version_id: {
846
855
  type: "string",
@@ -956,7 +965,7 @@ const TOOLS = [
956
965
  const server = new Server(
957
966
  {
958
967
  name: "loopctl",
959
- version: "1.1.0",
968
+ version: "1.1.1",
960
969
  },
961
970
  {
962
971
  capabilities: { tools: {} },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopctl-mcp-server",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "MCP server for loopctl — structural trust for AI development loops",
5
5
  "type": "module",
6
6
  "main": "index.js",