payment_methods
Retrieve payment methods for troubleshooting or when user-specified, enabling AI agents to access stored payment options within the Fewsats MCP Server.
Instructions
Retrieve the user's payment methods. You will rarely need to call this unless instructed by the user, or to troubleshoot payment issues. Fewsats will automatically select the best payment method.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/fewsats_mcp/server.py:21-26 (handler)MCP tool handler for 'payment_methods'. Decorated with @mcp.tool(), it calls Fewsats().payment_methods() and wraps the response using handle_response.@mcp.tool() async def payment_methods() -> str: """Retrieve the user's payment methods. You will rarely need to call this unless instructed by the user, or to troubleshoot payment issues. Fewsats will automatically select the best payment method.""" return handle_response(Fewsats().payment_methods())
- src/fewsats_mcp/server.py:9-11 (helper)Helper function used by the payment_methods handler (and others) to process HTTP responses from Fewsats API.def handle_response(response): try: return response.status_code, response.json() except: return response.status_code, response.text