Skip to main content
Glama

delete_person

Remove a contact from LunaTask by specifying their person_id. This action permanently deletes the contact record and returns confirmation with deletion timestamp.

Instructions

Delete a person/contact in LunaTask by person_id. Requires person_id. Returns success status with person_id and deleted_at timestamp. Note: deletion is not idempotent - second delete will return not found error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
person_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool handler that performs the delete_person operation by interacting with the Lunatask client.
    async def delete_person_tool(
        self,
        ctx: ServerContext,
        person_id: str,
    ) -> dict[str, Any]:
        """Delete a person in LunaTask.
    
        Args:
            ctx: Server context for logging and communication
            person_id: ID of the person to delete
    
        Returns:
            Dictionary with success status, person_id, deleted_at timestamp, and message.
        """
    
        # Strip whitespace once at the beginning
        person_id = person_id.strip()
    
        await ctx.info(f"Deleting person {person_id}")
    
        # Validate person ID before making API call
        if not person_id:
            message = "Person ID cannot be empty"
            await ctx.error(message)
            logger.warning("Empty person ID provided for person deletion")
            return {
                "success": False,
                "error": "validation_error",
                "message": message,
            }
    
        try:
            async with self.lunatask_client as client:
                person_response = await client.delete_person(person_id)
    
        except Exception as error:
            return await self._handle_lunatask_api_errors(ctx, error, "person deletion")
    
        await ctx.info(f"Successfully deleted person {person_response.id}")
        logger.info("Successfully deleted person %s", person_response.id)
        return {
            "success": True,
            "person_id": person_response.id,
            "deleted_at": person_response.deleted_at.isoformat()
            if person_response.deleted_at
            else None,
            "message": "Person deleted successfully",
        }
  • The registration of the 'delete_person' tool with the MCP server.
    async def _delete_person(
        ctx: ServerContext,
        person_id: str,
    ) -> dict[str, Any]:
        return await self.delete_person_tool(ctx, person_id)
    
    self.mcp.tool(
        name="delete_person",
        description=(
            "Delete a person/contact in LunaTask by person_id. Requires person_id. "
            "Returns success status with person_id and deleted_at timestamp. "
            "Note: deletion is not idempotent - second delete will return not found error."
        ),
    )(_delete_person)
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it's a destructive operation (implied by 'Delete'), returns specific data ('success status with person_id and deleted_at timestamp'), and notes non-idempotency ('second delete will return not found error'). It lacks details on permissions or error handling beyond not-found cases.

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 front-loaded with the core action and requirement, followed by return details and a critical behavioral note. Every sentence adds value without redundancy, making it efficient and well-structured for quick comprehension.

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

Completeness4/5

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

Given the tool's complexity (destructive operation with 1 parameter) and the presence of an output schema (which covers return values), the description is largely complete. It explains the action, requirement, output nature, and idempotency behavior. However, it doesn't address potential side effects or prerequisites (e.g., authentication), leaving minor gaps.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining that 'person_id' is required to identify the person/contact to delete, which clarifies the parameter's purpose beyond the schema's basic type definition. However, it doesn't specify format or constraints (e.g., UUID), leaving some gaps.

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'), target resource ('a person/contact in LunaTask'), and required identifier ('by person_id'), distinguishing it from sibling tools like create_person or delete_note. It's precise and unambiguous.

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 explicitly states 'Requires person_id', providing clear context for when to use this tool. However, it doesn't specify when not to use it or mention alternatives (e.g., update_person if modification is needed instead of deletion), which prevents a perfect score.

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