Skip to main content
Glama
acchuang

Jina AI Remote MCP Server

by acchuang

search_images

Find web images for concepts, illustrations, or specific pictures using search terms. Returns images as base64-encoded JPEGs by default or provides URLs and metadata when specified.

Instructions

Search for images across the web, similar to Google Images. Use this when you need to find photos, illustrations, diagrams, charts, logos, or any visual content. Perfect for finding images to illustrate concepts, locating specific pictures, or discovering visual resources. Images are returned by default as small base64-encoded JPEG images.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesImage search terms describing what you want to find (e.g., 'sunset over mountains', 'vintage car illustration', 'data visualization chart')
return_urlNoSet to true to return image URLs, title, shapes, and other metadata. By default, images are downloaded as base64 and returned as rendered images.
tbsNoTime-based search parameter, e.g., 'qdr:h' for past hour, can be qdr:h, qdr:d, qdr:w, qdr:m, qdr:y
locationNoLocation for search results, e.g., 'London', 'New York', 'Tokyo'
glNoCountry code, e.g., 'dz' for Algeria
hlNoLanguage code, e.g., 'zh-cn' for Simplified Chinese

Implementation Reference

  • Handler for the 'search_image' tool (note: queried tool is 'search_images' but implementation is 'search_image'). Performs API call to Jina image search endpoint with query, handles authentication and errors, returns YAML serialized results.
    try { const props = getProps(); const tokenError = checkBearerToken(props.bearerToken); if (tokenError) { return tokenError; } const response = await fetch('https://svip.jina.ai/', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': `Bearer ${props.bearerToken}`, }, body: JSON.stringify({ q: query, type: 'images', }), }); if (!response.ok) { return handleApiError(response, "Image search"); } const data = await response.json() as any; return { content: [ { type: "text" as const, text: yamlStringify(data.results), }, ], }; } catch (error) { return { content: [ { type: "text" as const, text: `Error: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }, );
  • Input schema for search_image tool using Zod: requires a 'query' string parameter.
    query: z.string().describe("Image search terms describing what you want to find (e.g., 'sunset over mountains', 'vintage car illustration', 'data visualization chart')") }, async ({ query }: { query: string }) => {
  • Registration of the search_image tool within registerJinaTools function.
    "search_image", "Search for images across the web, similar to Google Images. Use this when you need to find photos, illustrations, diagrams, charts, logos, or any visual content. Perfect for finding images to illustrate concepts, locating specific pictures, or discovering visual resources. Returns image search results with URLs, titles, descriptions, and image metadata.", { query: z.string().describe("Image search terms describing what you want to find (e.g., 'sunset over mountains', 'vintage car illustration', 'data visualization chart')") }, async ({ query }: { query: string }) => { try { const props = getProps(); const tokenError = checkBearerToken(props.bearerToken); if (tokenError) { return tokenError; } const response = await fetch('https://svip.jina.ai/', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': `Bearer ${props.bearerToken}`, }, body: JSON.stringify({ q: query, type: 'images', }), }); if (!response.ok) { return handleApiError(response, "Image search"); } const data = await response.json() as any; return { content: [ { type: "text" as const, text: yamlStringify(data.results), }, ], }; } catch (error) { return { content: [ { type: "text" as const, text: `Error: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }, );
  • src/index.ts:21-22 (registration)
    Top-level registration call in MyMCP.init() that registers all Jina tools including search_image.
    registerJinaTools(this.server, () => this.props); }

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/acchuang/jina-mcp'

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