Skip to main content
Glama
lm203688

feishu-mcp-server

by lm203688

get_sheet_values

Get cell values from a Feishu spreadsheet by providing its token and a data range.

Instructions

获取飞书电子表格的数据

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spreadsheet_tokenYes电子表格Token
range_Yes数据范围(如 Sheet1!A1:D10)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler function for 'get_sheet_values'. Decorated with @mcp.tool(), it receives spreadsheet_token and range_, calls client.get_sheet_values(), and returns the result as JSON.
    @mcp.tool()
    def get_sheet_values(spreadsheet_token: str, range_: str) -> str:
        """获取飞书电子表格的数据
    
        Args:
            spreadsheet_token: 电子表格Token
            range_: 数据范围(如 Sheet1!A1:D10)
        """
        if not config.enable_sheet:
            return json.dumps({"error": "电子表格功能未启用"}, ensure_ascii=False)
        try:
            result = client.get_sheet_values(spreadsheet_token, range_)
            return json.dumps(result, ensure_ascii=False, indent=2, default=str)
        except Exception as e:
            return json.dumps({"error": str(e)}, ensure_ascii=False)
  • Client method that executes the actual Feishu API request to GET /sheets/v2/spreadsheets/{token}/values/{range_} to retrieve sheet cell values.
    def get_sheet_values(self, spreadsheet_token: str, range_: str) -> dict[str, Any]:
        """获取电子表格数据"""
        return self._request(
            "GET", f"/sheets/v2/spreadsheets/{spreadsheet_token}/values/{range_}"
        )
  • Registration via @mcp.tool() decorator on the get_sheet_values function in server.py.
    @mcp.tool()
  • Test assertion verifying 'get_sheet_values' is registered as a tool name in the MCP server.
    "list_sheets", "get_sheet_values",
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, error handling, rate limits, or what happens with invalid ranges. The agent lacks crucial context for safe invocation.

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

Conciseness2/5

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

The description is a single phrase, making it too brief and lacking essential information about usage and behavior. It is under-specified rather than concise, as it omits context that would be valuable for the agent.

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?

The tool has two required parameters and an output schema (not shown), so the description does not need to explain return values. However, it lacks context on authentication, error scenarios, and range format expectations. Overall, minimally adequate but not complete.

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 Chinese descriptions for both parameters (spreadsheet_token and range_). The description adds no additional meaning beyond the schema. Baseline 3 is appropriate as the schema already provides sufficient parameter documentation.

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

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '获取飞书电子表格的数据' (Get Feishu spreadsheet data) clearly identifies the tool's action and resource. However, it is somewhat vague as 'data' could encompass many things, and it does not distinguish from sibling tools like list_sheets.

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?

No usage guidelines are provided. The description does not mention when to use this tool versus alternatives (e.g., list_sheets for sheet metadata), nor any prerequisites or limitations.

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