Class McpToolParameterConverter

java.lang.Object
com.github.thought2code.mcp.annotated.server.converter.AbstractParameterConverter<McpToolParam>
com.github.thought2code.mcp.annotated.server.converter.McpToolParameterConverter
All Implemented Interfaces:
ParameterConverter<McpToolParam>

public class McpToolParameterConverter extends AbstractParameterConverter<McpToolParam>
This class is used to convert the value of a parameter annotated with McpToolParam to the required type.
Author:
codeboyzhou
  • Constructor Details

    • McpToolParameterConverter

      public McpToolParameterConverter()
  • Method Details

    • convert

      public Object convert(Parameter parameter, McpToolParam annotation, Map<String,Object> args)
      Converts the value of the parameter annotated with McpToolParam to the required type.
      Parameters:
      parameter - the parameter annotated with McpToolParam
      annotation - the annotation instance
      args - the arguments passed to the method
      Returns:
      the converted value of the parameter
    • getAnnotationType

      public Class<McpToolParam> getAnnotationType()
      Returns the type of the annotation this converter handles.
      Returns:
      the type of the annotation this converter handles