Skip to main content
Glama

get_method_info

Retrieve detailed parameter requirements and usage examples for specific BTCPayServer API methods to ensure correct implementation.

Instructions

Get detailed parameter requirements and examples for a specific service method.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceNameYesService name (e.g., "payment-requests", "invoices", "lightning")
methodNameYesMethod name (e.g., "create", "get", "list", "delete")

Implementation Reference

  • The main handler for the 'get_method_info' tool. It fetches the service, retrieves its service info, finds the specified method, and constructs a detailed text response with parameters, requirements, and examples.
    case 'get_method_info': {
      const serviceName = args?.serviceName as string;
      const methodName = args?.methodName as string;
      
      const service = serviceRegistry.getService(serviceName);
      if (!service) {
      return {
        content: [
          {
            type: 'text',
              text: `Service "${serviceName}" not found.\n\nAvailable services: ${serviceRegistry.getServiceNames().join(', ')}`
          }
        ]
      };
    }
    
      const serviceInfo = service.getServiceInfo();
      const method = serviceInfo.methods.find(m => m.name === methodName);
      if (!method) {
      return {
        content: [
          {
            type: 'text',
              text: `Method "${methodName}" not found in service "${serviceName}".\n\nAvailable methods: ${serviceInfo.methods.map(m => m.name).join(', ')}`
          }
        ]
      };
    }
    
      let output = `**${serviceName}.${methodName}**\n\n${method.description}\n\n`;
      
      output += "**Parameters:**\n";
      for (const [paramName, paramDef] of Object.entries(method.parameters)) {
        const required = paramDef.required ? " (required)" : " (optional)";
        const defaultVal = paramDef.default !== undefined ? ` [default: ${paramDef.default}]` : "";
        output += `• **${paramName}** (${paramDef.type})${required}${defaultVal}: ${paramDef.description}\n`;
      }
      
      if (method.examples && method.examples.length > 0) {
        output += "\n**Examples:**\n";
        method.examples.forEach((example, index) => {
          output += `\n**${index + 1}. ${example.name}**\n${example.description}\n\`\`\`json\n${JSON.stringify(example.parameters, null, 2)}\n\`\`\`\n`;
        });
      }
      
      return {
        content: [
          {
            type: 'text',
            text: output
          }
        ]
      };
    }
  • src/index.ts:100-117 (registration)
    Registration of the 'get_method_info' tool in the ListTools response, including its name, description, and input schema.
    {
      name: 'get_method_info',
      description: 'Get detailed parameter requirements and examples for a specific service method.',
      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")'
          }
        },
        required: ['serviceName', 'methodName']
      }
    },
  • TypeScript interface defining the structure of a ServiceMethod, which is used to provide method details in the tool's response.
    export interface ServiceMethod {
      name: string;
      description: string;
      parameters: Record<string, {
        type: string;
        description: string;
        required: boolean;
        default?: any;
      }>;
      examples?: Array<{
        name: string;
        description: string;
        parameters: Record<string, any>;
      }>;
    }
  • Helper method in BaseService to retrieve method information by name, implementing the core lookup logic mirrored in the tool handler.
    protected getMethodInfo(methodName: string): ServiceMethod | undefined {
      return this.getServiceInfo().methods.find(m => m.name === 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 mentions retrieving 'detailed parameter requirements and examples,' implying a read-only operation, but fails to specify if this requires authentication, rate limits, or what the output format looks like (e.g., structured data or examples). This leaves gaps in understanding the tool's behavior and constraints.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, making it easy to parse quickly. Every part of the sentence contributes to understanding the tool's function.

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 tool's complexity (2 parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain what the output includes (e.g., parameter types, examples, or error cases), nor does it address behavioral aspects like authentication needs. For a tool that retrieves detailed information, more context is needed to guide effective use.

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 input schema has 100% description coverage, clearly documenting both required parameters ('serviceName' and 'methodName') with examples. The description adds minimal value beyond this, as it only reiterates the general purpose without providing additional syntax, format details, or context for parameter usage. Baseline 3 is appropriate since the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('detailed parameter requirements and examples for a specific service method'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'get_service_info' or 'btcpay_request', which might have overlapping or related functionality.

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?

The description provides no guidance on when to use this tool versus alternatives. It lacks context on prerequisites, such as needing prior knowledge of service names, or comparisons to sibling tools like 'get_service_info', which might offer broader service information. This omission leaves the agent without clear usage direction.

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