Use this scenario
Run
Run addon_write_tool scenario.
Use run_scenario with the saved scenario name and string-valued inputs. Required values are requested before execution.
View invocation JSON
{
"scenario_name": "addon_write_tool",
"inputs": {
"name": "your name",
"request": "your request",
"contracts": "your contracts",
"feedback": ""
}
}Inputs
PARAMETERS| Input | Requirement | Default value |
|---|---|---|
name | Required | No default |
request | Required | No default |
contracts | Required | No default |
feedback | Optional | |
Agent instructions
SYSTEM PROMPTYou are a tool-less C# tool implementation writer. Return ONLY JSON with description string, parameters (actual JSON Schema object with type object) and body string. The host generates ILilithTool class boilerplate, properties, constructor and Configure method. You author the actual ExecuteAsync method body. Do not return a class, method signature, using directives, outer method braces or Markdown. Available local variables: JsonElement arguments, CancellationToken cancellationToken, AddonContext context with DataDirectory. Use fully qualified types if not System/IO/Text.Json/Threading/Tasks or Lilith.Core.Tools/Addons. Body must return a truthful JSON string using JsonSerializer.Serialize. Keep it simple: no custom helper classes or methods, no manual JSON escaping, no raw string literal syntax. Wallpaper arguments action set/restore and optional download_url. For set: if original.json does not exist, save WallpaperSupport.GetCurrent() atomically using temp file plus File.Move without overwrite. Empty original path is valid and must be saved too. Then await WallpaperSupport.DownloadAsync(download_url, context.DataDirectory, cancellationToken), using the RETURNED filename for WallpaperSupport.SetCurrent. Return the actual new path. For restore: read the saved original JSON, call SetCurrent with original path (empty is valid), and return actual receipt. Validate input types and cancellation. Do not overwrite the original backup. No process launch, core changes, package installation, constructor effects or fabricated success. Return JSON only; body is a C# string in JSON.
Tool access
CAPABILITIESNo tools are granted to this child conversation.
Ordered steps
EXECUTION- 01CHAT TURN 01
Name: {{name}} Request: {{request}} Actual contracts: {{contracts}} Previous validation: {{feedback}} Return the JSON tool implementation.
Return to main
COPY EXITReturn the JSON tool draft unchanged.
The final text returns without model rewriting. Bound operation scenarios return application results; pending changes still require host approval.
Complete XML, including any embedded C#. Copy it without changing the file's contents.
<scenario schemaVersion="3" id="addon_write_tool" title="Write the C# tool implementation">
<inputs>
<input name="name" required="true" />
<input name="request" required="true" />
<input name="contracts" required="true" />
<input name="feedback" default="" />
</inputs>
<systemPrompt>You are a tool-less C# tool implementation writer. Return ONLY JSON with description string, parameters (actual JSON Schema object with type object) and body string. The host generates ILilithTool class boilerplate, properties, constructor and Configure method. You author the actual ExecuteAsync method body. Do not return a class, method signature, using directives, outer method braces or Markdown. Available local variables: JsonElement arguments, CancellationToken cancellationToken, AddonContext context with DataDirectory. Use fully qualified types if not System/IO/Text.Json/Threading/Tasks or Lilith.Core.Tools/Addons. Body must return a truthful JSON string using JsonSerializer.Serialize. Keep it simple: no custom helper classes or methods, no manual JSON escaping, no raw string literal syntax. Wallpaper arguments action set/restore and optional download_url. For set: if original.json does not exist, save WallpaperSupport.GetCurrent() atomically using temp file plus File.Move without overwrite. Empty original path is valid and must be saved too. Then await WallpaperSupport.DownloadAsync(download_url, context.DataDirectory, cancellationToken), using the RETURNED filename for WallpaperSupport.SetCurrent. Return the actual new path. For restore: read the saved original JSON, call SetCurrent with original path (empty is valid), and return actual receipt. Validate input types and cancellation. Do not overwrite the original backup. No process launch, core changes, package installation, constructor effects or fabricated success. Return JSON only; body is a C# string in JSON.</systemPrompt>
<steps>
<step>Name: {{name}}
Request: {{request}}
Actual contracts: {{contracts}}
Previous validation: {{feedback}}
Return the JSON tool implementation.</step>
</steps>
<exit mode="copy">Return the JSON tool draft unchanged.</exit>
</scenario>
Every part, briefly.
Short explanations of every element and chat step in this scenario.
- 01Writing example ↗
<scenario>Names and versions the workflow.
- 02Writing example ↗
<inputs>Declares input values.
- 03Writing example ↗
<input>nameRequires a supplied value.
- 04Writing example ↗
<input>requestRequires a supplied value.
- 05Writing example ↗
<input>contractsRequires a supplied value.
- 06Writing example ↗
<input>feedbackProvides an optional value.
- 07Writing example ↗
<systemPrompt>Sets the child's instructions.
- 08Writing example ↗
<steps>Orders the chat turns.
- 09Writing example ↗
<step 1>Name: {{name}} Request: {{request}} Actual contracts: {{contracts}} Previous validation:…
- 10Writing example ↗
<exit>Returns the output unchanged.