Skip to main content
Glama

set_agent_credentials

Configure API credentials to operate as a specific agent within the Lightning Wallet MCP server, enabling autonomous Bitcoin Lightning wallet operations and access to paid APIs.

Instructions

Switch to an agent API key for subsequent requests. Use to operate as a specific agent after creating it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesThe agent API key

Implementation Reference

  • The handler implementation for the 'set_agent_credentials' tool which updates the session client with the new API key.
    case 'set_agent_credentials': {
      const parsed = SetAgentCredentialsSchema.parse(args);
      session.setClient(new LightningFaucetClient(parsed.api_key));
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              message: 'Switched to agent credentials. Subsequent requests will use this API key.',
            }, null, 2),
          },
        ],
      };
    }
  • Input validation schema for 'set_agent_credentials'.
    const SetAgentCredentialsSchema = z.object({
      api_key: z.string().min(10, 'API key is too short').max(200, 'API key is too long')
        .describe('The agent API key to use for subsequent requests'),
    });
  • src/index.ts:460-469 (registration)
    Tool definition and registration for 'set_agent_credentials' in the ListToolsRequestSchema handler.
      name: 'set_agent_credentials',
      description: 'Switch to an agent API key for subsequent requests. Use to operate as a specific agent after creating it.',
      inputSchema: {
        type: 'object',
        properties: {
          api_key: { type: 'string', description: 'The agent API key' },
        },
        required: ['api_key'],
      },
    },
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 switching credentials for future requests but doesn't specify authentication requirements, rate limits, persistence of the switch, or error handling. This leaves significant gaps for a security-sensitive operation.

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 two concise sentences with zero waste, front-loading the core action and following with usage context. Every word contributes directly to understanding the tool's purpose and application.

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?

For a credential-switching tool with no annotations and no output schema, the description is insufficient. It lacks details on behavioral aspects like security implications, session persistence, error responses, and how this interacts with sibling tools (e.g., does it affect all tools or only specific ones?).

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 the single required 'api_key' parameter. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline for high schema coverage without compensating value.

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 action ('Switch to an agent API key') and purpose ('for subsequent requests'), distinguishing it from sibling tools like 'create_agent' or 'rotate_api_key'. However, it doesn't explicitly differentiate from potential alternatives like 'set_operator_key' or specify the exact scope of 'subsequent requests'.

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

Usage Guidelines3/5

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

The description provides some context ('after creating it') which implies a prerequisite, but doesn't explicitly state when to use this tool versus alternatives like 'set_operator_key' or clarify if it's needed for all agent-specific operations. It mentions a sequence but lacks clear exclusions or comparisons.

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

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