Skip to main content
Glama
CodeDreamer06

MonkeyType MCP Server

get_profile

Retrieve user profile details by providing a UID or username. If omitted, the tool defaults to the MONKEYTYPE_USERNAME environment variable, simplifying data access for authorized users.

Instructions

Get user's profile information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidOrNameNoThe UID or username of the user. If omitted or set to a keyword like 'me', 'self', 'current', or 'my', the value from the MONKEYTYPE_USERNAME environment variable will be used.

Implementation Reference

  • The handler logic for the 'get_profile' tool. Determines the target user (using MONKEYTYPE_USERNAME env var if uidOrName is omitted or a keyword like 'me'), calls the MonkeyType API endpoint /users/{uidOrName}/profile, and returns the JSON response.
    case "get_profile": { let targetUidOrName; const keywordsForCurrentUser = ["me", "self", "current", "my"]; if (args.uidOrName) { if (keywordsForCurrentUser.includes(args.uidOrName.toLowerCase())) { targetUidOrName = process.env.MONKEYTYPE_USERNAME; if (!targetUidOrName) { throw new Error('uidOrName specified as current user, but MONKEYTYPE_USERNAME environment variable is not set.'); } } else { targetUidOrName = args.uidOrName; // Use the explicitly provided uidOrName } } else { // No uidOrName argument provided, try to use the environment variable targetUidOrName = process.env.MONKEYTYPE_USERNAME; if (!targetUidOrName) { throw new Error('uidOrName parameter is required, or MONKEYTYPE_USERNAME environment variable must be set.'); } } // Final check to ensure targetUidOrName is a non-empty string if (!targetUidOrName || typeof targetUidOrName !== 'string' || targetUidOrName.trim() === '') { throw new Error('Could not determine a valid UID/username. Please provide the uidOrName parameter or set the MONKEYTYPE_USERNAME environment variable with a non-empty value.'); } const result = await callMonkeyTypeApi(`/users/${targetUidOrName}/profile`, 'GET', apiKey, {}); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
  • Zod input schema for the 'get_profile' tool defining the optional uidOrName parameter.
    const GetProfileSchema = BaseApiSchema.extend({ uidOrName: z.string().optional().describe("The UID or username of the user. If omitted or set to a keyword like 'me', 'self', 'current', or 'my', the value from the MONKEYTYPE_USERNAME environment variable will be used.") });
  • server.js:183-187 (registration)
    Registration of the 'get_profile' tool in the ListTools response, including name, description, and input schema.
    { name: "get_profile", description: "Get user's profile information", inputSchema: zodToJsonSchema(GetProfileSchema), },

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/CodeDreamer06/MonkeytypeMCP'

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