import_file
Imports files into a MOGA project by type: link codebases and videos, copy media, register JSON assets, or install skills, returning the stored kind, name, and path.
Instructions
Bring a file into the project, by what it is: a folder of code is linked as a codebase (link_codebase); a video given by path is linked where it is, never copied (copy=true copies it; it lists with list_references, and a video layer names it by its absolute path); a video given as data, an image, sound or subtitle file goes under media/ (listed with browse as media); an asset definition (.json: { description, type, props, anim }) becomes an asset of that name, checked as put_asset checks it; a skill (.md with a name and description in its front matter, or a SKILL.md) goes to skills//SKILL.md, for "/name". data is the file's bytes in base64, or path an absolute path to copy from. An existing file of that name is kept unless replace=true (the same bytes again import as the file already there). Returns { kind, name, path }.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "import_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| copy | No | Copy a video given by path into media/ instead of linking it | |
| data | No | The bytes, base64 | |
| name | No | The file name, with its extension (default: the name in path) | |
| path | No | Or an absolute path on this computer (a file dropped on the Studio): a video is linked where it is, anything else copied | |
| basis | No | What you read and followed to make this change, as refs from search or lookup: rule:<lint or taste rule>, taste, feedback:<id> (earlier feedback this follows; what it answers goes in feedback), commit:<id> (an earlier change it builds on), asset:, template:, skill:… The person sees them under the change, so they know why it is this way. Name only what shaped it. | |
| message | No | One line saying why, kept with the change in the history | |
| replace | No | ||
| feedback | No | Ids of the feedback this change answers (notes and marks from list_notes, list_examples or the conversation). When the person keeps the change it joins the record of that feedback, and when they then mark the feedback resolved it is the fix; when they take it back, the feedback opens again. | |
| confidence | No | How sure you are this change is what the person wants. high: they asked for exactly this, or you measured it against a reference. medium: you inferred it from the taste, a rule or earlier feedback. low: you are guessing, or it changes something they did not ask about. The person's threshold decides which changes stand by themselves and which wait for them to keep; say it honestly on every change. |