list_algorithms
Discover available algorithms for media protection, watermarking, and AI content disruption. Filter by category or media type to identify valid algorithm IDs before execution.
Instructions
List available algorithms for media protection, watermarking, and AI content disruption. Returns algorithm IDs, names, supported media types, and descriptions. Use this to discover valid algorithm IDs before calling run_algorithm. Filter by category (open = research algorithms, proprietary = Sidearm bundles) or media_type (image, video, audio, text, pdf, gif).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Filter by algorithm category | |
| media_type | No | Filter by supported media type |
Implementation Reference
- src/tools/list-algorithms.ts:23-45 (handler)The handler function that executes the list_algorithms tool logic. It calls the API endpoint '/api/v1/algorithms' with optional category and media_type filters, then returns the JSON result or handles errors gracefully.
async ({ category, media_type }) => { try { const result = await api.get("/api/v1/algorithms", { category, media_type, }); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; } catch (err) { return { content: [ { type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true as const, }; } }, - src/tools/list-algorithms.ts:13-22 (schema)The input schema definition for list_algorithms using Zod. Defines two optional parameters: 'category' (enum: 'open' or 'proprietary') and 'media_type' (enum: 'image', 'video', 'audio', 'text', 'pdf', 'gif').
{ category: z .enum(["open", "proprietary"]) .optional() .describe("Filter by algorithm category"), media_type: z .enum(["image", "video", "audio", "text", "pdf", "gif"]) .optional() .describe("Filter by supported media type"), }, - src/tools/list-algorithms.ts:5-46 (registration)The registration function that registers the list_algorithms tool with the MCP server. Includes the tool name, description, schema, and handler function.
export function register(server: McpServer, api: ApiClient): void { server.tool( "list_algorithms", "List available algorithms for media protection, watermarking, and AI content disruption. " + "Returns algorithm IDs, names, supported media types, and descriptions. " + "Use this to discover valid algorithm IDs before calling run_algorithm. " + "Filter by category (open = research algorithms, proprietary = Sidearm bundles) " + "or media_type (image, video, audio, text, pdf, gif).", { category: z .enum(["open", "proprietary"]) .optional() .describe("Filter by algorithm category"), media_type: z .enum(["image", "video", "audio", "text", "pdf", "gif"]) .optional() .describe("Filter by supported media type"), }, async ({ category, media_type }) => { try { const result = await api.get("/api/v1/algorithms", { category, media_type, }); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; } catch (err) { return { content: [ { type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true as const, }; } }, ); - src/index.ts:6-6 (registration)Import of the list_algorithms register function from the tools module.
import { register as listAlgorithms } from "./tools/list-algorithms.js"; - src/index.ts:40-40 (registration)Invocation of listAlgorithms to register the tool with the MCP server instance.
listAlgorithms(server, api);