View the source code for this module on GitHub: https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/server/router.py
MCPRouter
method resource
Decorator to register a resource with this router.Example:ReturnsResource URI (required, e.g., “config://app” or “file://data.json”)Human-readable nameResource descriptionMIME type of the resource content
Signature
method tool
Decorator to register a tool with this router.Example:ReturnsOverride the tool name (defaults to function name)Human-readable title for the toolTool description (defaults to function docstring)MCP tool annotationsWhether the tool returns structured output
Signature
PendingPrompt
PendingResource
PendingTool
method init
ParametersSignatureParameter valueName identifierString valueString valueParameter valueBoolean flag