Skip to main content
Glama

my_user_info

Read-only

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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"),
          },
        ],
      };
    }
  • 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,
      },
    };
  • 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,
        },
      },
    ];
  • 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;
    }
  • 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(),
    });
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, confirming no side effects. The description adds value by specifying returned data categories (profile, workflows, runs), going beyond the annotation. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, front-loaded sentence that efficiently communicates purpose and key return categories. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and a simple read-only operation, the description adequately covers what the tool returns (profile, workflows, runs). No output schema, but the listing of categories provides sufficient context for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in input schema (100% coverage by schema). Baseline is 4; description does not need to add parameter details. No additional semantics required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: retrieving detailed account info including profile, recent workflows, and recent runs. It distinguishes itself from siblings like my_workflows (which likely focuses on workflows alone) and search_workflows.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for getting the current user's account details, but lacks explicit guidance on when to use versus siblings (e.g., when to use my_workflows instead for workflow-only data). No when-not or alternative suggestions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/glifxyz/glif-mcp-server'

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