change_password
Update a user-based license password securely by providing the username, current password, and new password for the LicenseSpring MCP Server.
Instructions
Change password for a user-based license
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_password | Yes | ||
| password | Yes | ||
| username | Yes |
Implementation Reference
- src/license-api-server.ts:602-625 (handler)The handler function that implements the core logic of the 'change_password' tool by proxying to the LicenseSpring License API.}, async ({ username, password, new_password }) => { try { const response = await apiClient.post('/api/v4/change_password', { username, password, new_password, }); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error changing password: ${handleApiError(error)}`, }], isError: true, }; } });
- src/license-api-server.ts:594-625 (registration)The registration of the 'change_password' tool, including metadata, Zod input schema, and inline handler function.server.registerTool('change_password', { title: 'Change Password', description: 'Change password for a user-based license', inputSchema: { username: z.string().min(1, 'Username is required'), password: z.string().min(1, 'Current password is required'), new_password: z.string().min(1, 'New password is required'), }, }, async ({ username, password, new_password }) => { try { const response = await apiClient.post('/api/v4/change_password', { username, password, new_password, }); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error changing password: ${handleApiError(error)}`, }], isError: true, }; } });
- src/types/index.ts:85-89 (schema)TypeScript interface defining the structure of the input for the change_password tool.export interface ChangePasswordRequest { username: string; password: string; new_password: string; }