upload_file
Write a binary asset (chart, figure, PDF) into the project from base64-encoded bytes — the only way to deliver an image for \includegraphics. Allowed extensions: png, jpg, jpeg, gif, webp, svg, pdf, zip, docx, xlsx, eps. Reachable over MCP up to ~22.5MB raw bytes per call — the /mcp transport body limit (30MiB) caps the base64 payload, and oversize calls are rejected by the transport layer with an opaque 413 before this tool runs; send larger assets through the web app. Text files still use write_file. For a whole directory or many binaries do NOT loop this tool — every byte would have to flow through your context (a single ~300KB figure already exceeds one model output); have the user attach the git repository to the project and pull it with sync_from_git instead.
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": {
"project_id": "<project_id>",
"path": "<path>",
"content_base64": "<content_base64>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | No | ||
| path | Yes | ||
| project_id | Yes | ||
| content_base64 | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |