Skip to content

Conversation

@snowmead
Copy link
Collaborator

Summary

  • Update prompt handler return types from Vec<PromptMessage> to Result<GetPromptResult, McpError> (required by rmcp 0.13.0 API)
  • Add preserve_order feature to schemars to fix positional argument mapping bug
  • Add prompt integration tests

Problem

After upgrading to rmcp 0.13.0, prompts failed with "missing field release" errors when using positional arguments (e.g., /substrate:analyze_release stable2503). This was caused by:

  1. rmcp 0.13.0 changed the expected return type for prompt handlers
  2. schemars was alphabetizing schema properties, causing focus to appear before release, so positional args mapped incorrectly

Test plan

  • cargo test passes
  • Verify /substrate:analyze_release stable2503 works correctly

🤖 Generated with Claude Code

snowmead and others added 2 commits January 23, 2026 11:23
- Update rmcp dependency version in Cargo.toml
- Add new required fields to Implementation struct (title, icons, website_url)
- Add new required fields to RawResource structs (icons, meta, title)
- Add task field to CallToolRequestParam in test helper

The upgrade brings new features like graceful shutdown, task support,
and elicitation improvements which can be adopted in future updates.
… order

- Change prompt handler return type from `Vec<PromptMessage>` to
  `Result<GetPromptResult, McpError>` as required by rmcp 0.13.0
- Add `preserve_order` feature to schemars to fix positional argument
  mapping (prevents alphabetical reordering of schema properties)
- Add prompt tests to verify the fix

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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