A monorepo platform for building and orchestrating MCP servers, integrating multiple client types (GraphQL, OpenAPI, HTTP, CLI) with tool proxying, code execution, and web UI
Junction exposes a single synthetic tool 'junction__run_code' that acts as a code execution gateway to other tools. The tool has a well-structured input schema with two parameters (code: required string, timeoutMs: optional number), both with descriptions. The tool description is comprehensive (500+ chars) and explains the `tools` facade, result unwrapping, error handling, and sandboxing. However, the tool combines multiple concerns (code execution, tool discovery, tool invocation, result transformation) into one interface, violating single-responsibility. The description is verbose and could be optimized for LLM parsing. No output schema is documented, the description states 'Return a JSON-serializable value' but does not specify the structure of successful vs. failed responses. Error handling is mentioned ('throws a JS exception') but lacks recovery guidance for the LLM.
Execute JavaScript against this profile's brokered tools instead of calling them one-by-one. Inside your code, a `tools` facade is available: `tools.search({query})` finds tools by keyword and returns an array of matches, `tools.describe.tool("<namespace>.<tool>")` returns a tool's full schema, and `tools.<namespace>.<tool>(args)` calls it directly and returns its result (await it). ALL THREE already return usable objects/arrays — `tools.search(...)` and `tools.describe.tool(...)` are pre-parsed just like a direct tool call's result (e.g. `(await tools.search({query:"repo"}))[0].name`, `(await tools.describe.tool("github.search_repos")).inputSchema`) — you never need to JSON.parse any of them yourself. The facade exposes ONLY the tools already visible to you in this session's tool list — nothing broader. A tool call's result is ALREADY UNWRAPPED to a usable value: a JSON response body comes back as the parsed object/array (e.g. `(await tools.qa.greet({name})).greeting`), plain-text output comes back as a string, and a multi-part response comes back as an array — never the raw MCP content envelope, so you never need to hand-parse it. A tool call that fails (upstream error, or the tool's own response signaling failure) throws a JS exception — wrap calls in try/catch if you need to handle a failure without aborting the whole script. Prefer this over many separate tool calls when you need to loop, filter, transform, or combine results across several calls: one run_code call with a few tool invocations inside it costs far fewer tokens than the same work done as separate top-level tool calls, because intermediate results never round-trip through your context. Return a JSON-serializable value from your code (the last expression, or an explicit `return`) — it becomes this call's result. console.log/emit() output is captured and returned as logs. Runs sandboxed with a wall-clock timeout; every tool call your code makes is individually audited exactly like a direct call.
No output schema documented. Tool description states results are 'JSON-serializable' but does not specify structure of success, failure, or console.log output. LLMs cannot plan downstream actions without knowing return type.
Tool combines code execution, tool discovery (tools.search), tool introspection (tools.describe.tool), and tool invocation into one interface. Violates single-responsibility principle, should be split into separate tools or clearly documented as a meta-tool.
Error handling guidance is minimal. Description mentions 'throws a JS exception' but does not explain how LLMs should handle failures, retry logic, or distinguish retryable vs. fatal errors.
Tool description is verbose (500+ chars) and mixes implementation details (QuickJS sandbox, wall-clock timeout) with user-facing guidance. Should be condensed to 150-250 chars with implementation details in separate docs.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 57 | 2026-07-28+ | v2 |
timeoutMs parameter lacks constraints. No minimum/maximum specified. LLMs could pass 0, negative, or extremely large values. Should document valid range (e.g., 100-300000 ms).