Skip to main content
Glama
lm203688

feishu-mcp-server

by lm203688

get_doc_meta

Retrieve Feishu document metadata such as title and owner by providing the document ID.

Instructions

获取飞书文档的元信息(标题、所有者等)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYes飞书文档ID

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for get_doc_meta - fetches document metadata (title, owner, etc.) from Feishu via the client layer. Decorated with @mcp.tool() to register as an MCP tool.
    @mcp.tool()
    def get_doc_meta(document_id: str) -> str:
        """获取飞书文档的元信息(标题、所有者等)
    
        Args:
            document_id: 飞书文档ID
        """
        if not config.enable_doc:
            return json.dumps({"error": "文档功能未启用"}, ensure_ascii=False)
        try:
            result = client.get_doc_meta(document_id)
            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 helper that makes the actual HTTP GET request to the Feishu API endpoint /docx/v1/documents/{document_id} to retrieve document metadata.
    def get_doc_meta(self, document_id: str) -> dict[str, Any]:
        """获取文档元信息"""
        return self._request("GET", f"/docx/v1/documents/{document_id}")
  • Registration via @mcp.tool() decorator on the FastMCP instance, which registers the function as an MCP tool named 'get_doc_meta'.
    @mcp.tool()
    def get_doc_meta(document_id: str) -> str:
Behavior4/5

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

No annotations are provided, so the description carries full burden. It explicitly states the tool returns metadata (title, owner, etc.), implying a read-only operation. While it doesn't explicitly declare safety or side effects, the simple nature of the tool makes this sufficient.

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, efficient sentence that front-loads the purpose. No unnecessary words.

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

Completeness5/5

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

Given the low complexity (1 parameter, output schema exists), the description provides sufficient context: it explains what metadata is retrieved (title, owner, etc.) and covers the essential purpose. No gaps.

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% (the only parameter 'document_id' is described in the schema as '飞书文档ID'). The description adds no additional meaning beyond the schema, so baseline score of 3 applies per rules.

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 tool's function: 'get Feishu document metadata (title, owner, etc.)'. It uses a specific verb ('get') and resource ('doc metadata'), and distinguishes it from siblings like 'get_doc_content' which retrieves content.

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

Usage Guidelines3/5

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

The description implies usage for retrieving metadata but provides no explicit guidance on when to use this tool over alternatives, nor any when-not-to-use or prerequisites. The context is clear but lacks exclusionary details.

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