Saltar para o conteúdo principal
POST
/
public
/
api
/
v1
/
agents
/
{agentPublicId}
/
native-mcps
Link one or more Native MCP connections to the agent
curl --request POST \
  --url https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/native-mcps \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "connectionPublicIds": [
    "550e8400-e29b-41d4-a716-446655440000"
  ]
}
'
{
  "linked": 2,
  "requested": 3,
  "skipped": [
    {
      "connectionPublicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "reason": "NOT_FOUND_OR_INACTIVE"
    }
  ]
}

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

agentPublicId
string<uuid>
obrigatório

Corpo

application/json

Body for linking Native MCP (Composio) connections to an agent.

connectionPublicIds
string<uuid>[]
obrigatório

List of Native MCP connection public IDs (UUIDs) to link. Connections must be ACTIVE and belong to the same workspace as the agent. Inactive or missing connections are skipped silently and reported in the response.

Maximum array length: 50
Exemplo:
["550e8400-e29b-41d4-a716-446655440000"]

Resposta

Link operation completed (may include skips)

Result of a Native MCP (Composio) link operation.

linked
integer<int32>

Number of connections actually linked. Equals requested minus skipped entries.

Exemplo:

2

requested
integer<int32>

Number of connections submitted in the request body.

Exemplo:

3

skipped
object[]

Connections that were not linked, with a reason. Each entry corresponds to a UUID from the request body that the backend rejected (typically because the connection does not exist in the workspace or is not in ACTIVE status).