Skip to main content
Glama

get_today_tasks

Retrieve today's tasks from Notion, including due items and ongoing work, sorted by priority for daily workflow management.

Instructions

获取今日相关任务:今天到期的任务 + 所有进行中的任务。

Returns: 任务列表,按优先级排序

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool handler for "get_today_tasks", which calls the underlying Notion client and formats the result.
    def get_today_tasks() -> list[dict]:
        """
        获取今日相关任务:今天到期的任务 + 所有进行中的任务。
    
        Returns:
            任务列表,按优先级排序
        """
        tasks = get_client().get_today_tasks()
        return [t.model_dump() for t in tasks]
  • The implementation of the logic for fetching today's tasks from the Notion API.
    def get_today_tasks(self) -> list[Task]:
        today = datetime.now(timezone.utc).date().isoformat()
        tomorrow = (datetime.now(timezone.utc).date() + timedelta(days=1)).isoformat()
    
        response = self.client.data_sources.query(
            data_source_id=self.workflow_db_id,
            filter={
                "or": [
                    {
                        "property": "状态",
                        "select": {"equals": TaskStatus.IN_PROGRESS.value},
                    },
                    {
                        "and": [
                            {"property": "截止日期", "date": {"on_or_after": today}},
                            {"property": "截止日期", "date": {"before": tomorrow}},
                        ]
                    },
                ]
            },
            sorts=[{"property": "优先级", "direction": "ascending"}],
            page_size=30,
        )
        return [self._parse_task(p) for p in response["results"]]
  • server.py:56-56 (registration)
    Registration of the get_today_tasks function as an MCP tool.
    mcp.tool(get_today_tasks)
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the return format ('任务列表,按优先级排序' - task list sorted by priority) which is valuable behavioral information. However, it doesn't mention pagination, error conditions, authentication needs, or rate limits that would be helpful for a read operation.

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

Conciseness5/5

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

The description is extremely concise with two sentences that each earn their place: the first defines scope and purpose, the second specifies return format and sorting. No wasted words, perfectly front-loaded with the core functionality.

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 (which handles return value documentation) and no parameters, the description provides adequate context about what the tool retrieves and how it's sorted. For a simple read-only tool with output schema, this is reasonably complete, though it could benefit from more behavioral transparency.

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?

With 0 parameters and 100% schema description coverage, the baseline would be 4. The description doesn't need to explain parameters since there are none, and it appropriately focuses on what the tool does rather than parameter details.

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

Purpose5/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 with specific verbs and resources: '获取今日相关任务' (get today-related tasks) and defines scope as '今天到期的任务 + 所有进行中的任务' (tasks due today + all ongoing tasks). It distinguishes from siblings like list_tasks or get_task by focusing specifically on today's context.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool (for tasks due today or ongoing), but doesn't explicitly mention when NOT to use it or name alternatives. It implies usage for today-focused task retrieval versus general listing tools.

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