Skip to main content
Glama
cameronrye

AT Protocol MCP Server

generate_link_preview

Read-only

Generate a link preview from a URL by extracting title, description, and thumbnail. Uploads the thumbnail as an AT Protocol blob for use as an external embed in posts.

Instructions

Generate a link preview with title, description, and thumbnail for a given URL. Fetches the target page, extracts Open Graph / meta tags, optionally downloads and uploads the og:image thumbnail as an AT Protocol blob, and returns a preview object ready to attach as an external embed to a create_post or create_thread call. Requires authentication (app password). Use this tool before create_post when you want a rich URL card; use upload_image or upload_video for local media instead. Subject to per-tool rate limiting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFully-qualified HTTP or HTTPS URL of the webpage to preview. SSRF-safe: private/internal IP ranges and non-HTTP schemes are rejected. The server fetches up to 2 MB of the page HTML and up to 1 MB for the og:image thumbnail.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYesWhether the preview was generated successfully.
messageYesHuman-readable status message.
previewYesLink preview data suitable for use as an AT Protocol external embed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.2
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed2 schema fields changedv0.6.0
    • addedInput schema / properties / url / description
      Added value: +"Fully-qualified HTTP or HTTPS URL of the webpage to preview. SSRF-safe: private/internal IP ranges and non-HTTP schemes are rejected. The server fetches up to 2 MB of the page HTML and up to 1 MB for the og:image thumbnail."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "message": {
      +      "description": "Human-readable status message.",
      +      "type": "string"
      +    },
      +    "preview": {
      +      "description": "Link preview data suitable for use as an AT Protocol external embed.",
      +      "properties": {
      +        "description": {
      +          "description": "Page description from meta description or og:description (truncated to 1000 characters).",
      +          "type": "string"
      +        },
      +        "thumb": {
      +          "description": "Uploaded thumbnail blob reference, present only when an og:image was found and successfully downloaded.",
      +          "properties": {
      +            "blob": {
      +              "description": "AT Protocol blob descriptor for the thumbnail image.",
      +              "properties": {
      +                "mimeType": {
      +                  "description": "MIME type of the thumbnail image (e.g. \"image/jpeg\").",
      +                  "type": "string"
      +                },
      +                "ref": {
      +                  "description": "CID reference string (bafkrei…) of the uploaded thumbnail blob.",
      +                  "type": "string"
      +                },
      +                "size": {
      +                  "description": "Size of the thumbnail blob in bytes.",
      +                  "type": "number"
      +                },
      +                "type": {
      +                  "description": "Always \"blob\".",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "type",
      +                "ref",
      +                "mimeType",
      +                "size"
      +              ],
      +              "type": "object"
      +            }
      +          },
      +          "required": [
      +            "blob"
      +          ],
      +          "type": "object"
      +        },
      +        "title": {
      +          "description": "Page title extracted from <title> or og:title (truncated to 300 characters).",
      +          "type": "string"
      +        },
      +        "uri": {
      +          "description": "The original URL that was previewed.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "uri",
      +        "title",
      +        "description"
      +      ],
      +      "type": "object"
      +    },
      +    "success": {
      +      "description": "Whether the preview was generated successfully.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "message",
      +    "preview"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changedv0.3.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  4. First observedv0.2.1

TDQS

A4.7/5.0
Behavior4/5

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

Annotations provide readOnlyHint and openWorldHint. Description adds concrete behavioral details: fetches up to 2 MB HTML and 1 MB image, SSRF-safe, optionally uploads blob. No contradictions.

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?

Three well-structured sentences, no redundancy. Front-loaded with core purpose, each sentence adds unique value.

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

Completeness5/5

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

Given one parameter, output schema exists, and annotations present, the description fully covers prerequisites, alternatives, security, and process. Highly complete.

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?

Schema covers URL format and constraints (100% coverage). Description adds meaning by explaining the extraction process (OG/meta tags, blob upload) and return type. Baseline 3, plus extra context.

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 it generates a link preview with title, description, and thumbnail, specifying the verb 'Generate' and resource 'link preview'. It details the process (fetching, extracting meta tags, uploading thumbnail) and distinguishes from sibling tools like upload_image and upload_video.

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 says 'Use this tool before create_post when you want a rich URL card; use upload_image or upload_video for local media instead.' Also mentions authentication requirement and rate limiting.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.