Skip to main content
Glama
Alosies
by Alosies

get_user

Retrieve current user information from GitLab, providing access to account details and profile data through the GitLab MCP Server integration.

Instructions

Get current user information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the 'get_user' tool: fetches current user data from GitLab API endpoint '/user' and returns it as MCP-formatted text content with JSON stringification.
    async getUser() { const data = await this.client.get('/user'); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2), }, ], }; }
  • src/tools/user.ts:3-12 (registration)
    Registers the 'get_user' tool for MCP, defining its metadata, description, and input schema (no required parameters).
    export const userTools: Tool[] = [ { name: 'get_user', description: 'Get current user information', inputSchema: { type: 'object', properties: {}, }, }, ];
  • Defines the input schema for 'get_user' tool as an empty object, indicating no parameters are needed.
    inputSchema: { type: 'object', properties: {}, },
  • src/server.ts:265-266 (registration)
    Dispatches 'get_user' tool invocations to the corresponding handler method in the MCP server's central switch statement.
    case "get_user": return await this.userHandlers.getUser();
  • Aggregates the userTools (including 'get_user') into the complete allTools list exposed to the MCP server.
    import { userTools } from './user.js'; export const allTools: Tool[] = [ ...projectTools, ...issueTools, ...mergeRequestTools, ...repositoryTools, ...pipelineTools, ...jobTools, ...userTools,

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/Alosies/gitlab-mcp-server'

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