Skip to main content
Glama

get-current-user

Retrieve current user information from Shortcut project management to identify who is logged in and access user-specific data for personalized workflows.

Instructions

Get the current user

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The handler function that executes the tool logic: fetches the current user from the Shortcut client and returns a formatted result.
    async getCurrentUser() { const user = await this.client.getCurrentUser(); if (!user) throw new Error("Failed to retrieve current user."); return this.toResult(`Current user:`, user); }
  • src/tools/user.ts:9-13 (registration)
    Registers the 'get-current-user' tool with the MCP server, including name, description, and handler reference.
    server.tool( "get-current-user", "Get the current user", async () => await tools.getCurrentUser(), );
  • Helper method in BaseTools used by the handler to format the response as MCP CallToolResult with text content containing the user data.
    protected toResult(message: string, data?: unknown): CallToolResult { return { content: [ { type: "text", text: `${message}${data !== undefined ? `\n\n${JSON.stringify(data, null, 2)}` : ""}`, }, ], }; }

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/ampcome-mcps/shortcut-mcp'

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