Skip to main content
Glama
OpenSIPS

OpenSIPS MCP Server

Official
by OpenSIPS

cfg_generate_m4

Generate m4 configuration templates for OpenSIPS scenarios. Provides pair of main and local files preprocessed with m4, using scenario name, structural knobs, and site-specific m4 defines.

Instructions

Render the m4 template pair (main + local) for a scenario.

The returned strings are intended to be persisted to opensips.cfg.m4 and local.cfg.m4 respectively, then preprocessed with m4.

Parameters

scenario: Scenario name (load_balancer, class4_sbc, registrar_class5, webrtc_gateway, base). template_params: Structural/Jinja2 template knobs (e.g. include_usrloc for base). site_params: Dict of m4 defines that will appear in local.cfg.m4 (e.g. {"LISTEN": "udp:10.0.0.5:5060", "DB_URL": "mysql://..."}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scenarioYes
template_paramsNo
site_paramsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description implies read-only generation (returns strings) but does not explicitly state side effects, permissions, or safety. The behavioral traits are somewhat clear from context but not fully disclosed.

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?

The description is front-loaded with a clear purpose statement, followed by structured parameter descriptions. Each sentence adds value without redundancy or fluff.

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?

Given the presence of an output schema, the description adequately covers parameters and output purpose. Minor gaps exist (e.g., error handling, case sensitivity) but overall it is sufficiently complete for a generation 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 coverage is 0%, but the description adds concrete examples and allowed values for scenario, explains template_params as 'Structural/Jinja2 template knobs', and site_params with a dict example, providing essential meaning beyond the schema.

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 verb 'Render' and the resource 'm4 template pair (main + local) for a scenario', distinguishing it from sibling tools like cfg_generate and cfg_generate_iterative which likely generate non-m4 outputs.

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?

The description provides workflow guidance (persist to specific files then preprocess with m4) but lacks explicit when-to-use vs alternatives like cfg_generate or cfg_generate_iterative, and does not state when not to use it.

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