Skip to main content
Glama

list_webhooks

Retrieve all webhooks configured for a specific Mailchimp audience to monitor and integrate event-driven marketing actions.

Instructions

List webhooks configured for an audience.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the list_webhooks tool. It calls GET /lists/{list_id}/webhooks via the MailchimpClient, iterates over returned webhooks, extracts id/url/events/sources, and returns formatted JSON.
    @mcp.tool()
    async def list_webhooks(list_id: str) -> str:
        """List webhooks configured for an audience."""
        mc = get_client()
        data = await mc.get(f"/lists/{list_id}/webhooks")
        hooks = []
        for w in data.get("webhooks", []):
            hooks.append({
                "id": w.get("id", ""),
                "url": w.get("url", ""),
                "events": w.get("events", {}),
                "sources": w.get("sources", {}),
            })
        return _fmt({"total_items": len(hooks), "webhooks": hooks})
  • Tool registration via the @mcp.tool() decorator on the async function list_webhooks. It is registered in the FastMCP instance 'mcp' defined in the same file.
    # ══════════════════════════════════════════════════════════════════════
    # WEBHOOKS
    # ══════════════════════════════════════════════════════════════════════
    
    
    @mcp.tool()
  • The input schema is implicit — list_webhooks takes a single string parameter 'list_id' (required, no default). The return type is str (formatted JSON).
    async def list_webhooks(list_id: str) -> str:
  • Helper function _fmt is used by list_webhooks to pretty-print the response as JSON.
    def _fmt(data: Any) -> str:
        """Format response data as indented JSON string."""
        return json.dumps(data, indent=2, default=str)
Behavior2/5

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

No annotations provided, and the description does not disclose any behavioral traits such as side effects, authentication requirements, rate limits, or pagination. As a read-only list operation, it lacks explicit confirmation of safety.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely short but underspecified. Every sentence should earn its place; here, one sentence provides minimal value. It is not appropriately sized for the tool's complexity.

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?

Despite having an output schema, the description lacks context on return format, pagination, or error handling. For a simple tool with one parameter, it fails to provide sufficient information for correct invocation.

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

Parameters1/5

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

Schema description coverage is 0%, meaning no parameter descriptions. The description does not explain the 'list_id' parameter beyond implying it identifies an audience. It adds no meaningful context beyond the parameter's title.

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

Purpose4/5

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

The description clearly states the action (list), resource (webhooks), and scope (for an audience). It distinguishes from sibling tools like create_webhook and delete_webhook, but does not mention any additional details like filtering or pagination.

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 on when to use this tool versus alternatives (e.g., list_audiences). No explicit context for usage, such as prerequisites or conditions. The description simply implies its purpose without guiding selection.

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/AlexlaGuardia/mcp-mailchimp'

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