Skip to main content
Glama
OpenSIPS

OpenSIPS MCP Server

Official
by OpenSIPS

tls_delete

Delete an existing TLS domain configuration from OpenSIPS by specifying the domain name.

Instructions

Remove a TLS domain configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool handler function for tls_delete — removes a TLS domain configuration by delegating to CRUD layer.
    @mcp.tool()
    @audited("tls_delete")
    @require_permission("db.write")
    async def tls_delete(ctx: Context, domain: str) -> dict[str, Any]:
        """Remove a TLS domain configuration."""
        from opensips_mcp.db.crud import tls as crud
    
        app = ctx.request_context.lifespan_context
        async with app.db_session_factory() as session:
            deleted = await crud.delete_tls_domain(session, domain)
            if not deleted:
                return {"error": "TLS domain not found", "deleted": False}
            return {"domain": domain, "deleted": True}
  • Input schema is implicit via the function signature — takes a single 'domain: str' parameter. No explicit Pydantic schema is defined.
    @mcp.tool()
    @audited("tls_delete")
    @require_permission("db.write")
    async def tls_delete(ctx: Context, domain: str) -> dict[str, Any]:
        """Remove a TLS domain configuration."""
        from opensips_mcp.db.crud import tls as crud
    
        app = ctx.request_context.lifespan_context
        async with app.db_session_factory() as session:
            deleted = await crud.delete_tls_domain(session, domain)
            if not deleted:
                return {"error": "TLS domain not found", "deleted": False}
            return {"domain": domain, "deleted": True}
  • Registered as an MCP tool via the @mcp.tool() decorator on the async function.
    @mcp.tool()
  • CRUD helper that executes the SQL DELETE statement against the tls_mgm table using SQLAlchemy.
    async def delete_tls_domain(session: AsyncSession, domain: str) -> bool:
        stmt = delete(TLSDomain).where(TLSDomain.domain == domain)
        result = await session.execute(stmt)
        await session.commit()
        return result.rowcount > 0
  • SQLAlchemy model for the tls_mgm table that the delete operation targets.
    class TLSDomain(Base):
        __tablename__ = "tls_mgm"
    
        id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
        domain: Mapped[str] = mapped_column(String(64), nullable=False)
        match_ip_address: Mapped[str] = mapped_column(String(255), default="")
        match_sip_domain: Mapped[str] = mapped_column(String(255), default="")
        type: Mapped[int] = mapped_column(Integer, default=1)  # 1=client, 2=server
        method: Mapped[str] = mapped_column(String(16), default="TLSv1_2")
        verify_cert: Mapped[int] = mapped_column(Integer, default=1)
        require_cert: Mapped[int] = mapped_column(Integer, default=1)
        certificate: Mapped[str | None] = mapped_column(Text, nullable=True)
        private_key: Mapped[str | None] = mapped_column(Text, nullable=True)
        ca_list: Mapped[str | None] = mapped_column(Text, nullable=True)
        ca_dir: Mapped[str] = mapped_column(String(255), default="")
        cipher_list: Mapped[str] = mapped_column(String(255), default="")
        dh_params: Mapped[str | None] = mapped_column(Text, nullable=True)
        ec_curve: Mapped[str] = mapped_column(String(64), default="")
Behavior2/5

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

No annotations exist, so the description must carry behavioral context. It only states the operation without disclosing side effects (e.g., irreversibility, service impact, or confirmation requirements).

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 a single, efficient sentence that conveys the core purpose without any extraneous information.

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

Completeness2/5

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

Given the presence of multiple TLS sibling tools and an output schema, the description lacks details on return value, error conditions, and whether the domain must exist, making it incomplete for an agent to confidently use.

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

Parameters2/5

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

The only parameter 'domain' has no schema description (0% coverage). The tool description does not elaborate on what 'domain' means (e.g., format, examples, or how to specify it), failing to compensate for the schema gap.

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 action ('Remove') and the resource ('a TLS domain configuration'), which is specific and distinguishes it from sibling tools like tls_add or tls_update.

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

Usage Guidelines2/5

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

No guidance provided on when to use this tool vs alternatives, prerequisites, or effects of deletion (e.g., whether the domain must exist, if TLS is reloaded).

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