opentestmcp 0.3.2 → 0.3.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.
Files changed (2) hide show
  1. package/dist/server.js +20 -0
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -857,6 +857,26 @@ export function createServer() {
857
857
  });
858
858
  }
859
859
  });
860
+ server.tool("share_endpoints_with_ui", "Push discovered or verified endpoints into the OpenTest Flow Playground so the user can see them, test them, and convert selected endpoints into hosted MCP tools. Use this after verify_endpoints_live or when the user explicitly asks to stream endpoints to the UI.", {
861
+ endpoints: z.array(z.any()).describe("Endpoints to push. Each item should include method plus path/path_template/url; include schemas when available."),
862
+ upstream_base_url: z.string().optional().describe("Default upstream base URL for testing and MCP generation, e.g. http://127.0.0.1:8000 or https://api.example.com"),
863
+ intent: z.string().optional().describe("Short label for the session, e.g. 'Login endpoint' or 'Auth endpoints'"),
864
+ session_id: z.string().optional().describe("Optional existing session id to append/replace. Omit to create a new session."),
865
+ }, async (args) => {
866
+ try {
867
+ const result = await callBackend("share_endpoints_with_ui", args);
868
+ return { content: [{ type: "text", text: JSON.stringify(result) }] };
869
+ }
870
+ catch (e) {
871
+ return toolError(e.message, inferErrorCode(e.message), {
872
+ next_actions: [
873
+ "Make sure OPENTEST_API_KEY is set or run opentest_login, then retry.",
874
+ "If the Flow UI opens but is empty, confirm OPENTEST_BACKEND points to the same backend that received this push.",
875
+ ],
876
+ related_tools: ["verify_endpoints_live", "mcp_preview", "opentest_status"],
877
+ });
878
+ }
879
+ });
860
880
  server.tool("mcp_preview", "Pick endpoints matching an intent and generate a tool-schema preview. Also writes the same two-pane HTML to opentest-mcp/mcp-preview-last.html and returns preview_file_url — use Cursor Simple Browser or `node opentest-mcp/scripts/open-cursor-preview.mjs` if the inline MCP app panel does not appear. LLM selection when OPENAI_API_KEY is set on the backend; else keyword match. Does NOT write to the DB.", {
861
881
  intent: z.string().describe("Free text like 'auth endpoints' or 'everything related to orders'"),
862
882
  endpoints: z.array(z.any()).describe("Candidate endpoints (typically the confirmed bucket from verify_endpoints_live)"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opentestmcp",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Turn APIs into agent-callable MCP tools with auth, testing, and audit logs",
5
5
  "type": "module",
6
6
  "bin": {