Skip to main content
Glama
CodeDreamer06

MonkeyType MCP Server

get_profile

Retrieve user profile information from MonkeyType by providing a UID or username. Use 'me' to access your own profile data from the typing platform.

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

  • Handler for the 'get_profile' tool: resolves user identifier from input or environment variable and fetches profile from MonkeyType API.
    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 schema defining the input parameters for the get_profile tool.
    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 MCP server's tool list, 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