Skip to main content
Glama
vjsr007
by vjsr007

image-delete

Remove specific images by ID or delete all images associated with a key on the MCP Index Notes server. Simplify image management and maintain organized data.

Instructions

Delete an image by id or all images by key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
keyNo

Implementation Reference

  • Handler for 'image-delete' tool call. Parses arguments using ImageDeleteSchema, checks for image support in store, deletes image by ID using deleteImageById or all by key using deleteImagesByKey, returns JSON result.
    case 'image-delete': {
      const parsed = ImageDeleteSchema.parse(args ?? {});
      if (!('deleteImageById' in (db as any))) {
        throw new Error('Image storage not supported in current store implementation');
      }
      if (parsed.id) {
        const ok = (db as any).deleteImageById(parsed.id);
        return { content: [{ type: 'text', text: JSON.stringify({ ok }) }] };
      }
      if (parsed.key) {
        const deleted = (db as any).deleteImagesByKey(parsed.key);
        return { content: [{ type: 'text', text: JSON.stringify({ deleted }) }] };
      }
      return { content: [{ type: 'text', text: JSON.stringify({ error: 'Provide id or key' }) }] };
  • Zod schema ImageDeleteSchema used to validate input for image-delete tool: optional id (number) or key (string).
    export const ImageDeleteSchema = z.object({
      id: z.number().int().positive().optional(),
      key: z.string().optional(),
    });
    export type ImageDeleteInput = z.infer<typeof ImageDeleteSchema>;
  • src/mcp.ts:90-97 (registration)
    Tool registration in the tools array exported for MCP ListTools. Defines name, description, and basic input schema.
      name: 'image-delete',
      description: 'Delete an image by id or all images by key.',
      inputSchema: {
        type: 'object',
        properties: { id: { type: 'number' }, key: { type: 'string' } },
      },
    },
    {
  • Database method to delete a single image by its ID. Used by image-delete handler when id is provided.
    deleteImageById(id: number): boolean {
      const info = this.db.prepare(`DELETE FROM images WHERE id = ?`).run(id);
      return info.changes > 0;
    }
  • Database method to delete all images associated with a specific key. Used by image-delete handler when key is provided.
    deleteImagesByKey(key: string): number {
      const info = this.db.prepare(`DELETE FROM images WHERE key = ?`).run(key);
      return info.changes;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the action is 'Delete,' implying a destructive mutation, but lacks details on permissions, reversibility, side effects, or response format. This is inadequate for a mutation tool with zero annotation coverage, leaving significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It front-loads the core action and clearly presents the two parameter-driven modes. Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (destructive mutation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral traits, error handling, or return values, leaving the agent with insufficient context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions parameters 'id' and 'key' and their purposes (delete by id or all by key), adding some semantics beyond the bare schema. However, it doesn't explain data types, constraints, or interactions between parameters, failing to fully address the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('image'), specifying two modes: by id or all by key. It distinguishes from sibling tools like image-get and image-upsert by focusing on deletion. However, it doesn't explicitly contrast with index-delete or other deletion tools, keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing image), exclusions, or comparisons with siblings like image-upsert (for updates) or index-delete (for different resources). Usage is implied but not articulated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/vjsr007/mcp-index-notes'

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