Skip to main content
Glama

describe

Generate AI descriptions of images using vision providers like Gemini, OpenAI, or Claude. Specify detail level and optional prompts for customized analysis.

Instructions

Get an AI-generated description of an image. Supports multiple providers (Gemini, OpenAI, Claude).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesPath to the image file
promptNoOptional question or instruction for the description
providerNoVision provider to use (default: gemini)
detailNoLevel of detail in the description (default: detailed)

Implementation Reference

  • The handleDescribe function that executes the 'describe' tool: processes input args, converts image to base64, delegates to the selected provider's describe function (gemini, openai, or claude), and returns the generated description as text content.
    export async function handleDescribe(args: Record<string, unknown>) { const image = args.image as string; const prompt = args.prompt as string | undefined; const provider = (args.provider as Provider) || "gemini"; const detail = (args.detail as "brief" | "detailed") || "detailed"; const { base64, mimeType } = await imageToBase64(image); let description: string; switch (provider) { case "gemini": description = await geminiDescribe(base64, mimeType, prompt, detail); break; case "openai": description = await openaiDescribe(base64, mimeType, prompt, detail); break; case "claude": description = await claudeDescribe(base64, mimeType, prompt, detail); break; default: throw new Error(`Unknown provider: ${provider}`); } return { content: [ { type: "text", text: description, }, ], }; }
  • The describeTool object defines the tool's metadata, including name, description, and inputSchema for parameter validation.
    export const describeTool: Tool = { name: "describe", description: "Get an AI-generated description of an image. Supports multiple providers (Gemini, OpenAI, Claude).", inputSchema: { type: "object", properties: { image: { type: "string", description: "Path to the image file or URL (http/https)", }, prompt: { type: "string", description: "Optional question or instruction for the description", }, provider: { type: "string", enum: ["gemini", "openai", "claude"], description: "Vision provider to use (default: gemini)", }, detail: { type: "string", enum: ["brief", "detailed"], description: "Level of detail in the description (default: detailed)", }, }, required: ["image"], }, };
  • src/index.ts:37-46 (registration)
    Registration of the describeTool in the MCP server's listTools request handler, making it available for discovery.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ describeTool, detectTool, describeRegionTool, analyzeColorsTool, ], }; });
  • src/index.ts:54-56 (registration)
    Dispatch in the server's CallToolRequestSchema handler that routes 'describe' tool calls to the handleDescribe function.
    case "describe": return await handleDescribe(args); case "detect":

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/simen/mcp-see'

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