Skip to main content
Glama

generate_weekly_review

Generate weekly work reports and retrospectives for Notion, summarizing completed tasks, ongoing work, and created notes to track productivity and progress.

Instructions

生成工作周报/复盘,默认为本周,week_offset=-1 为上周。

Args: week_offset: 0 = 本周,-1 = 上周,以此类推

Returns: WeeklyReview 字典,包含完成任务、进行中任务、创建笔记数和总结

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
week_offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that generates the weekly review report.
    def generate_weekly_review(week_offset: int = 0) -> dict:
        """
        生成工作周报/复盘,默认为本周,week_offset=-1 为上周。
    
        Args:
            week_offset: 0 = 本周,-1 = 上周,以此类推
    
        Returns:
            WeeklyReview 字典,包含完成任务、进行中任务、创建笔记数和总结
        """
        client = get_client()
        now = datetime.now(timezone.utc)
    
        # Calculate week boundaries (Monday to Sunday)
        monday = now - timedelta(days=now.weekday()) + timedelta(weeks=week_offset)
        monday = monday.replace(hour=0, minute=0, second=0, microsecond=0)
        sunday = monday + timedelta(days=6, hours=23, minutes=59, seconds=59)
    
        year, week_num, _ = monday.isocalendar()
        week_label = f"{year}-W{week_num:02d}"
    
        # Completed tasks this week
        done_tasks = client.list_tasks(status=TaskStatus.DONE, limit=100)
        weekly_done = [
            t for t in done_tasks
            if t.created_time and monday <= t.created_time <= sunday
        ]
    
        # In-progress tasks
        in_progress = client.list_tasks(status=TaskStatus.IN_PROGRESS, limit=50)
    
        # Notes created this week
        notes = client.list_notes(limit=100)
        weekly_notes_count = sum(
            1 for n in notes
            if n.created_time and monday <= n.created_time <= sunday
  • server.py:58-58 (registration)
    The tool registration in the MCP server.
    mcp.tool(generate_weekly_review)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the default week behavior but doesn't describe what data sources it uses, whether it requires specific permissions, how it handles missing data, or any rate limits. The description is minimal and lacks important behavioral context for a generation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with three sentences that each serve a purpose: stating the tool's function, explaining the parameter, and describing the return value. It's well-structured and front-loaded with the main purpose. Minor deduction for slightly awkward formatting with the Args/Returns labels.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (Returns section describes WeeklyReview dictionary structure), the description doesn't need to fully explain return values. It covers the main purpose, parameter semantics, and return structure adequately for a generation tool. However, with no annotations and minimal behavioral context, it could be more complete about data sources and limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It provides clear semantic explanation of the week_offset parameter with examples (0 = 本周, -1 = 上周, 以此类推), which adds meaningful context beyond the bare schema. However, it doesn't explain parameter constraints or validation rules.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '生成工作周报/复盘' (generate work weekly review/summary). It specifies the resource (weekly review) and verb (generate), but doesn't explicitly differentiate from sibling tools like 'generate_standup' or other reporting tools, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage guidance by mentioning default behavior (默认为本周, default is this week) and the week_offset parameter explanation. However, it doesn't explicitly state when to use this tool versus alternatives like 'generate_standup' or other reporting tools, nor does it mention prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/wauwaya/notion-workflow-mcp'

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