Skip to main content
Glama
abutbul

Gatherings MCP Server

by abutbul

rename_member

Update a participant's name in a social gathering to correct entries or reflect changes, using the gathering ID and both old and new names.

Instructions

Rename an unnamed member

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gathering_idYesID of the gathering
old_nameYesCurrent name of the member
new_nameYesNew name for the member

Implementation Reference

  • MCP tool handler for 'rename_member': validates arguments using type guard and constructs/executes the Python CLI command 'rename-member' via child_process.exec.
    case 'rename_member': if (!isRenameMemberArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid rename_member arguments'); } command += ` rename-member "${args.gathering_id}" "${args.old_name}" "${args.new_name}"`; break;
  • Input schema definition for the 'rename_member' tool, specifying properties and requirements for gathering_id, old_name, new_name.
    inputSchema: { type: 'object', properties: { gathering_id: { type: 'string', description: 'ID of the gathering', }, old_name: { type: 'string', description: 'Current name of the member', }, new_name: { type: 'string', description: 'New name for the member', }, }, required: ['gathering_id', 'old_name', 'new_name'], },
  • src/index.ts:140-161 (registration)
    Registration of the 'rename_member' tool in the ListTools response, including name, description, and input schema.
    { name: 'rename_member', description: 'Rename an unnamed member', inputSchema: { type: 'object', properties: { gathering_id: { type: 'string', description: 'ID of the gathering', }, old_name: { type: 'string', description: 'Current name of the member', }, new_name: { type: 'string', description: 'New name for the member', }, }, required: ['gathering_id', 'old_name', 'new_name'], }, },
  • Type guard function for validating 'rename_member' tool arguments at runtime.
    const isRenameMemberArgs = (args: any): args is { gathering_id: string; old_name: string; new_name: string } => typeof args === 'object' && args !== null && typeof args.gathering_id === 'string' && typeof args.old_name === 'string' && typeof args.new_name === 'string';
  • CLI handler for 'rename-member' command, called by MCP server, invokes service.rename_member and formats JSON/text output.
    def handle_rename_member(service, args): """Handle the rename-member command.""" try: member = service.rename_member(args.gathering_id, args.old_name, args.new_name) result = { "success": True, "member": { "old_name": args.old_name, "new_name": member.name } } if args.json: print(json.dumps(result)) else: print(f"Renamed member from '{args.old_name}' to '{member.name}'") 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

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