Skip to main content
Glama

set_api_token

Enable API authentication by configuring an API token, providing an alternative to traditional login methods for interacting with Folderr's services.

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 main handler function for the 'set_api_token' tool. It 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 definition for the set_api_token tool, specifying an object with 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)
    Tool registration in the list_tools handler, defining 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)
    Dispatcher case in the CallToolRequestSchema handler that routes calls to set_api_token to the handleSetApiToken method.
    case 'set_api_token': return await this.handleSetApiToken(request.params.arguments);

Other Tools

Related Tools

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