Skip to main content
Glama

btcpay_request

Execute BTCPayServer API operations to manage payment requests, invoices, and lightning services for cryptocurrency payment processing.

Instructions

Execute a BTCPayServer API operation using the service-based approach.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceNameYesService name (e.g., "payment-requests", "invoices", "lightning")
methodNameYesMethod name (e.g., "create", "get", "list", "delete")
parametersNoParameters for the method (use get_method_info to see required parameters)

Implementation Reference

  • Handler for the 'btcpay_request' tool. It retrieves the specified service from the ServiceRegistry, executes the given method with parameters, and formats the result or error as text content.
    case 'btcpay_request': { const serviceName = args?.serviceName as string; const methodName = args?.methodName as string; const parameters = args?.parameters as Record<string, any> || {}; const service = serviceRegistry.getService(serviceName); if (!service) { return { content: [ { type: 'text', text: `Service "${serviceName}" not found.\n\nAvailable services: ${serviceRegistry.getServiceNames().join(', ')}` } ] }; } try { const result = await service.executeMethod(methodName, parameters); return { content: [ { type: 'text', text: `**${serviceName}.${methodName}** executed successfully:\n\n\`\`\`json\n${JSON.stringify(result, null, 2)}\n\`\`\`` } ] }; } catch (error) { return { content: [ { type: 'text', text: `**Error executing ${serviceName}.${methodName}:**\n\n${error instanceof Error ? error.message : String(error)}\n\nUse get_method_info to check parameter requirements.` } ] }; } }
  • src/index.ts:118-139 (registration)
    Registration of the 'btcpay_request' tool in the ListTools response, including its description and input schema.
    { name: 'btcpay_request', description: 'Execute a BTCPayServer API operation using the service-based approach.', inputSchema: { type: 'object', properties: { serviceName: { type: 'string', description: 'Service name (e.g., "payment-requests", "invoices", "lightning")' }, methodName: { type: 'string', description: 'Method name (e.g., "create", "get", "list", "delete")' }, parameters: { type: 'object', description: 'Parameters for the method (use get_method_info to see required parameters)' } }, required: ['serviceName', 'methodName'] } }
  • Input schema definition for the 'btcpay_request' tool, specifying serviceName, methodName (required), and optional parameters.
    { name: 'btcpay_request', description: 'Execute a BTCPayServer API operation using the service-based approach.', inputSchema: { type: 'object', properties: { serviceName: { type: 'string', description: 'Service name (e.g., "payment-requests", "invoices", "lightning")' }, methodName: { type: 'string', description: 'Method name (e.g., "create", "get", "list", "delete")' }, parameters: { type: 'object', description: 'Parameters for the method (use get_method_info to see required parameters)' } }, required: ['serviceName', 'methodName'] } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Abhijay007/btcpayserver-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server