Skip to main content
Glama

delete_patterns

Remove multiple stored coding patterns from the MCPatterns database to clean up outdated or unused development conventions.

Instructions

Delete multiple patterns from the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternNamesYesAn array of pattern names to delete

Implementation Reference

  • The async deletePatterns method in PatternsManager class implements the core logic: loads the database, filters out patterns matching the provided names, and saves the updated database.
    async deletePatterns(patternNames: string[]): Promise<void> {
      const database = await this.loadDatabase();
      database.patterns = database.patterns.filter(p => !patternNames.includes(p.name));
      await this.saveDatabase(database);
    }
  • Tool registration defining the 'delete_patterns' tool with its input schema specifying a required 'patternNames' array of strings to identify which patterns to delete.
    {
      name: "delete_patterns",
      description: "Delete multiple patterns from the database",
      inputSchema: {
        type: "object",
        properties: {
          patternNames: { 
            type: "array", 
            items: { type: "string" },
            description: "An array of pattern names to delete" 
          },
        },
        required: ["patternNames"],
      },
    },
  • src/index.ts:311-313 (registration)
    The request handler switch case for 'delete_patterns' that invokes patternsManager.deletePatterns with the patternNames argument and returns a success message.
    case "delete_patterns":
      await patternsManager.deletePatterns(args.patternNames as string[]);
      return { content: [{ type: "text", text: "Patterns deleted successfully" }] };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool deletes patterns, implying a destructive mutation, but doesn't clarify if deletions are permanent, reversible, require specific permissions, or have side effects like cascading deletions. This leaves significant gaps for a destructive operation.

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, direct sentence with zero wasted words. It front-loads the key action ('Delete') and resource ('multiple patterns'), making it efficient and easy to parse, though it could benefit from more detail given the tool's destructive nature.

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 tool with no annotations and no output schema, the description is incomplete. It doesn't address critical aspects like error handling, confirmation prompts, return values, or how deletions interact with sibling tools (e.g., 'read_patterns' post-deletion). More context is needed to safely use this tool.

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?

Schema description coverage is 100%, with the parameter 'patternNames' documented as 'An array of pattern names to delete'. The description adds no additional meaning beyond this, such as format constraints or examples. Since the schema already covers the parameter adequately, the baseline score of 3 is appropriate.

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 target resource ('multiple patterns from the database'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'delete_code_examples' or 'open_patterns', but the verb+resource combination is specific enough to infer the distinction.

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?

No guidance is provided on when to use this tool versus alternatives like 'delete_code_examples' or other deletion-related operations. The description lacks context about prerequisites, such as whether patterns must exist or be in a specific state before deletion, or what happens to associated data.

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/nicholasrubright/MCPatterns'

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