Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

excel_to_csv

Convert Excel files (XLS, XLSX) to CSV format using a URL source. Supports public links, Google Drive, Dropbox, and custom worksheet indexing for precise extraction.

Instructions

Convert Excel(XLS, XLSX) to CSV. Ref: https://developer.pdf.co/api-reference/convert-from-excel/csv.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)
httppasswordNoHTTP auth password if required to access source url. (Optional)
httpusernameNoHTTP auth user name if required to access source url. (Optional)
nameNoFile name for the generated output. (Optional)
urlYesURL to the source file (XLS, XLSX). Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files.
worksheetIndexNoIndex of the worksheet to convert. (Optional)

Implementation Reference

  • The primary handler for the 'excel_to_csv' MCP tool, including registration via @mcp.tool(), input schema via Pydantic Field descriptions, and execution logic that delegates to the shared convert_to helper using PDF.co API.
    @mcp.tool() async def excel_to_csv( url: str = Field( description="URL to the source file (XLS, XLSX). Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files." ), httpusername: str = Field( description="HTTP auth user name if required to access source url. (Optional)", default="", ), httppassword: str = Field( description="HTTP auth password if required to access source url. (Optional)", default="", ), name: str = Field( description="File name for the generated output. (Optional)", default="" ), worksheetIndex: str = Field( description="Index of the worksheet to convert. (Optional)", default="" ), api_key: str = Field( description="PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)", default="", ), ) -> BaseResponse: """ Convert Excel(XLS, XLSX) to CSV. Ref: https://developer.pdf.co/api-reference/convert-from-excel/csv.md """ return await convert_to( "xls", "csv", ConversionParams( url=url, httpusername=httpusername, httppassword=httppassword, name=name, worksheetIndex=worksheetIndex, api_key=api_key, ), )

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/pdfdotco/pdfco-mcp'

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