fetch_reports
Retrieve standup reports to analyze team updates, track progress, or compile summaries. Filter by standup ID, user, or date range.
Instructions
Retrieves Geekbot standup reports. Use this tool to analyze team updates or updates from specific colleagues, track progress, or compile summaries of standup activities. This tool is usually used after the list_standups tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| standup_id | No | ID of the specific standup to fetch reports for. If not provided, reports for all standups will be fetched. | |
| user_id | No | ID of the specific user to fetch reports for. If not provided, reports for all members will be fetched. | |
| after | No | Fetch reports after this date (format: YYYY-MM-DD) | |
| before | No | Fetch reports before this date (format: YYYY-MM-DD) |
Implementation Reference
- geekbot_mcp/tools/fetch_reports.py:37-83 (handler)The handler function that executes the fetch_reports tool logic: calls the Geekbot API to get reports, parses them, and returns JSON with report count, reports data, and unique reporter count.
async def handle_fetch_reports( gb_client: GeekbotClient, standup_id: int | None = None, user_id: int | None = None, after: str | None = None, before: str | None = None, ) -> list[types.TextContent]: """Fetch reports list from Geekbot Args: standup_id: int, optional, default is None and means for all standups. The standup id to fetch reports for user_id: int, optional, default is None and means for all members. The user id to fetch reports for after: str, optional, default is None The date to fetch reports after in YYYY-MM-DD format before: str, optional, default is None The date to fetch reports before in YYYY-MM-DD format Returns: str: Properly formatted JSON string of reports list """ after_ts = None before_ts = None if after: after_ts = datetime.strptime(after, "%Y-%m-%d").timestamp() if before: before_ts = datetime.strptime(before, "%Y-%m-%d").timestamp() reports = await gb_client.get_reports( standup_id=standup_id, user_id=user_id, after=after_ts, before=before_ts, ) parsed_reports = [report_from_json_response(r) for r in reports] parsed_reports_json = [r.model_dump() for r in parsed_reports] unique_reporters = list({r.reporter for r in parsed_reports}) return [ types.TextContent( type="text", text=json.dumps( { "number_of_reports": len(parsed_reports), "reports": parsed_reports_json, "number_of_reporters": len(unique_reporters), } ), ) ] - The tool definition/schema with name 'fetch_reports', description, and input schema specifying optional parameters: standup_id, user_id, after, before.
fetch_reports = types.Tool( name="fetch_reports", description="Retrieves Geekbot standup reports. Use this tool to analyze team updates or updates from specific colleagues, track progress, or compile summaries of standup activities. This tool is usually used after the `list_standups` tool.", inputSchema={ "type": "object", "properties": { "standup_id": { "type": "integer", "description": "ID of the specific standup to fetch reports for. If not provided, reports for all standups will be fetched.", }, "user_id": { "type": "string", "description": "ID of the specific user to fetch reports for. If not provided, reports for all members will be fetched.", }, "after": { "type": "string", "description": "Fetch reports after this date (format: YYYY-MM-DD)", }, "before": { "type": "string", "description": "Fetch reports before this date (format: YYYY-MM-DD)", }, }, "required": [], }, ) - geekbot_mcp/tools/__init__.py:15-23 (registration)Registration of fetch_reports in the tools list (line 19) so it is discoverable via list_tools().
def list_tools() -> list[types.Tool]: return [ list_members, list_standups, fetch_reports, post_report, list_polls, fetch_poll_results, ] - geekbot_mcp/tools/__init__.py:26-45 (registration)The run_tool routing/dispatch that matches the string 'fetch_reports' and calls handle_fetch_reports with the client and arguments.
async def run_tool( gb_client: GeekbotClient, name: str, arguments: dict[str, str] | None, ) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]: match name: case "list_members": return await handle_list_members(gb_client) case "list_standups": return await handle_list_standups(gb_client) case "fetch_reports": return await handle_fetch_reports(gb_client, **arguments) case "post_report": return await handle_post_report(gb_client, **arguments) case "list_polls": return await handle_list_polls(gb_client) case "fetch_poll_results": return await handle_fetch_poll_results(gb_client, **arguments) case _: raise ValueError(f"Tool {name} not found") - Prompt template that references fetch_reports tool in its workflow instructions for generating weekly rollup reports.
weekly_rollup_report_prompt = types.Prompt( name="weekly_rollup_report", description="Generate a comprehensive weekly rollup report that summarizes team standup responses, highlights key updates, identifies risks and mitigation strategies, outlines next steps, and tracks upcoming launches. The report organizes information in a structured format for executive visibility and team alignment.", arguments=[ types.PromptArgument( name="standup_id", description="The ID of the standup to include in the rollup report", required=False, ), ], )