Skip to main content
Glama

Disconnect an agent environment

disconnect_agent_environment
DestructiveIdempotent

Disconnect an agent environment from a project. Sessions stop being picked up, any session running in the project is stopped, and the stored key is deleted. The environment itself stays on the platform until the owner deletes it there.

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": {
      "project_id": "<project_id>",
      "provider": "<provider>"
    },
    "name": "disconnect_agent_environment"
  }
}

Input Schema

NameRequiredDescriptionDefault
providerYesThe agent platform: anthropic (Managed Agents) or openai (Agents API).
project_idYesThe project's id, as returned by create_project or list_projects.

Output Schema

NameRequiredDescriptionDefault
deletedYestrue once it is gone.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description goes well beyond them by enumerating exactly what is destroyed: session pickup stops, any running session in the project is stopped, and the stored key is deleted. It also clarifies what is NOT destroyed (the environment remains on the platform), which is the single most important fact for an agent deciding whether to call this.

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

Conciseness5/5

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

Three short sentences with zero padding; the core action comes first, the destructive effects follow, and the persistence caveat closes. Every sentence carries distinct information.

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

Completeness4/5

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

With an output schema present, return values need not be explained, and the description covers effects, reversibility boundary, and scope. It stops short of noting permission requirements or whether the environment can be reconnected later, minor gaps for a destructive two-parameter tool.

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%, with both project_id and the provider enum fully documented in the schema itself. The description adds no additional parameter meaning, so the baseline of 3 is appropriate when the schema carries the full burden.

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?

The description gives a specific verb and resource ('Disconnect an agent environment from a project') and immediately states the boundary condition that distinguishes it from a delete: 'The environment itself stays on the platform until the owner deletes it there.' An agent can tell this apart from connect_agent_environment and from platform-level deletion without opening the schema.

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

Usage Guidelines3/5

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

Usage is implied by the stated consequences (sessions stop being picked up, running sessions are stopped), which tells an agent when the operation is appropriate. However, there is no explicit routing guidance such as using connect_agent_environment to reattach afterward, nor any stated prerequisites or warnings about disconnecting while work is in flight.

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.