Skip to main content
Glama

Assign an integration to an agent

assign_agent_integration

Assign an integration to an agent

Gives a voice agent access to one integration, so its tools become callable during a call. The integration must belong to the account that owns the agent, which for a reseller key is the customer account, not the reseller. The enabledTools field decides which of the integration actions the assistant may call: null means the recommended default set for that integration type, an empty array means the assistant may call nothing, and a list of tool names means exactly those tools and no others. Tool names are the name values from the integration tool catalogue. A list may only name tools the permissions of the integration allow (permitted in the catalogue, see GET /integrations/{id}/permissions); a tool outside them is refused with 422 and error code tool_not_permitted, while a malformed list or an unknown tool name stays a 400 validation_error. Assigning an integration that is already assigned returns 409. After the row is written the new tool set is pushed to the voice engine; if that push fails the assignment is rolled back and the request returns 502, so the response always reflects the live agent.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "agentId": "<agentId>",
      "body": "<body>"
    },
    "name": "assign_agent_integration"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesThe integration to assign, and optionally the tools to enable. Omit `enabledTools` to accept the recommended default set. Only catalogue-backed integration types accept a tool list.
agentIdYesIdentifier of the voice agent. Accepted either as the public form `agent_12` or as the bare number `12`; the prefix is stripped before the lookup.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations by disclosing concrete failure modes: 422 `tool_not_permitted` for a tool outside the integration's permitted set, 400 `validation_error` for a malformed or unknown tool list, 409 for a duplicate assignment, and 502 with rollback when the push to the voice engine fails. It also explains that the response reflects the live agent state, which is exactly what an agent needs to reason about retries.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded: the effect comes first, then account scoping, then tool-list semantics, then error behavior. The only waste is the opening line repeating the title verbatim before the real explanation begins.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description covers the return contract in prose ('the response always reflects the live agent') and enumerates the error outcomes. For a two-parameter mutation with no output schema, nothing an agent needs to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already spells out the null / empty-array / named-list semantics of `enabledTools` and the `agent_12` vs `12` form of `agentId`. The description adds the permission constraint on tool names and the error-code split, but most of its parameter explanation restates what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Assign an integration to an agent') and immediately clarifies the effect: the voice agent can call that integration's tools during a call. The 'voice agent' framing implicitly separates it from the chatbot variants in the sibling list, though neither sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear preconditions (the integration must belong to the account that owns the agent; for a reseller key that is the customer account) and tells the agent what happens when the integration is already assigned (409). It does not name the alternative tool to use to change tools on an existing assignment, so the routing is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.