mcp-docstrings-and-type-hints

#3
by xarical - opened

Gradio uses docstrings and type hints to generate the MCP schema (at /gradio_api/mcp/schema) that MCP clients use to get tool description, and argument type, and argument description.

This PR adds a docstring and type hints to the infer method. Additionally, it bumps the Gradio SDK version to the most recent, 5.32.0 instead of 5.30.0.

xarical changed pull request title from mcp-docstrings to mcp-docstrings-and-type-hints
xarical changed pull request status to open

The reason for opening this PR is because I wanted to use this MCP server with Visual Studio Code's MCP client (with GitHub Copilot), but it doesn't work. Copilot doesn't know what the tool does and doesn't consistently know what arguments to send.

@openfree Not to bother you but could you take a look at this? VS Code's MCP client still doesn't work with this MCP server, and I can't host the updated version myself since I don't have Hugging Face PRO to use ZeroGPU

xarical changed pull request status to closed
xarical changed pull request status to open
This comment has been hidden (marked as Off-Topic)

@openfree Not to bother you but could you take a look at this? VS Code's MCP client still doesn't work with this MCP server, and I can't host the updated version myself since I don't have Hugging Face PRO to use ZeroGPU

Please Re-Try it

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment