Tools
9 calls. Every request needs the Authorization header: see the overview.
tools.list
Section titled “tools.list”GET /external-operationsEvery definition of the tenant, or of one namespace with { namespace }.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Response: ExternalOperation[] (200)
curl -X GET "https://api.maitento.com/external-operations" \ -H "Authorization: $MAITENTO_AUTH"const tools = await mt.tools.list();mt.tools.list()tools.delete
Section titled “tools.delete”DELETE /external-operations/by-id/{id}Deletes the definition (refused with a 400 while something still uses it or a run of it is going).
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: no body (204)
curl -X DELETE "https://api.maitento.com/external-operations/by-id/<id>" \ -H "Authorization: $MAITENTO_AUTH"await mt.tools.delete("1f2e3d4c-5b6a-4798-8a9b-cdef01234567");mt.tools.delete("f0a1b2c3-d4e5-4f6a-b7c8-d9e0f1a2b3c4")tools.get
Section titled “tools.get”GET /external-operations/by-id/{id}The definition with this id. Throws NotFoundError when there is none.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: ExternalOperation (200)
curl -X GET "https://api.maitento.com/external-operations/by-id/<id>" \ -H "Authorization: $MAITENTO_AUTH"const tool = await mt.tools.get("1f2e3d4c-5b6a-4798-8a9b-cdef01234567");mt.tools.get("f0a1b2c3-d4e5-4f6a-b7c8-d9e0f1a2b3c4")tools.disableVersion
Section titled “tools.disableVersion”POST /external-operations/by-id/{id}/versions/{version}/disableDisables one version: everything pinned to it fails closed.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
version | integer | yes |
Response: ExternalOperation (200)
curl -X POST "https://api.maitento.com/external-operations/by-id/<id>/versions/<version>/disable" \ -H "Authorization: $MAITENTO_AUTH"await mt.tools.disableVersion("1f2e3d4c-5b6a-4798-8a9b-cdef01234567", 1);mt.tools.disable_version("f0a1b2c3-d4e5-4f6a-b7c8-d9e0f1a2b3c4", 3)tools.enableVersion
Section titled “tools.enableVersion”POST /external-operations/by-id/{id}/versions/{version}/enableEnables a disabled version again.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | |
version | integer | yes |
Response: ExternalOperation (200)
curl -X POST "https://api.maitento.com/external-operations/by-id/<id>/versions/<version>/enable" \ -H "Authorization: $MAITENTO_AUTH"await mt.tools.enableVersion("1f2e3d4c-5b6a-4798-8a9b-cdef01234567", 1);mt.tools.enable_version("f0a1b2c3-d4e5-4f6a-b7c8-d9e0f1a2b3c4", 3)tools.list
Section titled “tools.list”GET /namespaces/{namespaceName}/external-operationsEvery definition of the tenant, or of one namespace with { namespace }.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespaceName | string | yes |
Response: ExternalOperation[] (200)
curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/external-operations" \ -H "Authorization: $MAITENTO_AUTH"const tools = await mt.tools.list({ namespace: "support" });mt.tools.list(namespace="demo")tools.getByName
Section titled “tools.getByName”GET /namespaces/{namespaceName}/external-operations/by-name/{name}The definition with this name in the namespace. Throws NotFoundError when there is none.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespaceName | string | yes | |
name | string | yes |
Response: ExternalOperation (200)
curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/external-operations/by-name/<name>" \ -H "Authorization: $MAITENTO_AUTH"const tool = await mt.tools.getByName("get-order", { namespace: "support" });mt.tools.get_by_name("get-order", namespace="demo")tools.createMcp
Section titled “tools.createMcp”POST /namespaces/{namespaceName}/external-operations/mcpCreates a tool over an MCP connector.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespaceName | string | yes |
Request body: McpExternalOperationCreateRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The tool’s name, unique within its namespace (under 150 characters). The model calls the tool by it. |
connectorId | uuid | yes | The id of the connector the tool calls. |
connectorVersion | integer | null | The connector version to build on. Omitted: the connector’s latest enabled version when the tool is saved. A tool version always calls one exact connector version. | |
requestBindings | ConnectorBinding[] | yes | Fixed values for fields of the request body, which the model never sees or chooses ([] for none). |
authenticationHeader | ConnectorAuthenticationHeader| null | The credential sent with every call, from a secret. The connector needs Header authentication. | |
promptGuidance | string | null | When and how to use the tool, written for the model (under 10,000 characters). Omitted: the connector’s description. | |
requiresApproval | boolean | Whether a person must approve each call before it is made. The run waits with status PendingApproval. |
Response: McpExternalOperation (200)
curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/external-operations/mcp" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"name":"...","connectorId":"...","requestBindings":[]}'await mt.tools.createMcp({ name: "search-docs", connectorId: "9b2f1c4e-6d3a-4e8b-a5c7-0f1e2d3c4b5a", requestBindings: [] }, { namespace: "support" });mt.tools.create_mcp(name="search-docs", connector_id="e5f6a7b8-c9d0-4e1f-a2b3-c4d5e6f7a8b9", namespace="demo")tools.createOpenApi
Section titled “tools.createOpenApi”POST /namespaces/{namespaceName}/external-operations/open-apiCreates a tool over an OpenAPI connector.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
namespaceName | string | yes |
Request body: OpenApiExternalOperationCreateRequest
| Field | Type | Required | Description |
|---|---|---|---|
pathBindings | ConnectorBinding[] | yes | Fixed values for the connector’s path parameters ([] for none). |
queryBindings | ConnectorBinding[] | yes | Fixed values for the connector’s query parameters ([] for none). |
name | string | yes | The tool’s name, unique within its namespace (under 150 characters). The model calls the tool by it. |
connectorId | uuid | yes | The id of the connector the tool calls. |
connectorVersion | integer | null | The connector version to build on. Omitted: the connector’s latest enabled version when the tool is saved. A tool version always calls one exact connector version. | |
requestBindings | ConnectorBinding[] | yes | Fixed values for fields of the request body, which the model never sees or chooses ([] for none). |
authenticationHeader | ConnectorAuthenticationHeader| null | The credential sent with every call, from a secret. The connector needs Header authentication. | |
promptGuidance | string | null | When and how to use the tool, written for the model (under 10,000 characters). Omitted: the connector’s description. | |
requiresApproval | boolean | Whether a person must approve each call before it is made. The run waits with status PendingApproval. |
Response: OpenApiExternalOperation (200)
curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/external-operations/open-api" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"pathBindings":[],"queryBindings":[],"name":"...","connectorId":"...","requestBindings":[]}'await mt.tools.createOpenApi({ name: "get-order", connectorId: "9b2f1c4e-6d3a-4e8b-a5c7-0f1e2d3c4b5a", promptGuidance: "Look up an order by its number.", requestBindings: [], pathBindings: [], queryBindings: [] }, { namespace: "support" });mt.tools.create_open_api(name="get-order", connector_id="e5f6a7b8-c9d0-4e1f-a2b3-c4d5e6f7a8b9", prompt_guidance="Look up an order by its number.", authentication_header={"headerName": "X-Api-Key", "secretId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"}, namespace="demo")