erp_token_sil
Remove cached authentication tokens from the AARO ERP MCP Server to require fresh authentication for subsequent API operations.
Instructions
Cache'deki token'ı siler. Yeni API çağrıları için yeni token alınması gerekecek.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:325-351 (handler)The deleteToken handler deletes the ERP token cache file from disk, returning success or error messages. This is the core logic for the 'erp_token_sil' (ERP token delete) tool, as 'sil' means 'delete' in Turkish and matches the functionality.private async deleteToken() { try { if (fs.existsSync(this.tokenCacheFile)) { fs.unlinkSync(this.tokenCacheFile); this.log('Token cache başarıyla silindi'); return { content: [{ type: 'text', text: 'Token cache başarıyla silindi. Yeni API çağrıları için yeni token alınması gerekecek.' }], }; } else { this.log('Silinecek token cache bulunamadı'); return { content: [{ type: 'text', text: 'Silinecek token cache bulunamadı. Cache zaten boş.' }], }; } } catch (error) { this.log('Token cache silme hatası', 'error', error); return { content: [ { type: 'text', text: `Token cache silme hatası: ${error instanceof Error ? error.message : 'Bilinmeyen hata'}`, }, ], isError: true, }; } }
- src/index.ts:229-230 (handler)The switch case in callSpecialHandler that routes the 'deleteToken' handler call, which corresponds to the erp_token_sil tool.case 'deleteToken': return await this.deleteToken();
- src/index.ts:218-262 (helper)The callSpecialHandler method that dispatches to specific handlers based on config, including deleteToken for token deletion.private async callSpecialHandler(handlerName: string, args: any) { switch (handlerName) { case 'getErpToken': if (!isValidErpTokenArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Geçersiz ERP token parametreleri'); } const token = await this.getErpToken(args.password); return { content: [{ type: 'text', text: `ERP Token başarıyla alındı: ${token}` }], }; case 'deleteToken': return await this.deleteToken(); case 'addManualToken': return await this.addManualToken(args); case 'createStok': return await this.createStok(args); case 'createCari': return await this.createCari(args); case 'createDekont': return await this.createDekont(args); case 'addDekontKalem': return await this.addDekontKalem(args); case 'updateDekont': return await this.updateDekont(args); case 'testWebhook': return await this.testWebhook(args); case 'callErpApi': if (!isValidErpApiArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Geçersiz API çağrı parametreleri'); } return await this.callErpApi(args.endpoint!, args.method || 'GET', args); default: throw new McpError(ErrorCode.MethodNotFound, `Bilinmeyen handler: ${handlerName}`); } }