list_assistants
Retrieve all available Folderr Assistants to manage and communicate with them through the MCP server.
Instructions
List all available assistants
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:312-338 (handler)The handler function that executes the list_assistants tool. It checks for authentication token, makes a GET request to '/api/agent', and returns the JSON response or an error.private async handleListAssistants() { if (!this.config.token) { throw new McpError(ErrorCode.InvalidRequest, 'Not logged in'); } try { const response = await this.axiosInstance.get('/api/agent'); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Failed to list assistants: ${error.response?.data?.message || error.message}`, }, ], isError: true, }; } }
- src/index.ts:143-151 (registration)Tool registration in the ListTools response, defining name, description, and empty input schema.{ name: 'list_assistants', description: 'List all available assistants', inputSchema: { type: 'object', properties: {}, required: [], }, },
- src/index.ts:221-222 (registration)Dispatcher case in CallToolRequest handler that routes to the list_assistants handler function.case 'list_assistants': return await this.handleListAssistants();
- src/index.ts:146-150 (schema)Input schema definition for the list_assistants tool, which requires no parameters.inputSchema: { type: 'object', properties: {}, required: [], },