Write (overwrite) a file in the executor workspace (UNC writefile)
write-fileWrites content to a file in the executor workspace folder, creating it if needed and overwriting existing contents.
Instructions
Write content to a file in the executor's workspace folder, creating it if needed and OVERWRITING any existing contents. NOTE: this is executor-side file I/O — the connector runs INSIDE the executor, so the path is relative to the executor's workspace directory on the host machine, NOT the Roblox game. Requires the UNC function writefile(path, content). The call is type-guarded and pcall-wrapped: if writefile is missing you get { error = 'writefile is not available in this executor.' }, and any write failure (bad path, denied extension, permission) returns { error = }. Returns { path, ok = true } or { error }. Signature: { path: string, content: string, threadContext: number?, timeoutMs: number? }. Phase: act; cost=medium; idempotency=contextual-write. Requires: active-client, resolved-target, explicit-mutation-approval. Capabilities: executor filesystem. Produces: operation-receipt. Verify with: file-exists. Safety: MUTATING; writes executor workspace filesystem. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file within the executor workspace folder, e.g. 'config.json'. Existing contents are replaced. | |
| content | Yes | The full text content to write to the file. | |
| timeoutMs | No | Optional per-call deadline in milliseconds; omit it to use the tool or server default. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |