Skip to main content
Glama

generate_signed_url

Create secure, time-limited CDN URLs for images with HMAC-SHA256 signing and optional transformation parameters to control access and delivery.

Instructions

Generate an HMAC-SHA256 signed CDN URL. Requires signing to be enabled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoProject ID (UUID). If omitted, uses SPRONTA_PROJECT_ID env var.
pathYesImage path (e.g. /my-project/hero.jpg)
paramsNoTransform params as key-value strings (e.g. {w: '800'})
expiresInNoExpiration in seconds (60–604800)

Implementation Reference

  • The handler for "generate_signed_url" which makes a PUT request to the signing endpoint.
    case "generate_signed_url": {
      const pid = getProjectId(args);
      return ok(
        await api.request("PUT", `/images/projects/${pid}/signing`, {
          path: args.path,
          params: args.params,
          expiresIn: args.expiresIn,
        }),
      );
    }
  • The tool registration schema for "generate_signed_url".
    {
      name: "generate_signed_url",
      description: "Generate an HMAC-SHA256 signed CDN URL. Requires signing to be enabled.",
      inputSchema: {
        type: "object",
        properties: {
          ...projectIdParam,
          path: {
            type: "string",
            description: "Image path (e.g. /my-project/hero.jpg)",
          },
          params: {
            type: "object",
            additionalProperties: { type: "string" },
            description: "Transform params as key-value strings (e.g. {w: '800'})",
          },
          expiresIn: {
            type: "integer",
            description: "Expiration in seconds (60–604800)",
          },
        },
        required: ["path"],
      },
    },

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/spronta/mcp'

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