wenjin272 commented on issue #578:
URL: https://github.com/apache/flink-agents/issues/578#issuecomment-4089509312

   Hi, @Vino1016, thank you for reporting this bug.
   
   I see this bug is caused by the `arg.required()` returns null. I think we 
can validate it before pass it to the constructor of 
`MCPPrompt.PromptArgument`, like
   ```
   argumentsMap.put(
           arg.name(),
           new MCPPrompt.PromptArgument(
                   arg.name(), arg.description(), arg.required() != null && 
arg.required()));
   ```
   
   However, I have two questions I would like to ask:
   
   > According to the MCP specification, PromptArgument.required is optional 
(required?: boolean).
   
   Could you please let me know where this information was obtained? I couldn't 
find it at 
https://modelcontextprotocol.io/specification/2025-11-25/server/prompts.
   
   > Tools-only MCP servers or any server returning optional arguments without 
required are affected.
   
   Why tools-only MCP servers are also affected? If the `prompts` are empty, 
`MCPPrompt.PromptArgument` should not be constructed.
   And in #538, before list the prompts, we add a check to verify whether the 
MCP Server supports prompts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to