OpenAPI → Tool
Turn any OpenAPI/Swagger spec into a runnable InTouch connector — deterministically, at zero AI cost. The tool transcribes the spec (base URL, auth scheme, operations) into a data-driven InTouch tool; it never asks an LLM, so nothing is hallucinated.
This is the meta-tool behind InTouch's own hub-building pipeline: InTouch uses its own engine to generate its connector library.
What it produces
For input name=nasa-apod, writes <outDir>/nasa-apod/:
tool.iml— inputs (apiKey,operation, path params,query,body), one python step, publishesresult+statusnasa_apod.py— a generic executor with an embeddedOPERATIONStable (one urllib request loop, stdlib only)manifest.yaml—type: tool,source: yamlREADME.md— operations, auth, usage
Inputs
| Input | Required | Notes |
|---|---|---|
specUrl |
yes | OpenAPI spec URL or absolute file path (JSON; YAML if PyYAML present) |
name |
yes | kebab-case connector name |
outDir |
yes | absolute staging dir the server can write; output lands in <outDir>/<name>/ |
category |
no | hub category (default General) |
maxOps |
no | max operations to transcribe, GETs first (default 6) |
auth |
no | override detected auth: basic | bearer | header:Name | query:name |
base |
no | override the base URL |
Auth detection
Reads the spec's securitySchemes / securityDefinitions and emits one of:
basic, bearer, header:<Name> (apiKey-in-header), or query:<name> (apiKey-in-query, e.g.
NASA/NYTimes ?api-key=). Override with auth when a spec is wrong or ambiguous. OAuth2/JWT
specs are out of scope — this scaffold authenticates with a single apiKey.
Validation (built in)
Before reporting success the tool runs a two-stage gate:
py_compilethe generated executor (syntax).- Execute it with a bogus operation (no network) — it must emit clean JSON with an
"unknown operation" error, not a Python traceback. This catches the runtime-but-not-syntax
class of bugs (e.g.
nullvsNone, a missing import) that a compile check alone passes.
status/valid reflect the gate; problem carries the reason on failure. A connector is only
promotion-eligible when valid=true.
Outputs
status, valid, toolName, toolDir, base, auth, opsCount, operations, problem.
Example
specUrl: https://api.apis.guru/v2/specs/nasa.gov/apod/1.0.0/openapi.json
name: nasa-apod
category: Reference
outDir: /opt/intouch/hub-staging/tools
→ writes /opt/intouch/hub-staging/tools/nasa-apod/ with auth query:api_key, base
https://api.nasa.gov/planetary, validated and ready to promote.
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
authbaseerroroperationoperationsopsCountproblemstatustoolDirtoolNamevalid
Input Properties
Every property this tool accepts, from its own tool.iml.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
specUrl |
string | yes | — | URL (or absolute file path) of the OpenAPI/Swagger spec (JSON, or YAML if PyYAML is present). |
name |
string | yes | — | Connector name (kebab-case). Becomes the tool/dir name, e.g. 'nasa-apod'. |
category |
string | no | General |
Hub category, e.g. 'Finance', 'News', 'DevOps'. |
maxOps |
string | no | 6 |
Max operations to transcribe (GETs picked first). Default 6. |
outDir |
string | yes | — | Absolute staging directory the server can write. The tool is written to |
auth |
string | no | — | Override the detected auth: basic | bearer | header:Name | query:name. Leave blank to auto-detect. |
base |
string | no | — | Override the base URL. Leave blank to derive from the spec's servers/host. |
baseUrl |
string | no | — | Path parameter for the operations whose URL contains {baseUrl}. |
query |
string | no | — | Query-string parameters as a JSON object string, e.g. {"limit": 50}. Parsed and url-encoded onto the request. |