my_user_info
Obtain your Glif account information, including profile data, recent workflows, and run history. Use this tool to review your activity.
Instructions
Get detailed information about your Glif account, including profile info, recent workflows, and recent runs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/my-glif-user-info.ts:22-72 (handler)The main handler function for the 'my_user_info' tool. It fetches user info, recent workflows (glifs), and recent runs in parallel, then formats them into a readable text response.
export async function handler(): Promise<ToolResponse> { const [user, glifs, recentRuns] = await Promise.all([ getMyUserInfo(), getMyGlifs(), getMyRecentRuns(), ]); const details = [ "User Information:", `ID: ${user.id}`, `Name: ${user.name}`, `Username: ${user.username}`, `Image: ${user.image}`, user.bio ? `Bio: ${user.bio}` : null, user.website ? `Website: ${user.website}` : null, user.location ? `Location: ${user.location}` : null, `Staff: ${user.staff ? "Yes" : "No"}`, `Subscriber: ${user.isSubscriber ? "Yes" : "No"}`, "", "Your Recent Workflows:", ...glifs .slice(0, 5) .map( (glif) => `- ${glif.name} (${glif.id})\n Created: ${new Date( glif.createdAt ).toLocaleString()}\n Runs: ${glif.completedSpellRunCount}` ), "", "Your Recent Runs:", ...recentRuns .slice(0, 5) .map( (run) => `- ${run.spell.name}\n Time: ${new Date( run.createdAt ).toLocaleString()}\n Duration: ${run.totalDuration}ms\n Output: ${ run.output || "No output" }` ), ].filter(Boolean); return { content: [ { type: "text", text: details.join("\n"), }, ], }; } - src/tools/my-glif-user-info.ts:5-20 (schema)Input schema (empty object, no params needed) and the MCP tool definition including name ('my_user_info'), description, and input schema configuration.
export const schema = z.object({}); export const definition = { name: "my_user_info", description: "Get detailed information about your Glif account, including profile info, recent workflows, and recent runs.", inputSchema: { type: "object", properties: {}, required: [], }, annotations: { title: "My Account Info", readOnlyHint: true, }, }; - src/tools/registry.ts:27-45 (registration)Registration of the tool in the 'discovery' tool group, keyed by myGlifUserInfo.definition.name ('my_user_info') in the TOOL_REGISTRY.
{ name: "discovery", enabled: () => env.discovery.enabled(), tools: { [listFeaturedGlifs.definition.name]: listFeaturedGlifs, [searchGlifs.definition.name]: searchGlifs, [myGlifs.definition.name]: myGlifs, [myGlifUserInfo.definition.name]: myGlifUserInfo, }, }, { name: "agents", enabled: () => env.agents.enabled(), tools: { [listAgents.definition.name]: listAgents, [loadAgent.definition.name]: loadAgent, }, }, ]; - src/api.ts:164-182 (helper)The API helper function getMyUserInfo() that calls /me endpoint and returns the User object, used by the handler.
export async function getMyUserInfo(): Promise<User> { logger.debug("getMyUserInfo"); const data = await apiRequest<unknown>("/me", "get", { context: "getMyUserInfo", }); const response = validateWithSchema( MeResponseSchema, data, "getMyUserInfo validation" ); const user = response.user; cachedUserId = user.id; logger.debug("getMyUserInfo:response", user); return user; } - src/types.ts:82-95 (helper)The UserSchema Zod schema that defines the shape of user data (id, name, username, image, bio, website, location, staff, isSubscriber, etc.) used for validation.
export const UserSchema = z.object({ id: z.string(), name: z.string(), image: z.url().nullable(), username: z.string(), bio: z.string().optional(), website: z.string().optional(), location: z.string().optional(), banned: z.boolean().optional(), bannedAt: z.iso.datetime().nullable().optional(), rateLimitClass: z.string().optional(), staff: z.boolean().optional(), isSubscriber: z.boolean().optional(), });