Skip to main content
Glama
Alosies
by Alosies

get_user

Retrieve current user details from GitLab to verify identity and access permissions for GitLab projects, issues, and pipelines.

Instructions

Get current user information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `getUser` method in the `UserHandlers` class that executes the core logic of the `get_user` tool: fetches current user data from the GitLab API and returns it as a text content block with JSON stringification.
    async getUser() { const data = await this.client.get('/user'); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2), }, ], }; }
  • Defines the `get_user` tool schema, including name, description, and empty input schema (no parameters required).
    export const userTools: Tool[] = [ { name: 'get_user', description: 'Get current user information', inputSchema: { type: 'object', properties: {}, }, }, ];
  • src/server.ts:265-266 (registration)
    Registers the handler dispatch for the `get_user` tool call within the MCP server's `CallToolRequestSchema` switch statement.
    case "get_user": return await this.userHandlers.getUser();
  • src/server.ts:140-144 (registration)
    Registers the list_tools handler which returns `allTools` (including `get_user` via aggregation in tools/index.ts).
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: allTools, }; });

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