Skip to main content
Glama
ntk148v

alertmanager-mcp-server

get_silences

Retrieve and manage active alert silences from Alertmanager to monitor and control notification suppression.

Instructions

Get list of all silences

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNo
countNo
offsetNo

Implementation Reference

  • The main handler function for the 'get_silences' MCP tool. It is decorated with @mcp.tool, handles input parameters for filter, count, and offset, validates pagination, fetches silences from the Alertmanager /api/v2/silences endpoint, and applies pagination using helper functions.
    @mcp.tool(description="Get list of all silences")
    async def get_silences(filter: Optional[str] = None,
                           count: int = DEFAULT_SILENCE_PAGE,
                           offset: int = 0):
        """Get list of all silences
    
        Parameters
        ----------
        filter
            Filtering query (e.g. alertname=~'.*CPU.*')"),
        count
            Number of silences to return per page (default: 10, max: 50).
        offset
            Number of silences to skip before returning results (default: 0).
            To paginate through all results, make multiple calls with increasing
            offset values (e.g., offset=0, offset=10, offset=20, etc.).
    
        Returns
        -------
        dict
            A dictionary containing:
            - data: List of Silence objects for the current page
            - pagination: Metadata about pagination (total, offset, count, has_more)
              Use the 'has_more' flag to determine if additional pages are available.
        """
        # Validate pagination parameters
        count, offset, error = validate_pagination_params(
            count, offset, MAX_SILENCE_PAGE)
        if error:
            return {"error": error}
    
        params = None
        if filter:
            params = {"filter": filter}
    
        # Get all silences from the API
        all_silences = make_request(
            method="GET", route="/api/v2/silences", params=params)
    
        # Apply pagination and return results
        return paginate_results(all_silences, count, offset)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a 'get' operation, implying read-only behavior, but doesn't mention pagination (implied by count/offset parameters), rate limits, authentication needs, or what 'silences' represent in this context. This leaves significant gaps for an agent to understand how the tool behaves.

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 extremely concise with a single sentence, 'Get list of all silences,' which is front-loaded and wastes no words. It efficiently conveys the core purpose without unnecessary elaboration, making it easy to parse quickly.

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 tool's complexity (3 parameters with 0% schema coverage, no annotations, no output schema), the description is inadequate. It doesn't explain what 'silences' are, how filtering works, pagination behavior, or return values, leaving the agent with insufficient information to use the tool effectively.

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?

Schema description coverage is 0%, so the description must compensate but fails to do so. It mentions no parameters, while the input schema includes 'filter,' 'count,' and 'offset' with defaults but no descriptions. The description adds no meaning beyond the schema, leaving parameters undocumented and their purposes 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 'Get list of all silences' clearly states the action (get) and resource (silences), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_silence' (singular) or specify scope beyond 'all,' leaving some ambiguity about what distinguishes this tool from its siblings.

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 is provided on when to use this tool versus alternatives like 'get_silence' (singular) or 'get_alert_groups.' The description lacks context about use cases, prerequisites, or exclusions, offering minimal help for an agent to choose correctly among siblings.

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