@thehammer/schema-mcp-server 1.0.14 → 1.0.15

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/dist/index.js +18 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -730,24 +730,33 @@ if (shouldRegister("quality_gate_submit_review"))
730
730
  return jsonResult(result);
731
731
  });
732
732
  if (shouldRegister("quality_gate"))
733
- server.tool("quality_gate", "Dispatch or poll the quality gate for a single category (schema, directive, or template). " +
734
- "NON-BLOCKING the call returns immediately. Response statuses: " +
733
+ server.tool("quality_gate", "BLOCKING dispatch a quality gate reviewer for a single category and wait for the " +
734
+ "result. This tool does NOT return until the reviewer finishes. Call this for each " +
735
+ "category you want reviewed (schema, directive, template) — call multiple categories " +
736
+ "in parallel so they run simultaneously. " +
737
+ "Response statuses: " +
735
738
  "'passed' means all items in the category are green (safe to move on); " +
736
- "'running' means a reviewer was dispatched (or one is already in flight) — do other " +
737
- "productive work, then call this tool again later to check status; " +
738
739
  "'failed' means items need fixes — read each item's `analysis`, apply fixes via " +
739
740
  "mutation tools (which auto-invalidate the category), then call this tool again; " +
740
741
  "'error' means the reviewer dispatch itself failed — surface the error to the user " +
741
- "via an annotation and stop on that category (do NOT retry). " +
742
- "You may call this for multiple categories in parallel. The backend is idempotent — " +
743
- "calling while a reviewer is running returns 'running' without launching a duplicate. " +
744
- "When you have no other productive work, continue polling — each call is cheap.", {
742
+ "via an annotation and stop on that category (do NOT retry).", {
745
743
  category: z
746
744
  .enum(["schema", "directive", "template"])
747
745
  .describe("The quality gate category to check. Must be one of: schema, directive, template."),
748
746
  message: messageParam,
749
747
  }, async ({ category, message }) => {
750
- const result = await api.callQualityGate(category, message);
748
+ let result = await api.callQualityGate(category, message);
749
+ // Poll until the reviewer finishes — the backend returns 'running'
750
+ // while a reviewer is in flight. We block here so the orchestrator
751
+ // agent gets a single tool result with the final verdict instead of
752
+ // burning dozens of tool calls in a polling loop.
753
+ while (result &&
754
+ typeof result === "object" &&
755
+ "status" in result &&
756
+ result.status === "running") {
757
+ await new Promise((resolve) => setTimeout(resolve, 5000));
758
+ result = await api.callQualityGate(category, message);
759
+ }
751
760
  return jsonResult(result);
752
761
  });
753
762
  if (shouldRegister("complete"))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/schema-mcp-server",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "MCP server for Schema Builder - translates Claude Code tool calls into Laravel API requests",
5
5
  "license": "MIT",
6
6
  "repository": {