Skip to main content
Glama

mcp-data-extractor

by sammcj

extract_data

Extract embedded data (e.g., i18n translations) from source code into a structured JSON file. Replace source file with a migration notice for tracking. Customize behavior via environment variables.

Instructions

Extract data content (e.g. i18n translations) from source code to a JSON file. IMPORTANT: When encountering files with data such as i18n content embedded in code, use this tool directly instead of reading the file content first. This tool will programmatically extract all translations into a structured JSON file, preserving nested objects, arrays, template variables, and formatting. This helps keep translations as configuration and prevents filling up the AI context window with translation content. By default, the source file will be replaced with "MIGRATED TO " and a warning message after successful extraction, making it easy to track where the data was moved to. This behaviour can be disabled by setting the DISABLE_SOURCE_REPLACEMENT environment variable to 'true'. The warning message can be customized by setting the WARNING_MESSAGE environment variable.

Input Schema

NameRequiredDescriptionDefault
sourcePathYesPath to the source file containing data inside code
targetPathYesPath where the resulting JSON file should be written

Input Schema (JSON Schema)

{ "properties": { "sourcePath": { "description": "Path to the source file containing data inside code", "type": "string" }, "targetPath": { "description": "Path where the resulting JSON file should be written", "type": "string" } }, "required": [ "sourcePath", "targetPath" ], "type": "object" }

Other Tools from mcp-data-extractor

Related Tools

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/sammcj/mcp-data-extractor'

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