Skip to main content
Glama

code_image

Transform a code snippet into a syntax-highlighted PNG in a macOS-style window card, ready for documentation and social media. Set theme, language, and title to control the visual result.

Instructions

Turn a code snippet into a beautiful syntax-highlighted PNG (macOS-style window card). Great for sharing code on social media or docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code snippet to render
themeNoCard theme, default dark
titleNoFilename shown in the window title bar
languageNoLanguage for highlighting, e.g. javascript, python, go

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It discloses the output format (PNG) and visual style ('macOS-style window card') but does not mention behaviors like language auto-detection, default theme, or how the image is delivered. For a simple rendering tool this is acceptable but not rich.

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 short sentences with the core function front-loaded in the first sentence and the use case in the second. There is no filler, redundancy, or unnecessary detail.

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?

For a four-parameter tool with no output schema and no annotations, the description covers purpose, output format, and use context. It omits minor details such as language auto-detection or exact return packaging, but the tool's simplicity and fully described schema make the definition sufficiently complete.

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 baseline is 3. The description adds no parameter-level detail beyond what the schema already states; 'beautiful' and 'macOS-style window card' are stylistic framing rather than semantic clarification.

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 opens with a specific verb and resource: 'Turn a code snippet into a beautiful syntax-highlighted PNG.' It clearly distinguishes code_image from siblings like render_screenshot or render_pdf, which address different rendering targets, and the 'macOS-style window card' detail further pins down the output.

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

Usage Guidelines4/5

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

The description gives a concrete usage context: 'Great for sharing code on social media or docs.' It does not explicitly name alternatives or exclusion conditions, but the intended use case is clear enough to guide an agent when selecting this tool.

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