Skip to main content
Glama
gerred

MCP Server Replicate

get_webhook_secret

Retrieve the signing secret to verify webhook requests from Replicate API, ensuring secure validation of incoming notifications for image generation workflows.

Instructions

Get the signing secret for verifying webhook requests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary MCP tool handler for 'get_webhook_secret'. Registers the tool and implements the logic by calling the ReplicateClient's get_webhook_secret method.
    @mcp.tool()
    async def get_webhook_secret() -> str:
        """Get the signing secret for verifying webhook requests."""
        async with ReplicateClient(api_token=os.getenv("REPLICATE_API_TOKEN")) as client:
            return await client.get_webhook_secret()
  • The ReplicateClient helper method that performs the actual HTTP GET request to /webhooks/default/secret to retrieve the webhook signing secret.
    async def get_webhook_secret(self) -> str:
        """Get the signing secret for the default webhook endpoint.
        
        This secret is used to verify that webhook requests are coming from Replicate.
        
        Returns:
            The webhook signing secret
            
        Raises:
            Exception: If the API request fails
        """
        if not self.client:
            raise RuntimeError("Client not initialized. Check error property for details.")
    
        try:
            response = await self.http_client.get("/webhooks/default/secret")
            response.raise_for_status()
            data = response.json()
            
            return data["key"]
    
        except httpx.HTTPError as err:
            logger.error(f"HTTP error getting webhook secret: {str(err)}")
            raise Exception(f"Failed to get webhook secret: {str(err)}") from err
        except Exception as err:
            logger.error(f"Failed to get webhook secret: {str(err)}")
            raise Exception(f"Failed to get webhook secret: {str(err)}") from err
  • Stub/placeholder handler in webhook_tools.py (possibly unused or alternative implementation). Raises NotImplementedError.
    @mcp.tool(
        name="get_webhook_secret",
        description="Get the signing secret for verifying webhook requests.",
    )
    async def get_webhook_secret() -> str:
        """Get webhook signing secret."""
        raise NotImplementedError
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 mentions the tool retrieves a secret for verification purposes but lacks details on permissions required, whether the secret is sensitive or reusable, rate limits, or error conditions. This leaves significant gaps in understanding the tool's behavior.

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, clear sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and efficiently communicates the essential information, making it highly concise and well-structured.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It covers the basic purpose but lacks context on security implications, return format, or integration with sibling tools like 'verify_webhook', which could enhance completeness for an AI agent.

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

Parameters4/5

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

The tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description does not need to compensate for any parameter documentation gaps, so it meets the baseline expectation for a parameterless tool by not introducing confusion.

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 specific action ('Get') and resource ('signing secret for verifying webhook requests'), making the tool's purpose immediately understandable. It distinguishes this tool from its sibling 'verify_webhook' by focusing on retrieving the secret rather than performing verification.

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

Usage Guidelines3/5

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

The description implies usage context (when webhook verification is needed) but does not explicitly state when to use this tool versus alternatives like 'verify_webhook'. No guidance is provided on prerequisites, timing, or exclusions, leaving usage somewhat ambiguous.

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/gerred/mcp-server-replicate'

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