Skip to main content
Glama
abutbul

Gatherings MCP Server

by abutbul

delete_gathering

Remove a social event from the Gatherings MCP Server to stop tracking its expenses and reimbursements, optionally forcing deletion of closed gatherings.

Instructions

Delete a gathering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gathering_idYesID of the gathering to delete
forceNoForce deletion even if gathering is closed

Implementation Reference

  • src/index.ts:198-216 (registration)
    Registration of the 'delete_gathering' tool in the MCP server's ListTools response, including name, description, and input schema.
    {
      name: 'delete_gathering',
      description: 'Delete a gathering',
      inputSchema: {
        type: 'object',
        properties: {
          gathering_id: {
            type: 'string',
            description: 'ID of the gathering to delete',
          },
          force: {
            type: 'boolean',
            description: 'Force deletion even if gathering is closed',
            default: false,
          },
        },
        required: ['gathering_id'],
      },
    },
  • Type guard function for validating input arguments to the delete_gathering tool.
    const isDeleteGatheringArgs = (args: any): args is { gathering_id: string; force?: boolean } =>
      typeof args === 'object' && args !== null &&
      typeof args.gathering_id === 'string' &&
      (args.force === undefined || typeof args.force === 'boolean');
  • MCP tool handler for 'delete_gathering': validates args and constructs CLI command to execute python script.
    case 'delete_gathering':
      if (!isDeleteGatheringArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid delete_gathering arguments');
      }
      command += ` delete "${args.gathering_id}"${args.force ? ' --force' : ''}`;
      break;
  • CLI handler for 'delete' command that calls the service to delete the gathering and outputs result.
    def handle_delete(service, args):
        """Handle the delete command."""
        try:
            service.delete_gathering(args.gathering_id, args.force)
            result = {
                "success": True,
                "deleted": {
                    "gathering_id": args.gathering_id,
                    "forced": args.force
                }
            }
            if args.json:
                print(json.dumps(result))
            else:
                print(f"Deleted gathering: {args.gathering_id}")
            return True
        except ValueError as e:
            error = {"success": False, "error": str(e)}
            if args.json:
                print(json.dumps(error))
            else:
                print(f"Error: {e}")
            return False
  • DatabaseManager.delete_gathering: core implementation that deletes the gathering record and cascades to related data.
    def delete_gathering(self, gathering_id: str, force: bool = False) -> None:
        """
        Delete a gathering and all related data.
        
        Args:
            gathering_id: The ID of the gathering
            force: If True, delete even if the gathering is closed
            
        Raises:
            ValueError: If the gathering doesn't exist or is closed and force is False
        """
        session = self.Session()
        try:
            # Get the gathering
            gathering = session.query(Gathering).filter_by(id=gathering_id).first()
            if not gathering:
                raise ValueError(f"Gathering '{gathering_id}' not found")
            
            # Check if closed and not forced
            if gathering.status == GatheringStatus.CLOSED and not force:
                raise ValueError(f"Cannot delete closed gathering '{gathering_id}'. Use --force to override.")
            
            # Delete the gathering (cascading delete will handle members, expenses, and payments)
            session.delete(gathering)
            
            session.commit()
            
        except Exception as e:
            session.rollback()
            raise e
        finally:
            session.close()
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 'Delete a gathering', implying a destructive mutation, but doesn't mention permissions needed, whether deletion is permanent, error conditions, or side effects. This is a significant gap for a tool that likely removes data.

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 extremely concise with a single sentence ('Delete a gathering'), which is front-loaded and wastes no words. It efficiently communicates the core action without unnecessary elaboration, making it easy for an agent to parse quickly.

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 the complexity of a deletion tool with no annotations and no output schema, the description is incomplete. It doesn't address behavioral aspects like permanence, authorization, or error handling, which are critical for safe tool invocation. This leaves gaps that could lead to misuse by an agent.

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%, so the input schema fully documents both parameters ('gathering_id' and 'force'). The description adds no additional meaning beyond what's in the schema, such as explaining when to use 'force' or the implications of deletion. Baseline 3 is appropriate as the schema does the heavy lifting.

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 verb ('Delete') and resource ('a gathering'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'close_gathering' or 'remove_member', which might have overlapping or related functionality, so it doesn't reach the highest score.

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?

The description provides no guidance on when to use this tool versus alternatives. For example, it doesn't clarify if deletion is irreversible compared to 'close_gathering', or if it should be used after certain conditions. This lack of context leaves the agent without usage direction.

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/abutbul/gatherings-mcp'

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