Skip to main content
Glama
lumile

Promptopia MCP

by lumile

delete_prompt

Remove stored prompts by ID to manage your prompt library in Promptopia MCP.

Instructions

Deletes a prompt by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the prompt to delete

Implementation Reference

  • MCP tool handler execution logic for 'delete_prompt': extracts 'id' from args, calls promptsService.deletePrompt(id), and formats the result as MCP response content.
    case 'delete_prompt': {
      const { id } = args
      const result = await this.promptsService.deletePrompt(id)
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      }
    }
  • Tool registration in listTools(): defines name, description, and inputSchema for 'delete_prompt'.
    {
      name: 'delete_prompt',
      description: 'Deletes a prompt by its ID',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'ID of the prompt to delete'
          }
        },
        required: ['id']
      }
    },
  • Core deletePrompt method in PromptsService: validates id, checks existence, deletes the JSON file, returns success result.
    async deletePrompt(id: string): Promise<DeletePromptResult> {
      if (!id || !id.trim()) {
        throw new ValidationError('Prompt ID is required')
      }
    
      try {
        // First check if the prompt exists
        await this.getPrompt(id)
        
        // If it exists, delete it
        const filePath = path.join(this.promptsDir, `${id}.json`)
        await this.fileSystemService.deleteFile(filePath)
        
        return {
          success: true,
          message: `Prompt ${id} deleted successfully`
        }
      } catch (error) {
        if (error instanceof Error && error.message.includes('not found')) {
          throw new NotFoundError(`Prompt not found: ${id}`)
        }
        console.error('Failed to delete prompt:', error)
        throw error
      }
    }
  • Type definition for the return value of deletePrompt.
    export interface DeletePromptResult {
      success: boolean
      message: string
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Deletes' implies a destructive mutation, the description doesn't specify whether this action is reversible, what permissions are required, whether it affects related data, or what happens on success/failure. For a destructive operation with zero annotation coverage, this is a significant gap.

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 extremely concise - a single sentence with zero wasted words. It's front-loaded with the core action and resource. Every word earns its place, making it easy to parse quickly.

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?

For a destructive deletion tool with no annotations and no output schema, the description is inadequate. It doesn't explain what constitutes a valid prompt ID, whether deletion is permanent, what confirmation (if any) is required, what happens to prompt versions or dependencies, or what the tool returns. Given the complexity of a deletion operation and the lack of structured metadata, the description should provide more complete context.

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

Parameters3/5

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

The schema description coverage is 100%, with the single parameter 'id' fully documented in the schema as 'ID of the prompt to delete'. The description adds no additional parameter information beyond what's already in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 ('Deletes') and the resource ('a prompt by its ID'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other deletion operations that might exist in the system or explain what distinguishes deleting a prompt from other prompt operations like 'update_prompt' or 'apply_prompt'.

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. With sibling tools like 'update_prompt', 'get_prompt', and 'list_prompts', there's no indication of when deletion is appropriate versus modification or retrieval. No prerequisites, warnings, or alternative tools are mentioned.

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/lumile/promptopia-mcp'

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