Skip to content

.NET: Add description attribute to resource and script elements in skill body#11

Closed
SergeyMenshykh wants to merge 1 commit into
mainfrom
sergeymenshykh-skill-descriptions-in-prompts
Closed

.NET: Add description attribute to resource and script elements in skill body#11
SergeyMenshykh wants to merge 1 commit into
mainfrom
sergeymenshykh-skill-descriptions-in-prompts

Conversation

@SergeyMenshykh

Copy link
Copy Markdown
Owner

Summary

Re-adds the optional description attribute to <resource> and <script> elements within the <available_resources> and <available_scripts> XML blocks injected into skill bodies. This aligns .NET with the Python implementation, which already emits descriptions.

Changes

  • AgentInlineSkillContentBuilder.cs — Emit description="..." attribute on <resource> and <script> elements when the description is non-null and non-empty. Values are XML-escaped.
  • AgentInlineSkillContentBuilderTests.cs — Added tests for description rendering, XML escaping of descriptions, and empty-string description omission.

Context

Descriptions were previously present but removed incidentally in microsoft#6343 during a broader XML restructuring. Python's _create_resource_element() and _create_script_element() already include the description attribute.

…ill body

Include the optional description attribute on <resource> and <script>
elements within <available_resources> and <available_scripts> blocks,
aligning .NET with the Python implementation. The description is emitted
only when non-null/non-empty and is XML-escaped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants