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

   Hi, @da-daken, I haven’t started working on it yet, so please feel free to 
take it. 
   
   Yes, `PythonMCPServer` does not include `pythonClazz` because there is only 
one implementation of `MCPServer`. I think injecting `pythonClazz` feels a bit 
hacky. In fact, we can already determine whether an instance is a 
`PythonMCPServer` from its annotation. Therefore, I believe we can pass this 
information directly to `extractResource`, like:
   
   ```
   extractResource(
         ResourceType.MCP_SERVER,
         method,
         desc ->
                 new ResourceDescriptor(
                         desc.getModule(),
                         PythonMCPServer.class.getName(),
                         new HashMap<>(desc.getInitialArguments())),
         true);
   
   private void extractResource(ResourceType type, Method method) throws 
Exception {
           extractResource(type, method, null, false);
       }
   
   private void extractResource(
           ResourceType type,
           Method method,
           Function<ResourceDescriptor, ResourceDescriptor> descriptorDecorator,
           boolean isPython)
   ```
   


-- 
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