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")
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('获取流程角色配置详情') and lists parameter values, without describing any behavioral traits like whether it's read-only, requires authentication, has rate limits, or what the output format might be. For a tool with no annotations, this is a significant gap in transparency.

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 sized and front-loaded, starting with the tool's purpose followed by parameter details. It uses two sentences efficiently, with no wasted words. However, the structure could be slightly improved by separating the purpose and parameter sections more clearly, but it remains concise and well-organized.

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 tool's complexity (single parameter with enum), no annotations, and no output schema, the description is partially complete. It explains the parameter semantics well, but lacks behavioral context and usage guidelines. For a retrieval tool, it should ideally describe the output or behavior more, but the parameter coverage helps balance this. It meets a minimum viable level but has clear gaps in overall context.

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

Parameters5/5

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

The description adds substantial meaning beyond the input schema. The schema has 0% description coverage, only providing an enum without explanations. The description explicitly defines the parameter 'work_item_type_key' and maps each enum value to its semantic meaning: 'story' to '需求' (requirement), 'version' to '版本' (version), and 'issue' to '缺陷' (defect). This compensates fully for the low schema coverage, making the parameter usage clear.

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: '获取流程角色配置详情' (Get process role configuration details). It specifies the verb '获取' (get) and the resource '流程角色配置详情' (process role configuration details), which is specific and meaningful. However, it doesn't differentiate this tool from its siblings (e.g., get_view_detail, get_work_item_detail), which are also retrieval tools, so it doesn't fully distinguish itself in context.

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 to use this tool versus alternatives. It lists the parameter values but doesn't explain the context or prerequisites for invoking it, such as when process role details are needed compared to other details available from sibling tools. There's no mention of alternatives or exclusions, leaving usage unclear.

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

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