Skip to main content
Glama
truaxki

MCP Notes Server

by truaxki

delete-note

Remove an existing note by specifying its name. This tool is part of the MCP Notes Server, which manages notes with CRUD operations and resource-based access.

Instructions

Delete an existing note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • Executes the 'delete-note' tool: validates input, deletes via storage, returns confirmation.
    async def _handle_delete_note(self, arguments: Optional[Dict]) -> List[types.TextContent]:
        """Process note deletion requests."""
        if not arguments:
            raise ValueError("Missing arguments")
    
        note_name = arguments.get("name")
        if not note_name:
            raise ValueError("Missing name")
    
        deleted_note = self.storage.delete_note(note_name)
        return [
            types.TextContent(
                type="text",
                text=f"Deleted note '{note_name}'\nLast modified: {deleted_note['modified_at']}",
            )
        ]
  • Registers the 'delete-note' tool with MCP including description and input schema.
    types.Tool(
        name="delete-note",
        description="Delete an existing note",
        inputSchema={
            "type": "object",
            "properties": {
                "name": {"type": "string"},
            },
            "required": ["name"],
        },
    )
  • Core deletion logic: removes note from in-memory dict and saves to JSON file.
    def delete_note(self, name: str) -> dict:
        """Remove a note and return its data."""
        if name not in self.notes:
            raise ValueError(f"Note '{name}' not found")
        
        deleted_note = self.notes.pop(name)
        self.save_notes()
        return deleted_note
Install Server

Other Tools

Related 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/truaxki/mcp-notes'

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