Skip to main content
Glama
ntk148v

alertmanager-mcp-server

post_silence

Create or update silences in Alertmanager to temporarily suppress notifications for specific alerts.

Instructions

Post a new silence or update an existing one

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
silenceYes

Implementation Reference

  • The main handler function for the 'post_silence' MCP tool. It is decorated with @mcp.tool, which also serves as registration. The function takes a silence dict and POSTs it to the Alertmanager API via make_request, returning the response.
    @mcp.tool(description="Post a new silence or update an existing one")
    async def post_silence(silence: Dict[str, Any]):
        """Post a new silence or update an existing one
    
        Parameters
        ----------
        silence : dict
            A dict representing the silence to be posted. This dict should
            contain the following keys:
                - matchers: list of matchers to match alerts to silence
                - startsAt: start time of the silence
                - endsAt: end time of the silence
                - createdBy: name of the user creating the silence
                - comment: comment for the silence
    
        Returns
        -------
        dict:
            Create / update silence response from Alertmanager API.
        """
        return make_request(method="POST", route="/api/v2/silences", json=silence)
  • The @mcp.tool decorator registers the post_silence function as an MCP tool.
    @mcp.tool(description="Post a new silence or update an existing one")
  • Docstring within the handler describes the expected input schema for the silence parameter.
    silence : dict
        A dict representing the silence to be posted. This dict should
        contain the following keys:
            - matchers: list of matchers to match alerts to silence
            - startsAt: start time of the silence
            - endsAt: end time of the silence
            - createdBy: name of the user creating the silence
            - comment: comment for the silence
    
    Returns
    -------
    dict:
        Create / update silence response from Alertmanager API.
    """
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Post a new silence or update an existing one' implies a mutation operation (create or update), but it doesn't disclose any behavioral traits such as required permissions, whether updates are idempotent, what happens on conflicts, rate limits, or what the response looks like. The description is minimal and leaves critical behavioral aspects unspecified.

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?

The description is very concise—a single sentence that directly states the tool's action. It's front-loaded with the core functionality. However, it might be overly terse given the complexity implied by the nested object parameter and lack of other documentation, potentially sacrificing clarity for brevity.

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 complexity (mutation tool with a nested object parameter, no annotations, no output schema, and 0% schema description coverage), the description is incomplete. It doesn't explain what a 'silence' is, how to structure it, what the tool returns, or any error conditions. For a tool that likely manages alert silences in a monitoring system, this leaves too many gaps for effective 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 input schema has 1 parameter ('silence') with 0% description coverage, and the description provides no information about this parameter. It doesn't explain what 'silence' represents, its structure, required fields, or examples. With low schema coverage, the description fails to compensate, leaving the parameter's meaning and usage unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool can 'post a new silence or update an existing one', which provides a basic verb+resource combination. However, it's somewhat vague about what 'silence' means in this context and doesn't distinguish this tool from its sibling 'post_alerts' or explain how it differs from 'get_silence'/'get_silences'. The purpose is understandable but lacks specificity about the domain or system involved.

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?

The description provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools (e.g., delete_silence, get_silence, post_alerts), but the description doesn't explain when to create/update a silence versus deleting one, retrieving one, or posting alerts. No context about prerequisites, timing, or exclusions is mentioned.

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/ntk148v/alertmanager-mcp-server'

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