Skip to main content
Glama
OpenSIPS

OpenSIPS MCP Server

Official
by OpenSIPS

observability_inject_prometheus

Inject Prometheus monitoring into an OpenSIPS configuration by adding required module loads and parameters for HTTP server and statistics. Idempotent and warns if port conflicts exist.

Instructions

Add prometheus.so (and httpd.so if missing) to an OpenSIPS cfg.

Most scenarios do not load prometheus.so by default. This tool adds the minimum lines needed for the Prometheus scrape config and Grafana dashboards to actually work:

  1. loadmodule "httpd.so" (if missing)

  2. loadmodule "prometheus.so"

  3. modparam("prometheus", "statistics", "") — expose all groups

  4. modparam("httpd", "port", <prom_port>) (if missing)

Idempotent: re-running on a cfg that already loads prometheus.so is a no-op. Returns warnings if httpd is configured for a different port (the scrape job needs to target that port instead).

Parameters

config_content: Existing OpenSIPS configuration text. prom_port: TCP port the httpd module should listen on. Default 8888.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
config_contentYes
prom_portNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations provided, so description must cover behaviors. It discloses idempotency and warnings about port conflicts, but does not state what the tool returns (the modified config) or any side effects like overwriting existing parameters. This is a gap for a mutation tool.

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 well-structured with a clear purpose statement, a numbered list of actions, and a parameter section. Every sentence serves a purpose; no unnecessary words.

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 tool's complexity (config injection with multiple steps) and lack of annotations, the description covers purpose, parameters, idempotency, and warnings. It assumes knowledge of OpenSIPS but is sufficient for the target audience. The presence of an output schema partially covers return values.

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 the description adds clear explanations for both parameters: config_content is existing config text, prom_port is the TCP port with default 8888. This fully compensates for the schema's lack of descriptions and adds usage context.

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 adds prometheus.so and httpd.so to an OpenSIPS config, listing the exact lines. It distinguishes from sibling tools like cfg_add_module and other observability tools by focusing specifically on enabling Prometheus monitoring.

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?

The description explains that most scenarios don't load prometheus.so by default, implying use when enabling Prometheus. It mentions idempotency and return warnings, providing context. However, it doesn't explicitly compare to alternatives like cfg_edit for general config changes.

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