---
title: "Invoke a tool on an MCP script connection"
method: POST
path: "/api/script-connections/{id}/mcp-call"
tags: ["Script Connections"]
---

# Invoke a tool on an MCP script connection

`POST /api/script-connections/{id}/mcp-call`

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `tool` string, required
  - `arguments` object

## Response `200`

MCP call result

- union
  - object
    - `ok` true, required
    - `result` object, required
      - `content` object[], required
        - `type` string, required
        - `text` string
      - `isError` boolean
  - object
    - `ok` false, required
    - `error` union, required
      - object
        - `code` number
        - `message` string
        - `data` unknown
      - string

## Other responses

- `400` — Invalid MCP connection or request
- `403` — Not allowed to invoke this MCP connection
- `404` — Script connection or agent not found

---

[API](https://skmtc.net/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.net/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/versions/ef761849166b/schema)
