Skip to main content
Glama
abutbul

Gatherings MCP Server

by abutbul

list_gatherings

Retrieve a list of all social events tracked by the Gatherings MCP Server to monitor expenses and calculate reimbursements among participants.

Instructions

List all gatherings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:176-183 (registration)
    MCP tool registration including name 'list_gatherings', description, and empty input schema.
    { name: 'list_gatherings', description: 'List all gatherings', inputSchema: { type: 'object', properties: {}, }, },
  • MCP CallToolRequest handler case for 'list_gatherings' that constructs command to execute 'python3 gatherings.py --json list'.
    case 'list_gatherings': command += ' list'; break;
  • CLI handler function for 'list' command: retrieves gatherings via service, formats and prints JSON or human-readable list.
    def handle_list(service, args): """Handle the list command.""" try: gatherings = service.list_gatherings() result = { "success": True, "gatherings": [ { "id": g.id, "status": g.status.value } for g in gatherings ] if gatherings else [] } if args.json: print(json.dumps(result)) else: if not gatherings: print("No gatherings found") else: print(f"Found {len(gatherings)} gatherings:") for gathering in gatherings: print(f" {gathering.id} - 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
  • GatheringService.list_gatherings() method that delegates to DatabaseManager.list_gatherings().
    def list_gatherings(self) -> List[Gathering]: """ List all gatherings. Returns: A list of all Gathering objects """ return self.db_manager.list_gatherings()
  • DatabaseManager.list_gatherings() method that queries all Gathering records from the database.
    def list_gatherings(self) -> List[Gathering]: """ List all gatherings. Returns: A list of all Gathering objects """ session = self.Session() try: # Get all gatherings gatherings = session.query(Gathering).all() return gatherings finally: session.close()

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

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