Skip to main content
Glama
abutbul

Gatherings MCP Server

by abutbul

create_gathering

Create a new social event to track expenses and calculate reimbursements for settling balances between friends.

Instructions

Create a new gathering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gathering_idYesUnique ID for the gathering (format: yyyy-mm-dd-type)
membersYesNumber of members in the gathering

Implementation Reference

  • MCP CallTool request handler logic for the 'create_gathering' tool. Validates arguments using a type guard and appends the appropriate CLI command to execute the Python gatherings.py 'create' subcommand.
    case 'create_gathering':
      if (!isCreateGatheringArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid create_gathering arguments');
      }
      command += ` create "${args.gathering_id}" --members ${args.members}`;
      break;
  • src/index.ts:64-81 (registration)
    Tool registration in the ListTools handler response, defining the name, description, and input schema for 'create_gathering'.
    {
      name: 'create_gathering',
      description: 'Create a new gathering',
      inputSchema: {
        type: 'object',
        properties: {
          gathering_id: {
            type: 'string',
            description: 'Unique ID for the gathering (format: yyyy-mm-dd-type)',
          },
          members: {
            type: 'number',
            description: 'Number of members in the gathering',
          },
        },
        required: ['gathering_id', 'members'],
      },
    },
  • TypeScript type guard used for runtime validation of 'create_gathering' tool input arguments.
    const isCreateGatheringArgs = (args: any): args is { gathering_id: string; members: number } =>
      typeof args === 'object' && args !== null &&
      typeof args.gathering_id === 'string' &&
      typeof args.members === 'number';
  • CLI handler function for the 'create' subcommand invoked by the MCP server via subprocess execution. Calls the GatheringService.create_gathering method.
    def handle_create(service, args):
        """Handle the create command."""
        try:
            gathering = service.create_gathering(args.gathering_id, args.members)
            result = {
                "success": True,
                "gathering": {
                    "id": gathering.id,
                    "total_members": gathering.total_members,
                    "status": gathering.status.value
                }
            }
            if args.json:
                print(json.dumps(result))
            else:
                print(f"Created gathering: {gathering.id}")
                print(f"Total members: {gathering.total_members}")
                print(f"Status: {gathering.status.value}")
            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
  • Core implementation in DatabaseManager.create_gathering: validates ID format, creates Gathering record, adds unnamed placeholder members (member0001 etc.), commits to SQLite DB.
    def create_gathering(self, gathering_id: str, total_members: int) -> Gathering:
        """
        Create a new gathering.
        
        Args:
            gathering_id: A unique ID for the gathering (format: yyyy-mm-dd-type)
            total_members: The number of members in the gathering
            
        Returns:
            The created Gathering object
            
        Raises:
            ValueError: If the gathering ID is invalid or already exists
        """
        # Validate gathering_id format
        try:
            date_part = "-".join(gathering_id.split("-")[:3])
            datetime.strptime(date_part, "%Y-%m-%d")
        except (ValueError, IndexError):
            raise ValueError("Gathering ID must start with a valid date in format yyyy-mm-dd-type")
        
        session = self.Session()
        try:
            # Check if gathering already exists
            existing_gathering = session.query(Gathering).filter_by(id=gathering_id).first()
            if (existing_gathering):
                raise ValueError(f"Gathering with ID '{gathering_id}' already exists")
            
            # Create the gathering
            gathering = Gathering(
                id=gathering_id,
                total_members=total_members,
                status=GatheringStatus.OPEN
            )
            session.add(gathering)
            
            # Create unnamed members
            for i in range(1, total_members + 1):
                member_name = f"member{i:04d}"
                member = Member(name=member_name, gathering_id=gathering_id)
                session.add(member)
            
            session.commit()
            
            # Create a new session to fetch the complete gathering with all relationships
            return self.get_gathering(gathering_id)
            
        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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool creates something but doesn't explain what happens upon creation (e.g., whether it's mutable, requires permissions, has side effects like notifications, or returns specific data). For a creation tool with zero annotation coverage, this leaves critical behavioral traits unspecified.

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 ('Create a new gathering'), which is front-loaded and wastes no words. While it may be under-informative, it earns full marks for brevity and clarity within its limited scope.

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 creation tool with no annotations, no output schema, and 2 required parameters, the description is incomplete. It doesn't address what the tool returns, error conditions, or behavioral nuances, leaving significant gaps for an AI agent to understand how to use it effectively in context with sibling tools.

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 schema already documents both parameters ('gathering_id' and 'members') with their types and descriptions. The description adds no additional meaning beyond what the schema provides, such as explaining the purpose of these parameters or their constraints. Baseline 3 is appropriate when the schema handles parameter documentation.

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

Purpose3/5

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

The description states the basic action ('Create a new gathering') which is clear but vague. It doesn't specify what a 'gathering' represents in this context or differentiate it from sibling tools like 'add_member' or 'list_gatherings'. The purpose is understandable but lacks specificity about the resource being created.

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 tool versus alternatives. It doesn't mention prerequisites (e.g., whether a gathering must be initialized first), exclusions, or relationships with sibling tools like 'add_member' or 'close_gathering'. The description offers no context for usage decisions.

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