Skip to main content
Glama
SlideSpeak
by SlideSpeak

download_presentation

Retrieve a temporary download URL for a generated presentation using the request ID from a completed task.

Instructions

Get the download URL for a generated presentation.
Use the request_id returned by getTaskStatus (from a completed generation task)
to get a temporary download link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_idYes

Implementation Reference

  • The `download_presentation` tool handler function. It takes a `request_id`, makes a GET request to `/presentation/download/{request_id}` via `_make_api_request`, and returns the download URL from the API response.
    @mcp.tool()
    async def download_presentation(request_id: str) -> str:
        """
        Get the download URL for a generated presentation.
        Use the request_id returned by getTaskStatus (from a completed generation task)
        to get a temporary download link.
        """
        if not API_KEY:
            return "API Key is missing. Cannot process any requests."
    
        result = await _make_api_request("GET", f"/presentation/download/{request_id}", timeout=DEFAULT_TIMEOUT)
        if not result:
            return f"Failed to get download URL for request {request_id}."
    
        return f"Make sure to return the download URL to the user. Result: {json.dumps(result)}"
  • slidespeak.py:387-401 (registration)
    The `@mcp.tool()` decorator on line 387 registers `download_presentation` as an MCP tool with the FastMCP server. This is the registration point.
    @mcp.tool()
    async def download_presentation(request_id: str) -> str:
        """
        Get the download URL for a generated presentation.
        Use the request_id returned by getTaskStatus (from a completed generation task)
        to get a temporary download link.
        """
        if not API_KEY:
            return "API Key is missing. Cannot process any requests."
    
        result = await _make_api_request("GET", f"/presentation/download/{request_id}", timeout=DEFAULT_TIMEOUT)
        if not result:
            return f"Failed to get download URL for request {request_id}."
    
        return f"Make sure to return the download URL to the user. Result: {json.dumps(result)}"
  • The tool's docstring serves as the schema/description: accepts a single `request_id: str` parameter (from a completed generation task) and returns a download URL string.
    """
    Get the download URL for a generated presentation.
    Use the request_id returned by getTaskStatus (from a completed generation task)
    to get a temporary download link.
    """
  • The `_make_api_request` helper function used by `download_presentation` to make the actual HTTP GET request to the SlideSpeak API.
    async def _make_api_request(
        method: Literal["GET", "POST"],
        endpoint: str,
        payload: Optional[dict[str, Any]] = None,
        timeout: float = DEFAULT_TIMEOUT
    ) -> Optional[dict[str, Any]]:
        """
        Makes an HTTP request to the SlideSpeak API.
    
        Args:
            method: HTTP method ('GET' or 'POST').
            endpoint: API endpoint path (e.g., '/presentation/templates').
            payload: JSON payload for POST requests. Ignored for GET.
            timeout: Request timeout in seconds.
    
        Returns:
            The parsed JSON response as a dictionary on success, None on failure.
        """
        if not API_KEY:
            logging.error("API Key is missing. Cannot make API request.")
            return None
    
        headers = {
            "User-Agent": USER_AGENT,
            "Accept": "application/json",
            "X-API-Key": API_KEY,
        }
    
        url = f"{API_BASE}{endpoint}"
        req_start = time.time()
    
        async with httpx.AsyncClient() as client:
            try:
                if method == "POST":
                    response = await client.post(url, json=payload, headers=headers, timeout=timeout)
                else:
                    response = await client.get(url, headers=headers, timeout=timeout)
    
                elapsed = time.time() - req_start
                logging.info(f"{method} {url} | status={response.status_code} | elapsed={elapsed:.2f}s")
                response.raise_for_status()
                return response.json()
    
            except httpx.HTTPStatusError as e:
                logging.error(f"HTTP error {method} {url}: {e.response.status_code} - {e.response.text}")
            except httpx.RequestError as e:
                logging.error(f"Request error {method} {url}: {str(e)}")
            except Exception as e:
                logging.error(f"Unexpected error {method} {url}: {str(e)}")
    
            return None
Behavior3/5

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

No annotations provided; description notes the link is temporary but lacks details on failure modes, authorization, or other behavioral traits. Adequate but minimal.

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?

Two sentences, no unnecessary words, front-loaded with purpose and follow-up usage instruction.

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

Completeness4/5

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

Simple tool with one parameter and no output schema; covers primary use case and temporary nature. Could briefly mention error handling but sufficient.

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?

Only parameter request_id has no schema description (0% coverage); description adds value by specifying it comes from get_task_status, clarifying expected input.

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 tool retrieves a download URL for a generated presentation, using specific verb 'Get' and resource 'download URL'. It distinguishes itself from sibling generation tools.

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

Usage Guidelines5/5

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

Explicitly instructs to use request_id from get_task_status after task completion, providing clear when-to-use context and referencing sibling tool.

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/SlideSpeak/slidespeak-mcp'

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