Skip to content

Prompt enum values should be serialized as all lowercase #95

@Redth

Description

@Redth

Describe the bug
When returning a prompt with a prompt message like the following:

new PromptMessage {
	Role = Role.Assistant,
	Content = new Content	 {
		Text = "some content",
		Type = "text",
	}
}

The JSON seems to be serialized with "role": "Assistant". Some MCP clients appear to be picky about the casing of this value. Claude is complaining:
Image

Expected behavior
The role enum value should be lowercase when serialized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions