Skip to main content
Glama
Roland0511

MCP Feishu Project Manager

by Roland0511

get_work_item_detail

Retrieve detailed information about specific work items, such as stories, versions, or issues, from Feishu project management systems to enhance project tracking and decision-making.

Instructions

获取飞书项目工作项详情 Args: work_item_type_key: 工作项类型,可选值为"story"、"version"、"issue", 分别对应需求、版本、缺陷。 work_item_ids: 工作项ID,多个ID之间用逗号分隔

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
work_item_idsYes
work_item_type_keyYes

Implementation Reference

  • The MCP tool handler function for 'get_work_item_detail'. It parses comma-separated work_item_ids into a list of integers, ensures plugin token, and calls FSProjClient.get_workitem_detail to fetch details.
    @mcp.tool("get_work_item_detail") def get_work_item_detail(work_item_type_key: WorkItemType, work_item_ids: str): """获取指定工作项的详情信息 Args: work_item_type_key: 工作项类型,可选值为"story"、"version"、"issue", 分别对应需求、版本、缺陷。 work_item_ids: 工作项ID,多个ID之间用逗号分隔 """ client.get_plugin_token() id_list = [int(id.strip()) for id in work_item_ids.split(",")] return client.get_workitem_detail(work_item_type_key, id_list)
  • Type alias WorkItemType using Literal, defining allowed values for work_item_type_key parameter: 'story', 'version', 'issue'.
    # Define custom type for work item types WorkItemType = Literal["story", "version", "issue"]
  • FSProjClient helper method that makes the actual API request to retrieve work item details for given IDs and type.
    def get_workitem_detail(self, work_item_type_key: WorkItemType, work_item_ids: List[int]) -> List[Dict]: """获取工作项详情 Args: work_item_type_key: 工作项类型标识 """ data = { "work_item_ids": work_item_ids } response = self._request( "POST", f"/open_api/{self.project_key}/work_item/{work_item_type_key}/query", json_data=data ) err_code = response.get("code", 0) if err_code != 0: raise Exception(f"获取工作项详情失败,错误码: {err_code}, 错误信息: {response.get('err_msg')}") return response.get("data", {})

Other Tools

Related 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/Roland0511/mcp-feishu-proj'

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