Skip to main content
Glama
beznazwiska

@codetoimage/mcp-server

by beznazwiska

render_html_to_url

Render HTML/CSS to an image and obtain a temporary hosted URL for use in social media, Open Graph tags, or embedding. URL valid for 24 hours.

Instructions

Render HTML (and optional CSS) to an image and return a temporary hosted URL (instead of inline bytes). Supports the same template_id + variables + preset inputs as render_html_to_image. Use this when the caller needs to reference the image elsewhere – Instagram Graph API, OpenGraph meta tags, Slack unfurls, embedding in docs/posts. URL is valid for 24 hours.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNo
htmlNo
widthNo
formatNo
heightNo
presetNoNamed viewport size: og 1200×630, twitter-card 1200×628, facebook-post 1200×630, linkedin-post 1200×627, instagram-square 1080×1080, instagram-portrait 1080×1350, instagram-story 1080×1920, youtube-thumbnail 1280×720, pinterest-pin 1000×1500. One template, many sizes. Explicit width/height override the preset.
qualityNo
variablesNoValues for {{placeholders}} in the template (or in `html` if provided). Values are HTML-escaped server-side. Missing placeholders render as empty.
backgroundNo
template_idNoID of a template saved in the codetoimage dashboard (Templates page). Use INSTEAD of `html` – the saved HTML/CSS renders with {{placeholders}} filled from `variables`.
transparentNo
Behavior4/5

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

Discloses key behavioral aspects: returns a URL valid for 24 hours, supports template_id/variables/preset inputs. No annotations are present, so description carries full burden. Could mention idempotency or side effects, but generally transparent.

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 that are dense with information: first sentence defines purpose, second provides usage context and constraints (24-hour validity). No unnecessary words, front-loaded with key action.

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?

Given 11 parameters (0 required), nested objects, and no output schema, the description covers core functionality and use cases. It explains URL lifecycle and sibling relationship. Could be improved by mentioning optional width/height override of preset and output format, but overall adequate.

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

Parameters2/5

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

Schema description coverage is low (27%). Description only highlights template_id, variables, and preset, ignoring other parameters like css, html, width, format, transparent. The schema provides some descriptions (e.g., for preset), but the tool description adds minimal value beyond that.

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's action: render HTML/CSS to an image and return a temporary hosted URL. It distinguishes from sibling by noting 'instead of inline bytes', providing a specific verb-resource pair.

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 states when to use the tool: when the caller needs to reference the image elsewhere (e.g., Instagram Graph API, OpenGraph, Slack). Also mentions that it supports the same inputs as the sibling tool render_html_to_image, aiding decision.

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

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