Skip to main content
Glama

set_operator_key

Switch operator API keys to authenticate subsequent requests with different credentials in the Lightning Wallet MCP server.

Instructions

Switch to a different operator API key for subsequent requests. Use after register_operator to start using the new credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesThe operator API key

Implementation Reference

  • Handler for the 'set_operator_key' tool which updates the API key in the session state.
    case 'set_operator_key': {
      const parsed = SetOperatorKeySchema.parse(args);
      session.setClient(new LightningFaucetClient(parsed.api_key));
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              message: 'Switched to operator credentials. Subsequent requests will use this API key.',
            }, null, 2),
          },
        ],
      };
    }
  • Schema for validating the input to 'set_operator_key'.
    const SetOperatorKeySchema = z.object({
      api_key: z.string().min(10, 'API key is too short').max(200, 'API key is too long')
        .describe('The operator API key to use for subsequent requests'),
    });
  • src/index.ts:449-458 (registration)
    Tool registration for 'set_operator_key'.
      name: 'set_operator_key',
      description: 'Switch to a different operator API key for subsequent requests. Use after register_operator to start using the new credentials.',
      inputSchema: {
        type: 'object',
        properties: {
          api_key: { type: 'string', description: 'The operator API key' },
        },
        required: ['api_key'],
      },
    },

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/lightningfaucet/lightning-wallet-mcp'

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