Skip to content

Tools ​

Limits and switches for the built-in tools. What the agent may touch is set in Permissions.

Files and shell ​

FieldDescriptionDefault
Tools.File.MaxFileSizeMax readable file size in bytes10485760
Tools.File.RipgrepPathOptional rg path; empty tries DOTCRAFT_RG_PATH, PATH, then fallback""
Tools.File.SearchTimeoutSecondsMax GrepFiles content-search time before timeout30
Tools.Shell.TimeoutShell timeout in seconds300
Tools.Shell.MaxOutputLengthMax shell output length in characters10000

Background terminals ​

FieldDescriptionDefault
Tools.Shell.Background.EnabledEnable background terminal sessionstrue
Tools.Shell.Background.DefaultYieldTimeMsDefault wait before a running command returns a background-session snapshot1000
Tools.Shell.Background.MaxYieldTimeMsMaximum wait accepted for a background-session read or write30000
Tools.Shell.Background.MaxSessionsPerThreadMaximum concurrent background terminals per thread8
Tools.Shell.Background.MaxSessionsPerWorkspaceMaximum concurrent background terminals in one workspace32
Tools.Shell.Background.IdleTimeoutSecondsReserved; not currently enforced by the background terminal service1800
Tools.Shell.Background.OutputMaxBytesReserved; not currently enforced by the background terminal service67108864
Tools.Shell.Background.OutputRetentionDaysRetention window for completed or lost terminal metadata and output; running terminals are excluded7
Tools.Shell.Background.StallWatchdogSecondsReserved; not currently enforced by the background terminal service45
Tools.Shell.Background.DefaultReadMaxOutputCharsDefault maximum characters returned in a terminal snapshot10000

Web ​

FieldDescriptionDefault
Tools.Web.MaxCharsMax chars for web fetch50000
Tools.Web.TimeoutWeb request timeout in seconds300
Tools.Web.SearchMaxResultsDefault search result count5
Tools.Web.SearchProviderBing / ExaExa

Tool results ​

FieldDescriptionDefault
Tools.ResultLimits.MaxToolResultCharsDefault tool result length in characters before the result spills to disk; 0 removes the limit for tools that use the global default50000
Tools.ResultLimits.SpillPreviewLinesHead and tail lines kept in the preview when a result spills to disk40

Image generation ​

FieldDescriptionDefault
Tools.ImageGeneration.EnabledLets the agent generate and edit images with supported OpenAI providerstrue
Tools.ImageGeneration.ProviderProvider id that generates images. Empty uses the conversation's providerEmpty
Tools.ImageGeneration.ModelImage model used for generation and editsgpt-image-2
Tools.ImageGeneration.MaxReferenceImagesMaximum reference images one edit can use, from 1 to 55

Generated images are saved under the Agent data directory at generated_images/<threadId>/<callId>.png. When connected to a remote computer, files are saved to the remote workspace’s .craft/generated_images/<threadId>/<callId>.png instead. If saving fails, the conversation still displays the generated image and reports the storage failure.

With a supported provider, ask DotCraft to generate an image, or to edit an attached, local, or previously generated one, in a normal conversation. DotCraft calls the OpenAI Images API, saves the PNG, and shows the image inline in clients that render rich content.

Two switches gate the image_gen.imagegen tool, and both must be true: the global Tools.ImageGeneration.Enabled, and the image provider's own SupportsImageGeneration. The image provider must also use an OpenAI protocol. Omitting the provider field leaves ChatGPT OAuth and the official OpenAI API-key endpoint enabled, and other endpoints disabled. Enable another endpoint only once you know it serves images/generations and images/edits.

The image provider is the conversation's provider unless Tools.ImageGeneration.Provider names another one. Set it to keep image generation available while you chat through a provider without an Images API, such as an Anthropic or a custom OpenAI-compatible endpoint:

json
{
  "Tools": {
    "ImageGeneration": {
      "Provider": "openai"
    }
  }
}

If the named provider is missing or cannot generate images, the tool is not offered; DotCraft does not fall back to the conversation's provider.

Code mode ​

FieldDescriptionDefault
Tools.CodeMode.ModeScripted tool calls: only, on, or offonly

Tools.CodeMode.Mode controls scripted tool calls. The CodeMode tool runs one JavaScript program that calls the conversation's other tools and returns only what the model needs, so batches of calls take one model round trip and large intermediate results stay out of context. With only, every tool a script can call leaves the model's direct tool list and is reached through CodeMode. on adds CodeMode and keeps every tool directly callable, and off removes it. In Desktop, change it under Settings › General › Tools.

Scripts run in a worker process started from the DotCraft executable. If the worker cannot start, on falls back to direct tools, while only fails the turn with code_mode_unavailable; use on or off where the host cannot launch it.