For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.

agentengine agent create-tool

[Experimental] Generate connector authoring files from an OpenAPI document or an existing catalog.

Generate connector authoring files (tool.yaml and tool_defs.yaml) for the connectors preview.

Three mutually exclusive modes:

  • --spec FILE-OR-URL: Compile an OpenAPI 3.0 document into a complete catalog and scaffold tool.yaml when none exists.

  • --tool-defs FILE: Scaffold only the consumer tool.yaml for an existing local catalog. The catalog is never rewritten.

  • --config tool.yaml: Regenerate a locally owned catalog whose tool.yaml declares source.spec.

The connector name is required with --spec and defaults to the catalog's name with --tool-defs.

tool.yaml starts with an auth block proposed from the document's security schemes. OAuth 2.0 and OpenID Connect need --provider, the project OAuth app whose token each call presents; the app's grant decides whether tools call as each user or as the agent's own client. --scopes replaces the scopes the exposed operations declare. HTTP bearer, HTTP basic and API keys bind workspace secrets named after the connector, for example JIRA_TOKEN. --auth none, bearer, basic or api_keys replaces the proposal on every operation.

URL inputs are fetched under the platform transport policy. The generator runs inside the runner-base helper container, so the command requires Docker.

Exits 0 on success, 1 when the input is refused or generation fails, 2 when the helper container or a network transfer fails.

Experimental: the flags, output format, and generated file formats may change without notice.

agentengine agent create-tool [name] [flags]
--allow string Comma-separated operation allow list (default: allow_all) --auth string Credential to present instead of the one the document proposes: none, bearer, basic, or api_keys --base-url string Tenant API base URL for the authoring file --config string Existing tool.yaml that declares source.spec; regenerates its catalog-h, --help help for create-tool --out-dir string Connector folder for the generated files (required with --spec/--tool-defs) --provider string Project OAuth app whose token each call presents --scopes string Comma-separated OAuth scopes with --provider (default: the scopes the exposed operations declare) --skip-unsupported Exclude operations the preview cannot represent instead of failing; every skip is printed and recorded in the catalog's provenance --spec string OpenAPI 3.0 document (local file or HTTPS URL) to compile --timeout duration Helper container timeout (default 5m0s) --tool-defs string Existing local catalog to scaffold tool.yaml for
--log-file string override log file path --log-level string file log verbosity (error|warn|info|debug) (default "info") --no-log disable file logging-q, --quiet silence stderr below error-v, --verbose count raise stderr verbosity (-v info, -vv debug)
Rate this page