-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
I have an custom python mcp that requires a dictionary input, like this:
@mcp.tool()
def create_page(parent_id: str,
page_properties: Dict[str, Any],) -> str:
When calling this tool in a simple agent implementation, the model is responding with:
text="The
create_page
function in the available tools only accepts aCreatePagePageProperties
object, which currently only contains adummy_DO_NOT_GENERATE
field. It doesn't allow specifying properties with the detailed structure you provided, including nested objects fortitle
andtext
content. Essentially, the tool lacks the functionality to define the page title or other properties beyond a simple, single string value.\n")]
I believe this may be because of how the function schema is converted to the gemini format, which appears to not allow for an dictionary as input? Unsure how to solve on my end as a user:
adk-python/src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py
Line 90 in 6742ab9
openapi_schema["properties"] = {"dummy_DO_NOT_GENERATE": {"type": "string"}} |
Can confirm this mcp is working from Claude desktop.