Skip to main content
Glama
zsanjay

Document Tools

by zsanjay

文档工具

一个 Python 包,实现了各种用于转换和处理文档格式的文档相关工具。这些工具通过 MCP 服务器接口暴露,以便与 AI 助手无缝集成。

设置

# Create a virtual env and activate it
uv venv
source .venv/bin/activate

# Install the package in development mode
uv pip install -e .

Related MCP server: Document Tools

运行

# Start the MCP server
uv run main.py

测试

# Run all tests
uv run pytest

开发

工具定义

工具被定义为 Python 函数,并注册到 MCP 服务器:

mcp.tool()(my_function)

工具说明应:

  • 以一句话摘要开头

  • 提供功能的详细说明

  • 解释何时使用(以及何时不使用)该工具

  • 包含带有预期输入/输出的用法示例

使用 pydantic 中的 Field 来描述参数:

from pydantic import Field

def my_tool(
    param1: str = Field(description="Detailed description of this parameter"),
    param2: int = Field(description="Explain what this parameter does")
) -> ReturnType:
    """Comprehensive docstring here"""
    # Implementation

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that uses the Docling toolkit to convert various document formats, including PDFs, Office files, images, and audio, into clean Markdown for AI processing. It supports multiple processing pipelines like VLM and ASR with intelligent auto-detection and job queue management.
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables document conversion and processing through an MCP server interface for AI assistants.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that uses Docling to convert PDFs, Office documents, images, audio, and more into clean Markdown for AI processing and RAG pipelines.
    6
    -