Skip to content

[ENHANCEMENT] Wrap system prompt sections and tool docs in dedicated XML tags for reliable parsing #7424

@hannesrudolph

Description

@hannesrudolph

NOTE: Would like to run evals on a draft of this change

Type

Enhancement

Problem / Value

System prompt sections and tool descriptions are currently formatted with markdown separators, which makes them harder to parse and validate. Using dedicated XML tags would create clear, consistent boundaries that are easier to process, transform, and maintain.

Context

  • Affects all AI interactions (the system prompt is generated every time), developers extending prompt content, and future tooling that needs to analyze or transform sections.
  • Current behavior: major sections use visual separators and markdown headers; tool descriptions use markdown headers per tool.
  • Desired behavior: each major section is emitted as an XML-wrapped block with its own dedicated tag, and each tool description is emitted under a tool element by name. The content inside each tag remains markdown.

Conceptual examples (structure only; content unchanged):

  • Sections:
    • <tool_use_section>…</tool_use_section>
    • <capabilities_section>…</capabilities_section>
    • <rules_section>…</rules_section>
    • <system_information_section>…</system_information_section>
    • <objective_section>…</objective_section>
    • <markdown_rules_section>…</markdown_rules_section>
    • <modes_section>…</modes_section>
    • <mcp_servers_section>…</mcp_servers_section>
  • Tools listing:

Constraints/Preferences

  • Do not change the existing tool invocation XML tags or their behavior (out of scope).
  • Keep all inner section and tool description content in markdown.
  • Scope is limited to the system prompt structure and documentation formatting.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Issue [Unassigned]

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions