getSecretPassphrase
Retrieve a secure, randomly generated passphrase using a JSON-RPC 2.0 interface in Node.js. Ideal for creating unique and memorable credentials for authentication or application security.
Instructions
Whats the password?
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:48-65 (handler)The handler function for the 'getSecretPassphrase' tool. It selects a random state from a predefined list and a random soup from another list, then returns their concatenation as the passphrase.handler: async () => { const states = [ 'New England', 'Louisiana', 'Texas', 'California', 'Michigan', 'Wisconsin', 'Maine', 'Florida', 'Washington', 'Oregon', 'New Mexico', 'Kentucky', 'Tennessee', 'Minnesota', 'Illinois' ]; const soups = [ 'Clam Chowder', 'Gumbo', 'Chili', 'Cioppino', 'Cherry Soup', 'Beer Cheese Soup', 'Lobster Stew', 'Conch Chowder', 'Salmon Chowder', 'Marionberry Soup', 'Green Chile Stew', 'Burgoo', 'Hot Chicken Soup', 'Wild Rice Soup', 'Corn Chowder' ]; const randomState = states[Math.floor(Math.random() * states.length)]; const randomSoup = soups[Math.floor(Math.random() * soups.length)]; return `${randomState} ${randomSoup}`; }
- index.js:42-47 (schema)The input schema for the 'getSecretPassphrase' tool, defining an empty object with no properties or requirements.inputSchema: { type: 'object', properties: {}, additionalProperties: false, required: [] },
- index.js:39-66 (registration)The registration of the 'getSecretPassphrase' tool into the server's tools Map, including name, description, schema, and handler.this.tools.set('getSecretPassphrase', { name: 'getSecretPassphrase', description: 'What\s the password?', inputSchema: { type: 'object', properties: {}, additionalProperties: false, required: [] }, handler: async () => { const states = [ 'New England', 'Louisiana', 'Texas', 'California', 'Michigan', 'Wisconsin', 'Maine', 'Florida', 'Washington', 'Oregon', 'New Mexico', 'Kentucky', 'Tennessee', 'Minnesota', 'Illinois' ]; const soups = [ 'Clam Chowder', 'Gumbo', 'Chili', 'Cioppino', 'Cherry Soup', 'Beer Cheese Soup', 'Lobster Stew', 'Conch Chowder', 'Salmon Chowder', 'Marionberry Soup', 'Green Chile Stew', 'Burgoo', 'Hot Chicken Soup', 'Wild Rice Soup', 'Corn Chowder' ]; const randomState = states[Math.floor(Math.random() * states.length)]; const randomSoup = soups[Math.floor(Math.random() * soups.length)]; return `${randomState} ${randomSoup}`; } });