Skip to main content
Glama

delete_note

Remove a note from LunaTask by specifying its unique ID. This action permanently deletes the note and returns confirmation with deletion timestamp.

Instructions

Delete a note in LunaTask by note_id. Requires note_id (UUID). Returns success status with note_id and deleted_at timestamp. Note: deletion is not idempotent - second delete will return not found error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
note_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The delete_note_tool method in the NotesTools class, which handles the core logic for deleting a note by calling the LunaTask client.
    async def delete_note_tool(
        self,
        ctx: ServerContext,
        note_id: str,
    ) -> dict[str, Any]:
        """Delete a note in LunaTask.
    
        Args:
            ctx: Server context for logging and communication
            note_id: ID of the note to delete (UUID format)
    
        Returns:
            Dictionary with success status, note_id, deleted_at timestamp, and message.
        """
        # Strip whitespace once at the beginning
        note_id = note_id.strip()
    
        await ctx.info(f"Deleting note {note_id}")
    
        # Validate note ID before making API call
        if not note_id:
            message = "Note ID cannot be empty"
            await ctx.error(message)
            logger.warning("Empty note ID provided for note deletion")
            return {
                "success": False,
                "error": "validation_error",
                "message": message,
            }
    
        try:
            async with self.lunatask_client as client:
                note_response = await client.delete_note(note_id)
    
        except Exception as error:
            return await self._handle_lunatask_api_errors(ctx, error, "note deletion")
    
        await ctx.info(f"Successfully deleted note {note_response.id}")
        logger.info("Successfully deleted note %s", note_response.id)
        return {
            "success": True,
            "note_id": note_response.id,
            "deleted_at": note_response.deleted_at.isoformat()
            if note_response.deleted_at
            else None,
            "message": "Note deleted successfully",
        }
  • The registration of the delete_note tool using the FastMCP decorator inside the _register_tools method.
    async def _delete_note(
        ctx: ServerContext,
        note_id: str,
    ) -> dict[str, Any]:
        return await self.delete_note_tool(ctx, note_id)
    
    self.mcp.tool(
        name="delete_note",
        description=(
            "Delete a note in LunaTask by note_id. Requires note_id (UUID). "
            "Returns success status with note_id and deleted_at timestamp. "
            "Note: deletion is not idempotent - second delete will return not found error."
        ),
    )(_delete_note)
Behavior5/5

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

With no annotations provided, the description carries full burden and delivers excellent behavioral disclosure. It explicitly states the non-idempotent nature ('deletion is not idempotent - second delete will return not found error'), describes the return format ('Returns success status with note_id and deleted_at timestamp'), and clarifies error behavior - all crucial information beyond basic parameter requirements.

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?

Three tightly constructed sentences with zero waste: first states the action and parameter, second describes the return value, third provides critical behavioral warning. Every sentence earns its place and information is appropriately front-loaded.

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

Completeness5/5

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

For a destructive operation with no annotations, the description provides complete context: purpose, parameter requirements, return format, and critical behavioral warnings. The presence of an output schema means the description doesn't need to detail return structure, and it appropriately focuses on operational semantics.

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

Parameters4/5

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

With 0% schema description coverage (schema only shows 'note_id' as string type), the description adds significant value by specifying the parameter must be a UUID format. However, it doesn't provide examples or further validation details about the UUID format expected.

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

Purpose5/5

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

The description clearly states the specific action ('Delete a note in LunaTask') and identifies the target resource ('by note_id'), distinguishing it from sibling tools like 'delete_person' or 'delete_task'. It provides a complete verb+resource+identifier combination.

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

Usage Guidelines4/5

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

The description implies usage context by specifying the required parameter ('Requires note_id (UUID)'), but doesn't explicitly state when to use this tool versus alternatives like 'update_note' or other deletion tools. It provides clear prerequisites but lacks comparative guidance.

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/tensorfreitas/lunatask-mcp'

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