list_polls
Retrieves all Geekbot polls a user has access to, with complete configuration: name, time, questions, participants, recurrence, anonymity.
Instructions
Retrieves and displays all Geekbot polls a user has access to, including their complete configuration details such as name, time, timezone, questions, participants, recurrence, anonymous, and creator.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- geekbot_mcp/tools/list_polls.py:38-56 (handler)The handler function that executes the list_polls tool logic. It calls gb.get_polls(), parses the response using poll_from_json_response, and returns a formatted JSON with the number of polls and their details.
async def handle_list_polls(gb: GeekbotClient) -> list[types.TextContent]: """List all polls of a Geekbot user Returns: str: Properly formatted JSON string of polls list """ polls = await gb.get_polls() parsed_polls = [poll_from_json_response(p).model_dump() for p in polls] return [ types.TextContent( type="text", text=json.dumps( { "number_of_polls": len(parsed_polls), "polls": parsed_polls, } ), ) ] - The Tool definition including name 'list_polls', description, and inputSchema (empty object, no parameters required).
list_polls = types.Tool( name="list_polls", description="Retrieves and displays all Geekbot polls a user has access to, including their complete configuration details such as name, time, timezone, questions, participants, recurrence, anonymous, and creator.", inputSchema={"type": "object", "properties": {}, "required": []}, ) - geekbot_mcp/tools/__init__.py:10-10 (registration)Import of handle_list_polls and list_polls from the list_polls module.
from geekbot_mcp.tools.list_polls import handle_list_polls, list_polls - geekbot_mcp/tools/__init__.py:21-21 (registration)Registration of list_polls in the list_tools() function which returns all available tools.
list_polls, - geekbot_mcp/tools/__init__.py:40-41 (registration)The run_tool function dispatches to handle_list_polls when the tool name is 'list_polls'.
case "list_polls": return await handle_list_polls(gb_client)