run_data_transform
Execute a data.transform.js script server-side and return its output along with any console.log/warn/error messages. Use this to test and debug your data transform code before committing it with update_file. The code must use the same export default function dataTransform({ files, mediaSources }) { ... } signature. The output is a SHAPE CHECK, not the data: anything larger than a few thousand characters comes back summarised — arrays as a length plus the first few items, objects cut at 20 keys and 3 levels deep, long strings cut — with a "note" saying so. Console output is capped the same way. Use it to confirm the structure and spot errors, not to read a catalogue.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"documentId": "<documentId>",
"code": "<code>",
"llm_model": "<llm_model>"
},
"name": "run_data_transform"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The complete data.transform.js code to execute. Must export a default function. | |
| llm_model | Yes | The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess. | |
| documentId | Yes | The catalogue's id. Call list_documents first if you do not have one. | |
| conversation_id | No | Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request. |