Skip to main content
Glama

set_api_token

Configure API authentication for the Folderr MCP server by providing a token to enable interaction with Folderr Assistants without using login credentials.

Instructions

Set an API token for authentication (alternative to login)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesAPI token generated from Folderr developers section

Implementation Reference

  • The handler function that executes the set_api_token tool logic: updates the configuration with the provided token, sets the Authorization header on the axios instance, saves the config to file, and returns a success or error response.
    private async handleSetApiToken(args: any) { try { // Update config and axios instance with new token this.config.token = args.token; this.axiosInstance.defaults.headers.common['Authorization'] = `Bearer ${this.config.token}`; this.saveConfig(); return { content: [ { type: 'text', text: 'Successfully set API token', }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Failed to set API token: ${error.message}`, }, ], isError: true, }; } }
  • Input schema for the set_api_token tool, defining a required 'token' property of type string.
    inputSchema: { type: 'object', properties: { token: { type: 'string', description: 'API token generated from Folderr developers section', }, }, required: ['token'], },
  • src/index.ts:111-124 (registration)
    Registration of the set_api_token tool in the ListToolsRequestSchema handler, providing name, description, and input schema.
    { name: 'set_api_token', description: 'Set an API token for authentication (alternative to login)', inputSchema: { type: 'object', properties: { token: { type: 'string', description: 'API token generated from Folderr developers section', }, }, required: ['token'], }, },
  • src/index.ts:219-220 (registration)
    Switch case in the CallToolRequestSchema handler that dispatches calls to the set_api_token tool to the handleSetApiToken method.
    case 'set_api_token': return await this.handleSetApiToken(request.params.arguments);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/folderr-tech/folderr-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server