Skip to main content
Glama
OpenSIPS

OpenSIPS MCP Server

Official
by OpenSIPS

cluster_drain_node

Gracefully drain a cluster node for maintenance by disabling it in the clusterer and waiting for dialog backlog to clear, preventing call drops during node shutdown.

Instructions

Gracefully drain a cluster node ahead of maintenance.

Marks the node as disabled in the clusterer, then polls the local dialog count until it stops declining or the timeout fires. The caller is expected to stop the OpenSIPS process only after this tool confirms the dialog backlog is low.

This tool operates on the cluster metadata — it does NOT shut OpenSIPS down. Combine with your init-script / systemd unit to actually stop the service.

Parameters

cluster_id: Target cluster ID. node_id: Target node ID within the cluster. timeout_sec: Maximum time to wait for dialogs to drain. Clamped to 5..600. poll_interval_sec: Seconds between dialog-count samples. Clamped to 1..60.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cluster_idYes
node_idYes
timeout_secNo
poll_interval_secNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, description carries full burden. It details marking node disabled, polling dialog count, timeout behavior, and clamping of parameters. It doesn't cover re-enabling or failure modes, but sufficiently describes core behavior.

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?

Concise and well-structured: brief intro, a key behavioral note, then a parameter table. Front-loaded with purpose. No redundant sentences; every sentence adds value.

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?

Given presence of output schema, description doesn't need to detail return values. It covers the drain process, timeout behavior, and post-condition instructions. Complete for the tool's complexity.

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

Parameters5/5

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

Schema has 0% description coverage, but description includes a dedicated Parameters section explaining each parameter's role, including clamping ranges for timeout_sec and poll_interval_sec. This adds significant meaning beyond schema fields.

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?

Description clearly states 'Gracefully drain a cluster node ahead of maintenance' with specific verb (drain) and resource (cluster node). It explains the process (mark disabled, poll dialogs) and distinguishes from sibling tools by focusing on draining vs. other cluster operations.

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?

Provides explicit usage context: maintenance prep, expected to stop OpenSIPS only after confirmation, and recommends combining with init-script/systemd. Does not explicitly mention when NOT to use, but the guidance is clear and practical.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OpenSIPS/opensips-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server