Skip to main content
Glama
lm203688

feishu-mcp-server

by lm203688

list_calendar_events

Retrieve a list of events from a Feishu calendar by specifying the calendar ID and a time range.

Instructions

获取飞书日历的日程列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendar_idYes日历ID
start_timeYes开始时间(Unix时间戳,秒)
end_timeYes结束时间(Unix时间戳,秒)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler function decorated with @mcp.tool(). Takes calendar_id, start_time, end_time as arguments, checks config.enable_calendar flag, calls client.list_calendar_events, and returns JSON response.
    @mcp.tool()
    def list_calendar_events(calendar_id: str, start_time: str, end_time: str) -> str:
        """获取飞书日历的日程列表
    
        Args:
            calendar_id: 日历ID
            start_time: 开始时间(Unix时间戳,秒)
            end_time: 结束时间(Unix时间戳,秒)
        """
        if not config.enable_calendar:
            return json.dumps({"error": "日历功能未启用"}, ensure_ascii=False)
        try:
            result = client.list_calendar_events(calendar_id, start_time, end_time)
            return json.dumps(result, ensure_ascii=False, indent=2, default=str)
        except Exception as e:
            return json.dumps({"error": str(e)}, ensure_ascii=False)
  • The tool is registered via the @mcp.tool() decorator on line 149, which registers list_calendar_events as an MCP tool with FastMCP.
    @mcp.tool()
    def list_calendar_events(calendar_id: str, start_time: str, end_time: str) -> str:
        """获取飞书日历的日程列表
  • FeishuClient method that implements the actual API call. Sends a GET request to /calendar/v4/calendars/{calendar_id}/events with start_time, end_time, and page_size (default 50) query parameters.
    def list_calendar_events(
        self, calendar_id: str, start_time: str, end_time: str, page_size: int = 50
    ) -> dict[str, Any]:
        """获取日历事件"""
        return self._request(
            "GET", f"/calendar/v4/calendars/{calendar_id}/events",
            params={
                "start_time": start_time,
                "end_time": end_time,
                "page_size": page_size,
            },
        )
  • Configuration schema: enable_calendar field (default True) controls whether calendar tools (including list_calendar_events) are enabled.
    enable_calendar: bool = Field(default=True, description="启用日历查询")
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, but it only repeats the tool's purpose. It does not mention authentication, rate limits, or how the results are ordered/paginated, which is insufficient for a list 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 a single, complete phrase with no redundant information. It is front-loaded and immediately conveys the core functionality, achieving maximum conciseness.

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

Completeness3/5

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

Given the simple list operation (3 required parameters) and the existence of an output schema, the description is minimally adequate but lacks details on pagination, time zone handling, or recurrence behavior that would make it complete for an AI agent.

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

Parameters3/5

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

Schema coverage is 100% with each parameter described inline, so the baseline is 3. The tool description adds no extra meaning beyond the schema, so it stays at baseline.

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 action (获取/get) and the resource (飞书日历的日程列表/schedule list of Feishu calendar), making the tool's purpose immediately obvious and distinguishable from siblings like list_calendars.

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

Usage Guidelines2/5

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

The description provides no guidance on when or when not to use this tool, nor does it mention alternatives. It only states the basic functionality, leaving the agent without context for decision-making.

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/lm203688/feishu-mcp-server'

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