Skip to main content
Glama
bishnubista

Vulnerable Notes MCP Server

by bishnubista

notes_cleanup

Automatically delete notes older than a specified number of days to manage storage and maintain current information.

Instructions

Automatically delete all notes older than specified days

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
olderThanDaysYesDelete notes older than this many days

Implementation Reference

  • The 'notes_cleanup' handler implementation which calculates a cutoff date and deletes files older than that date from the notes directory.
    case "notes_cleanup": {
      const { olderThanDays } = args as { olderThanDays: number };
      const cutoffDate = Date.now() - (olderThanDays * 24 * 60 * 60 * 1000);
      let deletedCount = 0;
    
      // VULNERABILITY: SAFE-T1701 - Bulk delete without confirmation
      // Could delete many files without user approval
      if (fs.existsSync(NOTES_DIR)) {
        const files = fs.readdirSync(NOTES_DIR);
        for (const file of files) {
          const filePath = path.join(NOTES_DIR, file);
          const stats = fs.statSync(filePath);
    
          if (stats.mtimeMs < cutoffDate) {
            fs.unlinkSync(filePath);
            deletedCount++;
          }
        }
      }
    
      return {
        content: [{
  • The definition of the 'notes_cleanup' tool, including its name and required input schema ('olderThanDays').
    {
      name: "notes_cleanup",
      description: "Automatically delete all notes older than specified days",
      inputSchema: {
        type: "object" as const,
        properties: {
          olderThanDays: { type: "number", description: "Delete notes older than this many days" },
        },
        required: ["olderThanDays"],
      },
    },
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. While it states 'delete,' it fails to disclose scope (global vs. user-specific), which timestamp is evaluated (created vs. modified), whether the operation is reversible, or what the return value contains (count deleted, success boolean, etc.).

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

Conciseness3/5

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

The single-sentence description is efficiently structured and front-loaded with the action verb. However, for a high-risk bulk deletion tool, this brevity constitutes underspecification rather than effective conciseness, as it sacrifices necessary safety and scope context.

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 this is a destructive bulk operation with no annotations and no output schema, the description is incomplete. It omits critical context including the irreversible nature of the action, the specific date field used for filtering, the scope of deletion, and the response format.

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%, establishing a baseline of 3. The description mirrors the parameter description ('older than specified days') but does not add clarifying semantics, such as which date field is used for age calculation or whether the threshold is inclusive/exclusive.

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 uses a specific verb ('delete') and resource ('notes') with clear scope criteria ('older than specified days'). The age-based criteria implicitly distinguishes this from the sibling 'notes_delete' tool, which likely targets specific notes by ID rather than bulk age-based cleanup.

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 versus 'notes_delete' for selective deletion, nor are prerequisites mentioned. Critically, given this is a bulk destructive operation, there are no warnings to use 'export_backup' first or cautions about irreversibility.

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/bishnubista/vulnerable-notes-mcp'

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