Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

users-get-current

Retrieve your authenticated user profile from Shortcut project management to verify identity and access permissions for AI-assisted workflows.

Instructions

Get the current user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that fetches the current user using the ShortcutClientWrapper and formats the response using toResult.
    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 "users-get-current" tool on the CustomMcpServer instance, linking it to the getCurrentUser handler.
    server.addToolWithReadAccess(
    	"users-get-current",
    	"Get the current user",
    	async () => await tools.getCurrentUser(),
    );
  • BaseTools helper method used by the handler to format the output as an MCP CallToolResult with JSON-embedded content.
    protected toResult(
    	message: string,
    	data?: unknown,
    	paginationToken?: string | null | undefined,
    ): CallToolResult {
    	return {
    		content: [
    			{
    				type: "text",
    				text: `${message}${data !== undefined ? `\n\n<json>\n${JSON.stringify(data, null, 2)}\n</json>${paginationToken ? `\n\n<next-page-token>${paginationToken}</next-page-token>` : ""}` : ""}`,
    			},
    		],
    	};
    }

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/useshortcut/mcp-server-shortcut'

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