excel_to_json_mcp_from_url
Convert Excel files from public URLs to JSON format with configurable output options for structured data extraction.
Instructions
Convert Excel (.xlsx) from publicly accessible URL(string format) to JSON. If you do not have a Pro Code, please pass only the url parameter, but not options parameter in the request.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Publically accessible URL(string format) to Excel file(.xlsx) | |
| options | No | If you do not have a Pro Code, please do not pass the options parameter in the request. |
Implementation Reference
- src/index.ts:68-80 (handler)Handler function that validates proCode, calls processURLExcel to convert Excel from URL to JSON, handles errors, and returns the result as a text content block.async ({ url, options }) => { if (options && !options.proCode) { options.proCode = process.env.proCode || '' } let result = await processURLExcel(url, options) if (result.isError) { result['data'] = '' result['msg'] = result['msg'] + ' Refer to Documentation at ' + URLs.mcp } else { result['msg'] = 'success' } return { content: [{ type: "text", text: JSON.stringify(result) }] }; }
- src/index.ts:51-67 (schema)Input schema definition including title, description, and Zod schema for 'url' parameter and optional 'options' with conversion settings.{ title: "Excel to JSON MCP by WTSolutions - from url", description: "Convert Excel (.xlsx) from publicly accessible URL(string format) to JSON. If you do not have a Pro Code, please pass only the url parameter, but not options parameter in the request.", inputSchema: { url: z.string().nonempty().describe("Publically accessible URL(string format) to Excel file(.xlsx)"), options: z.object({ jsonMode: z.enum(['nested', 'flat']).optional().describe("Format mode for JSON output: 'nested' or 'flat'"), header: z.enum(['row', 'column']).optional().describe("Specifies which row/column to use as headers: 'row' (first row) or 'column' (first column)"), delimiter: z.enum(['.', '_', '__', '/']).optional().describe("Delimiter character for nested JSON keys when using nested jsonMode: '.', '_', '__', '/'"), emptyCell: z.enum(['emptyString', 'null', 'exclude']).optional().describe("Handling of empty cells: 'emptyString', 'null', or 'exclude'"), booleanFormat: z.enum(['trueFalse', '10', 'string']).optional().describe("Format for boolean values: 'trueFalse', '10', or 'string'"), jsonFormat: z.enum(['arrayOfObject', '2DArray']).optional().describe("Overall JSON output format: 'arrayOfObject' or '2DArray'"), singleObjectFormat: z.enum(['array', 'object']).optional().describe("Format when result has only one object: 'array' (keep as array) or 'object' (return as single object)"), proCode: z.string().optional().describe("Pro Code for Excel to JSON by WTSolutions, if you have one. If you do not have a Pro Code, please do not pass the options parameter in the request."), }).optional().describe("If you do not have a Pro Code, please do not pass the options parameter in the request."), } },
- src/index.ts:49-81 (registration)Complete registration of the excel_to_json_mcp_from_url tool using server.registerTool, including name, schema, and handler.server.registerTool( "excel_to_json_mcp_from_url", { title: "Excel to JSON MCP by WTSolutions - from url", description: "Convert Excel (.xlsx) from publicly accessible URL(string format) to JSON. If you do not have a Pro Code, please pass only the url parameter, but not options parameter in the request.", inputSchema: { url: z.string().nonempty().describe("Publically accessible URL(string format) to Excel file(.xlsx)"), options: z.object({ jsonMode: z.enum(['nested', 'flat']).optional().describe("Format mode for JSON output: 'nested' or 'flat'"), header: z.enum(['row', 'column']).optional().describe("Specifies which row/column to use as headers: 'row' (first row) or 'column' (first column)"), delimiter: z.enum(['.', '_', '__', '/']).optional().describe("Delimiter character for nested JSON keys when using nested jsonMode: '.', '_', '__', '/'"), emptyCell: z.enum(['emptyString', 'null', 'exclude']).optional().describe("Handling of empty cells: 'emptyString', 'null', or 'exclude'"), booleanFormat: z.enum(['trueFalse', '10', 'string']).optional().describe("Format for boolean values: 'trueFalse', '10', or 'string'"), jsonFormat: z.enum(['arrayOfObject', '2DArray']).optional().describe("Overall JSON output format: 'arrayOfObject' or '2DArray'"), singleObjectFormat: z.enum(['array', 'object']).optional().describe("Format when result has only one object: 'array' (keep as array) or 'object' (return as single object)"), proCode: z.string().optional().describe("Pro Code for Excel to JSON by WTSolutions, if you have one. If you do not have a Pro Code, please do not pass the options parameter in the request."), }).optional().describe("If you do not have a Pro Code, please do not pass the options parameter in the request."), } }, async ({ url, options }) => { if (options && !options.proCode) { options.proCode = process.env.proCode || '' } let result = await processURLExcel(url, options) if (result.isError) { result['data'] = '' result['msg'] = result['msg'] + ' Refer to Documentation at ' + URLs.mcp } else { result['msg'] = 'success' } return { content: [{ type: "text", text: JSON.stringify(result) }] }; } );