V18 / BUNDLED SCENARIO

Write the C# tool implementation

Write the C# tool implementation: 1 ordered steps in Lilith V18, with no tool access. Read the exact bundled XML and its input and exit contracts.

V18Pinned source · 8d896b8a86e5Exit: copy

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
JSON
{
  "scenario_name": "addon_write_tool",
  "inputs": {
    "name": "your name",
    "request": "your request",
    "contracts": "your contracts",
    "feedback": ""
  }
}
SCENARIO BLUEPRINT

Read the workflow.

addon_write_tool4 INPUTS / 0 TOOLS / 1 STEPS
01

Inputs

PARAMETERS
InputRequirementDefault value
nameRequiredNo default
requestRequiredNo default
contractsRequiredNo default
feedbackOptional
02

Agent instructions

SYSTEM PROMPT

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.

03

Tool access

CAPABILITIES

No tools are granted to this child conversation.

04

Ordered steps

EXECUTION
  1. 01
    CHAT TURN 01

    Name: {{name}} Request: {{request}} Actual contracts: {{contracts}} Previous validation: {{feedback}} Return the JSON tool implementation.

05

Return to main

COPY EXIT

Return the JSON tool draft unchanged.

The final text returns without model rewriting. Bound operation scenarios return application results; pending changes still require host approval.

EVERY XML ELEMENT / IN FILE ORDER

Every part, briefly.

Short explanations of every element and chat step in this scenario.

  1. 01
    <scenario>

    Names and versions the workflow.

    Writing example ↗
  2. 02
    <inputs>

    Declares input values.

    Writing example ↗
  3. 03
    <input>name

    Requires a supplied value.

    Writing example ↗
  4. 04
    <input>request

    Requires a supplied value.

    Writing example ↗
  5. 05
    <input>contracts

    Requires a supplied value.

    Writing example ↗
  6. 06
    <input>feedback

    Provides an optional value.

    Writing example ↗
  7. 07
    <systemPrompt>

    Sets the child's instructions.

    Writing example ↗
  8. 08
    <steps>

    Orders the chat turns.

    Writing example ↗
  9. 09
    <step 1>

    Name: {{name}} Request: {{request}} Actual contracts: {{contracts}} Previous validation:…

    Writing example ↗
  10. 10
    <exit>

    Returns the output unchanged.

    Writing example ↗