login
Authenticate users to access Folderr's API for managing and communicating with Assistants using email and password credentials.
Instructions
Login to Folderr with email and password
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"email": "<email>",
"password": "<password>"
},
"name": "login"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | User email | ||
| password | Yes | User password |
Implementation Reference
- src/index.ts:244-275 (handler)The main handler function that executes the 'login' tool logic. It sends a POST request to the Folderr API's sign-in endpoint with email and password, updates the authentication token in config and axios instance upon success, and returns appropriate success or error messages.
private async handleLogin(args: any) { try { const response = await this.axiosInstance.post<AuthResponse>('/api/auth/sign-in', { email: args.email, password: args.password, }); // Update config and axios instance with new token this.config.token = response.data.token; this.axiosInstance.defaults.headers.common['Authorization'] = `Bearer ${this.config.token}`; this.saveConfig(); return { content: [ { type: 'text', text: 'Successfully logged in', }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Login failed: ${error.response?.data?.message || error.message}`, }, ], isError: true, }; } } - src/index.ts:128-141 (schema)The input schema for the 'login' tool, specifying the required 'email' and 'password' fields as strings.
inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'User email', }, password: { type: 'string', description: 'User password', }, }, required: ['email', 'password'], }, - src/index.ts:125-142 (registration)Registration of the 'login' tool in the ListTools response, including name, description, and input schema.
{ name: 'login', description: 'Login to Folderr with email and password', inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'User email', }, password: { type: 'string', description: 'User password', }, }, required: ['email', 'password'], }, }, - src/index.ts:217-218 (registration)Registration of the 'login' tool handler in the CallToolRequestSchema switch statement, dispatching to handleLogin function.
case 'login': return await this.handleLogin(request.params.arguments);