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']
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool executes API operations but doesn't disclose critical traits like authentication requirements, rate limits, error handling, or whether it performs read/write operations. This leaves significant gaps in understanding how the tool behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that clearly states the tool's function without unnecessary words. It is appropriately sized and front-loaded, though it could be slightly more informative without losing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a generic API tool with three parameters, no annotations, and no output schema, the description is incomplete. It fails to explain what the tool returns, how errors are handled, or provide context on the service-based approach, making it inadequate for effective agent use without additional documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the input schema already documents the three parameters (serviceName, methodName, parameters) with descriptions. The description adds no additional meaning beyond what the schema provides, such as examples of common use cases or parameter interactions, resulting in a baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool executes BTCPayServer API operations using a service-based approach, which provides a general purpose but lacks specificity about what resources or actions it handles. It doesn't distinguish from sibling tools like get_method_info or get_service_info, making it somewhat vague about its exact function beyond being a generic API caller.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. The description mentions a service-based approach but doesn't explain when to choose this over other methods or tools, leaving the agent without clear usage context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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