Skip to content

fix: Return empty prompt completion result when prompt has no arguments#934

Merged
tzolov merged 2 commits intomainfrom
prompt-arguments-npe-fix
Apr 24, 2026
Merged

fix: Return empty prompt completion result when prompt has no arguments#934
tzolov merged 2 commits intomainfrom
prompt-arguments-npe-fix

Conversation

@chemicL
Copy link
Copy Markdown
Member

@chemicL chemicL commented Apr 24, 2026

Recent changes don't coerce null completion arguments to empty lists so we have to check for null when handling prompt completions.

Resolves #932

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Recent changes don't coerce null completion arguments to empty lists so we have
to check for null when handling prompt completions.

Resolves #932

Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@tzolov tzolov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tzolov tzolov merged commit 5895b2e into main Apr 24, 2026
24 checks passed
@tzolov tzolov deleted the prompt-arguments-npe-fix branch April 24, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullPointerException in completion handler when Prompt has null arguments

2 participants