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.yaml— 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.