Skip to main content
Glama
acchuang

Jina AI Remote MCP Server

by acchuang

search_images

Find photos, illustrations, diagrams, or charts by entering search terms. Returns images as base64-encoded JPEGs or URLs with metadata. Ideal for locating visual content to enhance projects or discover resources.

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
glNoCountry code, e.g., 'dz' for Algeria
hlNoLanguage code, e.g., 'zh-cn' for Simplified Chinese
locationNoLocation for search results, e.g., 'London', 'New York', 'Tokyo'
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 renderd images.
tbsNoTime-based search parameter, e.g., 'qdr:h' for past hour, can be qdr:h, qdr:d, qdr:w, qdr:m, qdr:y

Implementation Reference

  • The handler function that implements the core logic of the 'search_image' tool. It authenticates with the Jina API using a bearer token, sends a POST request to the image search endpoint with the query, handles errors, and returns the search results as YAML-formatted text.
    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, }; } },
  • Zod schema defining the input parameter 'query' for the search_image tool.
    { query: z.string().describe("Image search terms describing what you want to find (e.g., 'sunset over mountains', 'vintage car illustration', 'data visualization chart')") },
  • Registration of the 'search_image' tool on the MCP server, specifying the tool name and description.
    server.tool( "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.",
  • src/index.ts:20-22 (registration)
    Invocation of registerJinaTools function which registers the search_image tool among others on the MCP server.
    // Register all Jina AI tools registerJinaTools(this.server, () => this.props); }

Other Tools

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

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