Skip to main content
Glama
CloudWaddie

OSINT MCP Server

image_tagging

Extract descriptive tags from online images to identify content, objects, and themes for open-source intelligence analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesImage URL to tag using Imagga

Implementation Reference

  • The handler function that executes the actual API request to Imagga for image tagging.
    async tagImageUrl(imageUrl: string): Promise<ImaggaResult> {
      const apiKey = configManager.get("IMAGGA_API_KEY");
      const apiSecret = configManager.get("IMAGGA_API_SECRET");
      
      if (!apiKey || !apiSecret) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          "IMAGGA_API_KEY or IMAGGA_API_SECRET is not configured"
        );
      }
    
      const auth = Buffer.from(`${apiKey}:${apiSecret}`).toString("base64");
    
      try {
        const data = await this.fetch<any>("tags", {
          method: "GET",
          headers: {
            Authorization: `Basic ${auth}`,
          },
        }, {
          image_url: imageUrl,
        });
    
        return ImaggaResultSchema.parse(data);
      } catch (error) {
        if (error instanceof McpError) throw error;
        throw new McpError(
          ErrorCode.InternalError,
          `Imagga error: ${(error as Error).message}`
        );
      }
    }
  • src/index.ts:329-338 (registration)
    The tool registration for "image_tagging" which calls the imClient.tagImageUrl handler.
    server.tool(
      "image_tagging",
      { url: z.string().url().describe("Image URL to tag using Imagga") },
      async ({ url }) => {
        const result = await imClient.tagImageUrl(url);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      }
    );
  • Validation schema for the Imagga API response.
    export const ImaggaResultSchema = z.object({
      result: z.object({
        tags: z.array(z.object({
          confidence: z.number(),
          tag: z.object({
            en: z.string(),
          }),
        })),
      }),
    });
    
    export type ImaggaResult = z.infer<typeof ImaggaResultSchema>;

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/CloudWaddie/osint-mcp'

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