adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Incorrect MCP definition in function docstring

Open cschmidterNBTC opened this issue 1 year ago • 6 comments

The docstring of the function adk_to_mcp_tool_type in src/google/adk/tools/mcp_tool/conversion_utils.py incorrectly labels MCP as 'Model Control Plane' instead of 'Model Context Protocol.'

The function is as follows:

def adk_to_mcp_tool_type(tool: BaseTool) -> mcp_types.Tool:
  """Convert a Tool in ADK into MCP tool type.

  This function transforms an ADK tool definition into its equivalent
  representation in the MCP (Model Control Plane) system.

  Args:
      tool: The ADK tool to convert. It should be an instance of a class derived
        from `BaseTool`.

  Returns:
      An object of MCP Tool type, representing the converted tool.

  Examples:
      # Assuming 'my_tool' is an instance of a BaseTool derived class
      mcp_tool = adk_to_mcp_tool_type(my_tool)
      print(mcp_tool)
  """
  tool_declaration = tool._get_declaration()
  if not tool_declaration:
    input_schema = {}
  else:
    input_schema = gemini_to_json_schema(tool._get_declaration().parameters)
  return mcp_types.Tool(
      name=tool.name,
      description=tool.description,
      inputSchema=input_schema,
  )

I did some brief research, and it looks like the acronym definition was changed in this commit.

Desktop:

  • ADK version: 0.3.0

cschmidterNBTC avatar May 01 '25 12:05 cschmidterNBTC

Thanks for catching it. Could you help fix it?

hangfei avatar May 02 '25 20:05 hangfei

Hello! Can I take this up?

Mrigankkh avatar May 04 '25 16:05 Mrigankkh

Hello! Can I take this up?

Go for it! My current corporate policy doesn't permit forks/PRs..

cschmidterNBTC avatar May 05 '25 13:05 cschmidterNBTC

I hope it's still open, can I work on this?

ShyamSathish005 avatar May 11 '25 04:05 ShyamSathish005

I hope it's still open, can I work on this?

Hi @ShyamSathish005 it was resolved already on this PR

bl3ck avatar May 13 '25 09:05 bl3ck

got it

ShyamSathish005 avatar May 13 '25 09:05 ShyamSathish005