Skip to main content
Glama
Roland0511

MCP Feishu Project Manager

by Roland0511

get_flow_roles

Retrieve detailed flow role configurations for specific work item types (story, version, issue) in Feishu project management systems to understand access permissions and responsibilities.

Instructions

获取流程角色配置详情 Args: work_item_type_key: 工作项类型,可选值为"story"、"version"、"issue", 分别对应需求、版本、缺陷。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
work_item_type_keyYes

Implementation Reference

  • The MCP tool handler for 'get_flow_roles'. Ensures plugin authentication token is obtained and delegates to FSProjClient instance to fetch flow roles configuration.
    @mcp.tool("get_flow_roles")
    def get_flow_roles(work_item_type_key: WorkItemType):
        """获取流程角色配置详情
        Args:
            work_item_type_key: 工作项类型,可选值为"story"、"version"、"issue", 分别对应需求、版本、缺陷。
        """
        client.get_plugin_token()
        return client.get_flow_roles(work_item_type_key)
  • Core implementation in FSProjClient that makes the HTTP GET request to the Feishu Project API endpoint for flow roles and handles the response.
    def get_flow_roles(self, work_item_type_key: WorkItemType) -> Dict:
        """获取流程角色配置详情
        
        Args:
            work_item_type_key: 工作项类型标识,可选值为"story"、"version"、"issue"
            
        Returns:
            流程角色配置详情
        """
        response = self._request(
            "GET", 
            f"/open_api/{self.project_key}/flow_roles/{work_item_type_key}"
        )
        err_code = response.get("code", 0)
        if err_code != 0:
            raise Exception(f"获取流程角色配置详情失败,错误码: {err_code}, 错误信息: {response.get('err_msg')}")
        return response.get("data", {})
  • Type alias defining the valid input values for the work_item_type_key parameter: story, version, or issue.
    WorkItemType = Literal["story", "version", "issue"]
  • The @mcp.tool decorator registers the get_flow_roles function as an MCP tool with the name 'get_flow_roles'.
    @mcp.tool("get_flow_roles")

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