Skip to main content
Glama

describe_asset

Analyze RPG Maker MZ assets to generate detailed descriptions using AI, helping developers understand and document existing game resources for better project management.

Instructions

Analyze and describe an existing RPG Maker MZ asset using Gemini 2.5 Flash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoGemini API key (optional)
asset_typeYesType of asset
filenameYesFilename of the asset to analyze
project_pathYesPath to the RPG Maker MZ project directory

Implementation Reference

  • The main handler function for the 'describe_asset' tool. It reads a specified asset image file from the RPG Maker MZ project directory, encodes it to base64, sends it to the Gemini API along with a prompt to describe the asset, and returns the generated description or an error.
    export async function describeAsset( projectPath: string, assetType: string, filename: string, apiKey?: string ): Promise<{ success: boolean; description?: string; error?: string }> { const assetPath = path.join(getAssetPath(projectPath, assetType), filename); try { const imageBuffer = await fs.readFile(assetPath); const base64Image = imageBuffer.toString("base64"); const key = apiKey || process.env.GEMINI_API_KEY; if (!key) { return { success: false, error: "GEMINI_API_KEY not provided" }; } const response = await fetch( `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp:generateContent?key=${key}`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ contents: [{ parts: [ { text: "Describe this RPG Maker MZ asset in detail. Include style, colors, content, and suggestions for usage." }, { inlineData: { mimeType: "image/png", data: base64Image } } ] }] }) } ); if (!response.ok) { return { success: false, error: `API error: ${response.statusText}` }; } const data = await response.json(); const description = data.candidates?.[0]?.content?.parts?.[0]?.text; return { success: true, description }; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } }

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/ShunsukeHayashi/rpgmaker-mz-mcp'

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