Skip to content

gateway_call

On this page you will learn how the agent calls tools of integrations connected to your MMW project, and why the integration’s secrets never reach the model.

The running example: the agent reads docs/deploy.md from the team repository through the github_readonly integration to compare it with the staging deploy fact.

gateway_call calls one tool of an external MCP integration that the user enabled for the project in their account. Integration tokens and keys are stored on the MMW server and are never passed to the model. Only integrations explicitly enabled for the key’s project are reachable.

The same integration tools also appear in the tool list under their own names, for example github_readonly.get_file_contents. Calling them directly is equivalent to gateway_call.

ParameterTypeDefaultDescription
serverstring— (required)Integration name, for example github_readonly. No dots.
toolstring— (required)Integration action name, for example get_file_contents. No dots.
argumentsobject— (required)Action parameters, following the integration tool’s schema.
project_idstring or nullnullProject to run the call in. Defaults to the key’s project.

The response is the integration tool’s result as the integration returned it. For MCP integrations this is usually an object with a content field (a list of text blocks). MMW adds nothing to it.

arguments
{
"server": "github_readonly",
"tool": "get_file_contents",
"arguments": {
"owner": "acme",
"repo": "platform",
"path": "docs/deploy.md",
"ref": "main"
}
}
{
"content": [
{
"type": "text",
"text": "# Deploys\n\nstaging: systemd unit app-staging ..."
}
]
}

The set of tools and their parameters is defined by the integration. For GitHub (read-only) these include get_file_contents (owner, repo, path, ref), pull_request_read (owner, repo, pull_number, method, page, per_page) and get_me with no parameters.

TextCause
invalid gateway server or tool nameEmpty name or a dot in server or tool. Pass github_readonly and get_file_contents separately.
gateway project not foundThe given project_id does not exist or is inactive.
gateway tool not foundNo such tool among the project’s enabled integrations, or the integration is disabled or failed its health check.
required downstream secret is missingThe integration’s secret (token) is not configured in your account.
downstream tool is not allowlistedThe tool is not on the integration’s allowed list.
project call limit exceededThe project’s per-minute call limit is used up.
project gateway concurrency limit exceededToo many concurrent integration calls in the project.
downstream timeoutThe integration did not answer in time.
downstream response size limit exceededThe integration’s response exceeded the allowed size.
downstream transport failure, downstream JSON-RPC errorFailure on the integration side.
[MMW Notice]: …No subscription or suspended account.
  • Integrations are connected in your account, in the “MCP gateway” section. Without a connected integration, gateway_call has nothing to call and the list of integration tools is empty.
  • For ChatGPT connections (beta), gateway_call and integration tools are not available: only the memory tools are.
  • Integration calls are recorded in the project’s audit log (without secrets).
  • The openWorldHint: true annotation tells the client the tool reaches an external system, so it may ask for confirmation.