current_user
Access detailed information about the currently authenticated user within your Vaiz workspace.
Instructions
Get detailed information about current authenticated user
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:430-438 (schema)Tool schema definition for 'current_user' - defines the tool with no required input parameters, returning information about the current authenticated user
{ name: 'current_user', description: 'Get detailed information about current authenticated user', inputSchema: { type: 'object', properties: {}, }, }, - src/proxy-server.ts:460-485 (registration)Tool handler registration in proxy server - all tool calls (including 'current_user') are proxied to the remote API via the CallToolRequestSchema handler. No specific local handler exists; the tool is forwarded to the backend.
private registerHandlers(): void { const lowLevel = this.mcpServer.server; lowLevel.setRequestHandler(ListToolsRequestSchema, async () => { this.log('← tools/list'); try { const result = (await this.proxyToRemote('tools/list')) as { tools?: Tool[]; }; const remoteTools = result?.tools ?? []; return { tools: mergeByName(VAIZ_TOOLS, remoteTools) }; } catch { const cached = this.responseCache.get('tools/list') as { tools?: Tool[]; } | undefined; return { tools: mergeByName(VAIZ_TOOLS, cached?.tools ?? []), }; } }); lowLevel.setRequestHandler(CallToolRequestSchema, async (request) => { this.log(`← tools/call ${request.params.name}`); const result = await this.proxyToRemote('tools/call', request.params); return result as { content: Array<{ type: string; text: string }> }; }); - src/proxy-server.ts:40-58 (helper)The mergeByName helper is used to merge hardcoded tool definitions (including 'current_user') with remote tool definitions at runtime.
function mergeByName<T extends { name: string }>( hardcoded: T[], remote: T[], ): T[] { const map = new Map<string, T>(); for (const item of hardcoded) map.set(item.name, item); for (const item of remote) map.set(item.name, item); return [...map.values()]; } function mergeByUri( hardcoded: Resource[], remote: Resource[], ): Resource[] { const map = new Map<string, Resource>(); for (const item of hardcoded) map.set(item.uri, item); for (const item of remote) map.set(item.uri, item); return [...map.values()]; }