fakestore_delete_user
Remove a user from the Fake Store API by specifying their ID to manage test data or clean up demo environments.
Instructions
Delete a user (simulation - does not persist)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | User ID to delete |
Implementation Reference
- src/tools/users.ts:185-189 (handler)The core handler function that performs the user deletion by calling the Fake Store API's delete endpoint after validating the ID.export async function deleteUser(args: { id: number }): Promise<User> { const { id } = args; validatePositiveInteger(id, 'User ID'); return del<User>(`/users/${id}`); }
- src/tools/users.ts:347-360 (schema)The tool definition including name, description, and input schema for fakestore_delete_user.{ name: 'fakestore_delete_user', description: 'Delete a user (simulation - does not persist)', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'User ID to delete', }, }, required: ['id'], }, },
- src/index.ts:224-229 (registration)The dispatch logic in the main tool call handler that routes fakestore_delete_user calls to the deleteUser function.if (name === 'fakestore_delete_user') { const result = await deleteUser(args as { id: number }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }