Create a strategy file
create_fileCreates a file in a new immutable revision for any strategy owned by the authenticated user. For the current attached workspace, omit strategyId and revisionId. When create_strategy attaches the workspace through conversationUpdate, these defaults also apply to new first-build files. If creation returned no conversationUpdate, copy the exact returned strategyId/revisionId pair. Provide exactly one of content or attachment. For user-requested exact upload import, use attachment: {messageId, attachmentId} from attachments(action="list"); the server preserves original UTF-8 bytes and returns size/hash evidence. Read the new file back with get_file. Do not invent unavailable upload contents or import files without user intent. Use only for files that do not already exist; do not use this to update main.py or requirements.txt after create_strategy. Use replace_file for replacing an existing file and patch_file for small exact edits. For plan-driven first-build work, make the visible implementation item in_progress with update_plan_item before using file tools so the user sees the current plan step while file work runs. Use paths like lib/helpers.py or data/symbols.csv for folders. Default to the active strategy unless the user explicitly asks for another owned strategy.
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": {
"path": "<path>"
},
"name": "create_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | No | ||
| attachment | No | Exact original upload to import instead of model-transcribed content. Use only when the user requested this import. | |
| revisionId | No | Base revision ID to snapshot from. Omit with strategyId for the current attached/open strategy. | |
| strategyId | No | Base strategy id. Omit with revisionId for the current attached/open strategy so the server uses the conversation's latest saved revision. | |
| description | No | Shown to the customer as "How your strategy works". One or two plain sentences on what the strategy now does, e.g. "Buys Apple after a 5% drop in a day and sells at a 10% gain." Write for the customer, not an internal change note. |