Skip to main content
Glama
abutbul

Gatherings MCP Server

by abutbul

list_gatherings

Retrieve all social events tracked for expense management and reimbursement calculations between friends.

Instructions

List all gatherings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:176-183 (registration)
    Registration of the 'list_gatherings' tool including name, description, and empty input schema in the MCP server's ListTools response.
    { name: 'list_gatherings', description: 'List all gatherings', inputSchema: { type: 'object', properties: {}, }, },
  • MCP tool handler case that constructs the CLI command to execute the Python script with 'list' subcommand.
    command += ' list'; break;
  • CLI handler for the 'list' command invoked by the MCP server, which fetches gatherings and outputs the list in JSON or human-readable format.
    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 method that delegates listing of gatherings to the DatabaseManager.
    def list_gatherings(self) -> List[Gathering]: """ List all gatherings. Returns: A list of all Gathering objects """ return self.db_manager.list_gatherings()
  • DatabaseManager method that queries the database for all Gathering records, implementing the core data retrieval logic.
    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()

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