Skip to main content
Glama

Detach a channel

detach_channel
DestructiveIdempotent

Detach an organization channel from an agent, ending the binding attach_channel made. The channel stays in the organization for other agents, and the agent stops receiving its events. Detaching a channel that is not attached changes nothing. Slack is the exception: the agent owns its Slack app, so this tool detaches nothing and returns the step a person takes to remove the app. Otherwise it returns the agent and channel with attached false, and already when the channel was not attached. Requires connecting a Valet account.

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": {
      "name": "<name>",
      "channel": "<channel>"
    },
    "name": "detach_channel"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe agent's name, as list_services shows it: the agent to detach the channel from.
channelYesThe name the channel is attached under, from list_channels.
org_nameNoThe Valet organization the agent belongs to. Omit to use the organization the account joined first.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "agent": {
      -        "description": "Name of the agent the call acted on.",
      -        "type": "string"
      -      },
      -      "already": {
      -        "description": "True when the channel was already in this state before the call, so nothing changed. Absent when this call changed it.",
      -        "type": "boolean"
      -      },
      -      "attached": {
      -        "description": "True when the channel is attached to the agent after the call, false when it is not. attach_channel always reports true; detach_channel always reports false.",
      -        "type": "boolean"
      -      },
      -      "channel": {
      -        "description": "Name the channel is attached under, which is the name detach_channel takes.",
      -        "type": "string"
      -      },
      -      "org": {
      -        "description": "Name of the Valet organization the call acted in.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "org",
      -      "agent",
      -      "channel",
      -      "attached"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "org": {
      -        "description": "Name of the Valet organization the call acted in.",
      -        "type": "string"
      -      },
      -      "step": {
      -        "description": "What the person does in a browser, such as authorizing a service. Nothing has changed until they do it.",
      -        "type": "string"
      -      },
      -      "url": {
      -        "description": "Address of the page where the person finishes the step. Absent when the page has no address to give.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "org",
      -      "step"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "agent": {
      +        "description": "Name of the agent the call acted on.",
      +        "type": "string"
      +      },
      +      "already": {
      +        "description": "True when the channel was not attached to the agent, so nothing changed. Absent when this call detached it.",
      +        "type": "boolean"
      +      },
      +      "attached": {
      +        "description": "Always false: the agent no longer holds the channel after the call.",
      +        "type": "boolean"
      +      },
      +      "channel": {
      +        "description": "Name the channel is attached under, which is the name detach_channel takes.",
      +        "type": "string"
      +      },
      +      "org": {
      +        "description": "Name of the Valet organization the call acted in.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "org",
      +      "agent",
      +      "channel",
      +      "attached"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "org": {
      +        "description": "Name of the Valet organization the call acted in.",
      +        "type": "string"
      +      },
      +      "step": {
      +        "description": "What the person does to detach a Slack channel, which belongs to the agent: remove its Slack app. Returned instead of a detach result; nothing has changed until they do it.",
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Address of the page where the person finishes the step. Absent when the page has no address to give.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "org",
      +      "step"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / name / description
      Previous value: -"The agent's name."New value: +"The agent's name, as list_services shows it: the agent to detach the channel from."
  3. Changed3 schema fields changed
    • changedInput schema / properties / channel / description
      Previous value: -"Required. The name the channel is attached under, from list_channels."New value: +"The name the channel is attached under, from list_channels."
    • changedInput schema / properties / name / description
      Previous value: -"Required. The agent's name."New value: +"The agent's name."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "agent": {
      +          "description": "Name of the agent the call acted on.",
      +          "type": "string"
      +        },
      +        "already": {
      +          "description": "True when the channel was already in this state before the call, so nothing changed. Absent when this call changed it.",
      +          "type": "boolean"
      +        },
      +        "attached": {
      +          "description": "True when the channel is attached to the agent after the call, false when it is not. attach_channel always reports true; detach_channel always reports false.",
      +          "type": "boolean"
      +        },
      +        "channel": {
      +          "description": "Name the channel is attached under, which is the name detach_channel takes.",
      +          "type": "string"
      +        },
      +        "org": {
      +          "description": "Name of the Valet organization the call acted in.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "org",
      +        "agent",
      +        "channel",
      +        "attached"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "org": {
      +          "description": "Name of the Valet organization the call acted in.",
      +          "type": "string"
      +        },
      +        "step": {
      +          "description": "What the person does in a browser, such as authorizing a service. Nothing has changed until they do it.",
      +          "type": "string"
      +        },
      +        "url": {
      +          "description": "Address of the page where the person finishes the step. Absent when the page has no address to give.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "org",
      +        "step"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  4. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond annotations by explaining that the channel remains in the organization, the agent stops receiving events, detaching an unattached channel is a no-op, Slack is a special case, and return values are described. It also discloses the Valet account prerequisite, which annotations do not cover.

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?

Front-loads the core action and packs useful edge-case behavior into a compact paragraph. A few phrases are awkward, such as 'and already when the channel was not attached,' but there is little wasted text.

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?

Complete for a destructive, idempotent operation: it covers the effect, no-op behavior, exception path, return semantics, and authentication prerequisite. With annotations, full schema coverage, and an output schema, no critical agent-facing detail 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 description coverage is 100%, so the input schema already documents all three parameters, including the optional org_name default. The description adds no parameter-level detail beyond the schema, making the baseline 3 appropriate.

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

Purpose5/5

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

States a specific verb and resource (detach a channel from an agent) and explicitly ties it to the binding that attach_channel created, so an agent can distinguish it from attach_channel and destroy_channel without opening schemas.

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?

Explains the expected context (undoing an attach_channel binding) and the Slack exception where the tool detaches nothing and instead returns manual removal steps. It does not contrast with destroy_channel or other channel siblings, so some guidance is left implicit.

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.

Resources