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
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | Yes | The operator API key |
Implementation Reference
- src/index.ts:1097-1111 (handler)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), }, ], }; } - src/index.ts:147-150 (schema)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'], }, },