Skip to main content
Glama

render_file

Render a component file as an image with full dependency resolution using your project's Vite config. Auto-detects framework and saves PNG for visual validation.

Instructions

Render a component file with full dependency resolution. Uses your project's Vite config to resolve imports, path aliases, CSS modules, and node_modules. Falls back to CDN-based rendering if Vite is unavailable. Auto-detects framework from file extension.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the component file
propsNoProps to pass to the component
widthNoViewport width (px)
heightNoViewport height (px)
darkModeNoRender with dark mode
tailwindVersionNoTailwind CSS version (3 or 4)3
projectRootNoProject root directory override (defaults to auto-detect from file path)
mockNoMock network responses. Keys: URL pattern (path '/api/users', glob '**/api/*', or full URL). Values: response body (auto-serialized as JSON) or { status, contentType, body, headers }.
outputPathNoAbsolute path to save the PNG (e.g. '/tmp/button.png'). When set, returns a text summary instead of base64 image data — use this in long agent sessions to avoid context bloat.
Behavior4/5

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

With no annotations, the description carries full burden. It discloses key behaviors: uses Vite config, falls back to CDN, auto-detects framework, resolves imports, path aliases, CSS modules, and node_modules. Missing details on error handling or permissions, but overall good.

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?

Four sentences, each informative and necessary. Front-loaded with the core purpose. No wasted words.

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 9 parameters and no output schema, the description explains the rendering mechanism and key features. However, it does not clarify the return format (base64 vs. text summary when outputPath is set) beyond what the schema for outputPath says. Minor gap.

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 coverage is 100%, so baseline is 3. The description adds context like 'Uses your project's Vite config' relating to path and projectRoot, but does not elaborate on each parameter beyond what the schema provides.

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 renders a component file with full dependency resolution, using Vite config, CDN fallback, and auto-detecting framework. This distinguishes it from sibling tools like render_component which may not handle dependency resolution.

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

Usage Guidelines3/5

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

The description implies usage for file-based rendering with dependencies but does not explicitly contrast with alternatives or provide exclusions. It lacks guidance on when to use this versus other render tools.

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/kamegoro/frameshot'

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