Skip to main content
Glama
OpenSIPS

OpenSIPS MCP Server

Official
by OpenSIPS

cfg_save_session

Persist OpenSIPS configuration sessions by writing main and local M4 files to a specified directory, with the option to preprocess and generate the final cfg file. Ensures safe output by rejecting system directories.

Instructions

Persist the m4 pair to disk, optionally also writing the preprocessed cfg.

Writes {out_dir}/opensips.cfg.m4 and {out_dir}/local.cfg.m4. When write_preprocessed is True, also runs m4 and writes {out_dir}/opensips.cfg.

The output directory is validated — writes to system directories such as /, /etc, /usr, /bin are rejected.

Parameters

out_dir: Directory that will receive the files. Created if missing. main_m4: Contents for opensips.cfg.m4. local_m4: Contents for local.cfg.m4. write_preprocessed: If True, also run m4 and write opensips.cfg.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
out_dirYes
main_m4Yes
local_m4Yes
write_preprocessedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations provided, so description must carry behavioral info. It discloses directory validation (rejects system directories) and optional m4 run. However, it does not explicitly mention file overwriting behavior or idempotency.

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?

Structured with intro, file details, validation warning, and parameter list. Slightly verbose for the parameter descriptions, but overall concise and front-loaded with key action.

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?

Covers purpose, files, optional behavior, and directory constraints. Output schema exists but not shown, so return value is not described. Still adequate for a save tool.

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 description coverage is 0%, but description provides detailed parameter descriptions (out_dir created if missing, main_m4/local_m4 contents, write_preprocessed triggers m4 run). This adds meaningful semantic context beyond titles and types.

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 clearly states the tool persists m4 pair to disk and optionally writes preprocessed cfg, with specific file paths. This distinguishes it from other cfg_* tools like cfg_diff or cfg_start_session.

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?

No explicit guidance on when to use vs alternatives. It describes functionality well but does not contrast with sibling tools like cfg_preprocess or cfg_start_session.

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