Skip to main content
Glama
webflow

Webflow

Official
by webflow

Get Image Preview

get_image_preview

Retrieve image previews from URLs within Webflow sites to verify content before publishing.

Instructions

Designer Tool - Get image preview from url. this is helpful to get image preview from url.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the image to get the preview from
siteIdYesThe ID of the site. DO NOT ASSUME site id. ALWAYS ask user for site id if not already provided or known. use sites_list tool to fetch all sites and then ask user to select one of them.

Implementation Reference

  • The main handler function for the 'get_image_preview' tool. It invokes the helper to fetch and process the image, then returns it formatted as MCP content with base64 data.
    async ({ url, siteId }) => {
      try {
        const { data, mimeType } = await getImagePreviewFromURL(url, siteId);
        return {
          content: [
            {
              type: "image",
              data,
              mimeType,
            },
          ],
        };
      } catch (error) {
        return formatErrorResponse(error);
      }
    }
  • The schema definition for the 'get_image_preview' tool, including title, description, and Zod input schema requiring 'url' and 'siteId'.
    {
      title: "Get Image Preview",
      description:
        "Designer Tool - Get image preview from url. this is helpful to get image preview from url.",
      inputSchema: z.object({
        url: z
          .string()
          .describe("The URL of the image to get the preview from"),
        ...SiteIdSchema,
      }),
    },
  • The server.registerTool call that registers the 'get_image_preview' tool with its schema and handler.
    server.registerTool(
      "get_image_preview",
      {
        title: "Get Image Preview",
        description:
          "Designer Tool - Get image preview from url. this is helpful to get image preview from url.",
        inputSchema: z.object({
          url: z
            .string()
            .describe("The URL of the image to get the preview from"),
          ...SiteIdSchema,
        }),
      },
      async ({ url, siteId }) => {
        try {
          const { data, mimeType } = await getImagePreviewFromURL(url, siteId);
          return {
            content: [
              {
                type: "image",
                data,
                mimeType,
              },
            ],
          };
        } catch (error) {
          return formatErrorResponse(error);
        }
      }
    );
  • Helper function that fetches the image from the given URL, validates it's an image MIME type, converts it to base64, and returns the data with mimeType.
    const getImagePreviewFromURL = async (url: string, siteId: string) => {
      const response = await fetch(url);
      const contentType = response.headers.get("content-type");
      if (!contentType || !contentType.startsWith("image/")) {
        throw new Error(
          `Expected an image but received MIME type: ${contentType || "unknown"}`
        );
      }
      const arrayBuffer = await response.arrayBuffer();
      const binary = String.fromCharCode(...new Uint8Array(arrayBuffer));
      const base64 = btoa(binary);
      return { data: base64, mimeType: contentType, siteId };
    };
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 the tool 'gets image preview from url' but doesn't describe what the preview includes (e.g., dimensions, format, processing), any authentication needs (implied by siteId), rate limits, or error handling. This leaves significant gaps for a tool that likely interacts with external resources.

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 poorly structured and repetitive: 'Designer Tool - Get image preview from url. this is helpful to get image preview from url.' The second sentence adds no new information, wasting space. It could be condensed to a single clear sentence without losing meaning.

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?

For a tool with 2 required parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the return value (what 'preview' means), error cases, or dependencies (e.g., siteId validation). Given the complexity of fetching external images, more context is needed to use this tool effectively.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters (url and siteId) adequately. The description adds no additional meaning beyond what's in the schema, such as explaining why siteId is required or how the url should be formatted. Baseline 3 is appropriate when the schema does the heavy lifting.

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 states the tool 'gets image preview from url' which clarifies the verb (get) and resource (image preview), but it's vague about what 'preview' entails (e.g., thumbnail, metadata, processed version). It repeats 'from url' unnecessarily and doesn't distinguish from siblings like 'asset_tool' or 'components_get_content' that might handle images differently.

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 is provided. The description mentions 'Designer Tool' but doesn't explain its specific context within the Webflow ecosystem or how it differs from other image-related tools in the sibling list. Users must infer usage from the tool name alone.

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

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